Go to Topic :: Scientific/Engineering :: GIS
dnd you have all the Python Modules for GIS (for working with shapefiles, rasters, KML, GML,GPX geocoding, etc.)
The most important have already been cited but I recommend also Fiona
"Fiona provides a minimal, uncomplicated Python interface to the open source GIS community's most trusted geodata access library and integrates readily with other Python GIS packages such as pyproj, Rtree, and Shapely."
and for networking with shapefiles or Esri Feature Class with Networkx module Geometric Network Geoprocessing:
"As far as I can tell, ESRI has not released any geoprocessing tools for their Geometric Network"
or Seeking alternatives to pgRouting for open source routing / network analysis? or Python: how to transform a shapefile (or feature class ESRI) in a topological network (graph) (in French)
import networkx as nx
G = nx.read_shp('pointshapefile.shp')
print(G.nodes())
# result [(1.0, 2.0), (3.0, 2.0), (0.0, 0.0), (3.0, 1.0), (4.0, 4.0), (2.0, 1.0), (2.0, 4.0), (1.0, 3.0), (2.0, 3.0), (1.0, 4.0), (4.0, 3.0), (4.0, 2.0), (3.0, 4.0), (1.0, 1.0)]
print(G.edges())
# result [((1.0, 2.0), (1.0, 1.0)), ((3.0, 2.0), (2.0, 1.0)), ((3.0, 1.0), (2.0, 1.0)), ((4.0, 4.0), (3.0, 4.0)), ((2.0, 1.0), (1.0, 1.0)), ((2.0, 4.0), (2.0, 3.0)), ((1.0, 3.0), (1.0, 2.0)), ((2.0, 3.0), (1.0, 2.0)), ((1.0, 4.0), (1.0, 3.0)), ((4.0, 3.0), (4.0, 2.0)), ((4.0, 2.0), (3.0, 2.0)), ((3.0, 4.0), (2.0, 3.0)), ((1.0, 1.0), (0.0, 0.0))]
# shortest path
print(nx.astar_path(H,(1.0, 4.0),(4.0, 2.0),dist))
# result [(1.0, 4.0), (1.0, 3.0), (1.0, 2.0), (2.0, 3.0), (3.0, 2.0), (4.0, 2.0)]
# and so with all the algorithms of Networkx module
# you can also export the results in shapefile format
I use Shapely, Fiona, GDAL/OGR, Pyshp, Networkx and others in QGIS and GRASS GIS without problem (and with matplotlib or descartes for interactive graphing to). They often have algorithms easier to use for treatment.
Some of these modules can also be used in ArcPy with problems because ArcPy uses version 1.3 of Numpy, outdated (now version 1.6.1...) and you can not update it without breaking the ArcPy module.
arcgisscripting
is a module. See help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…[tag:python] + [tag:my-software]
search and sorted via the votes and faq tabs. The answers here can never hope to match that.