Use Cases

Filtering features from a collection

For me (SeanGillies), this is the most important use case:

polygon = Polygon(...)
containees = [f for f in all_features if polygon.contains(f.geometry)]

Serialization Support

Shapely geometries shall be trivially serialized to WKT, WKB, GeoJSON using pickle-like dumps/loads functions.

Interoperability with Numpy

Shapely geometries will implement the numpy array interface, to permit

polygon = Polygon(...)
array = numpy.asarray(polygon)

and also shall be able to encapsulate numpy arrays

polygon = asPolygon(array)
center = polygon.centroid

Design

There will be Point, LineString?, Polygon, MultiPoint?, MultiLineString?, MultiPolygon?, and GeometryCollection? classes.

The GEOS operations and predicates will be provided by deriving from BaseGeometry?.

All classes will provide a sequence of coordinates.

All classes will provide the Numpy array interface.

ShapeLy