Seeking Python tools/modules/add-ins for GIS?

  • NumPy: NumPy is the fundamental package for scientific computing with Python. It contains among other things:

    • a powerful N-dimensional array object
    • sophisticated (broadcasting) functions
    • tools for integrating C/C++ and Fortran code
    • useful linear algebra, Fourier transform, and random number capabilities

    Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.

  • SciPy: SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering. It is also the name of a very popular conference on scientific programming with Python. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!

  • Shapely: Shapely is a BSD-licensed Python package for manipulation and analysis of planar geometric objects. It is based on the widely deployed GEOS (the engine of PostGIS) and JTS (from which GEOS is ported) libraries. This C dependency is traded for the ability to execute with blazing speed. Shapely is not concerned with data formats or coordinate systems, but can be readily integrated with packages that are.

  • GDAL Python bindings: This Python package and extensions are a number of tools for programming and manipulating the GDAL Geospatial Data Abstraction Library.

  • GeoDjango: GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness the power of spatially enabled data.
  • PyProj
  • SpatialPython: Nicely documented github repository.

To answer my own question I have just found this Pythons module. Although I have not used it yet, it looks exciting.

NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

And

rtree - spatial index for Python GIS


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 Alternatives to pgRouting 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.