Shapely
Shapely is a package for creation, manipulation, and analysis of planar geometry objects – designed especially for developers of cutting edge geographic information systems. In a nutshell: Shapely lets you do PostGIS-ish stuff outside the context of a database using idiomatic Python.
Shapely plays well with matplotlib and has several handy usage examples:
Last, but not least: Shapely has a manual with narrative documentation.
Current Distributions
1.2.x:
- Linux (linux2), OS X (darwin), SunOS 5 (sunos5): PyPI, http://gispython.org/dist/Shapely-1.2.3.tar.gz
- Windows (win32): PyPI, http://gispython.org/dist/Shapely-1.2.2.win32.exe
- Windows (amd64): PyPI, http://gispython.org/dist/Shapely-1.2.2.win-amd64.exe
1.0:
Dependencies
- Python 2.4+ (1.2 requires 2.5+)
- libgeos_c (2.2.3 or 3.0.0+)
- Python ctypes (standard in Python 2.5+): http://pypi.python.org/pypi/ctypes/
Installation
Windows users should use the executable installers containing the required GEOS DLL. Other users should acquire and install libgeos_c by any means, such as by executing
$ apt-get install libgeos-c1
Then install from the Python package index:
$ easy_install Shapely
or
$ pip install Shapely
Be sure to specify version 1.0.15 if you don't want 1.2
$ pip install Shapely==1.0.15
Support
If you have questions, please consider subscribing to the community list ( archives) shared with Geojson, Rtree, and OWSLib.
Development
The source: http://github.com/sgillies/shapely. Please fork and send pull requests.
See also:

