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:

Pair of example plots

Last, but not least: Shapely has a  manual with narrative documentation.

Current Distributions

1.2.x:

1.0:

  • Windows (win32):  1.0.14
  • Linux (linux2), OS X (darwin), SunOS 5 (sunos5), other:  1.0.15

Dependencies

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:

Attachments