The shapely.wkt and shapely.wkb modules provide dumps () and loads () functions that work almost exactly as their pickle and simplejson module counterparts. To serialize a geometric object to a binary or text string, use dumps().
Shapely # Manipulation and analysis of geometric objects in the Cartesian plane. Shapely is a BSD-licensed Python package for manipulation and analysis of planar geometric objects. It is using the widely deployed open-source geometry library GEOS (the engine of PostGIS, and a port of JTS). Shapely wraps GEOS geometries and operations to provide both a feature rich Geometry interface for ...
shapely.Polygon # class Polygon(shell=None, holes=None) # A geometry type representing an area that is enclosed by a linear ring. A polygon is a two-dimensional feature and has a non-zero area. It may have one or more negative-space “holes” which are also bounded by linear rings. If any rings cross each other, the feature is invalid and operations on it may fail. Parameters: shellsequence ...
shapely.MultiPolygon # class MultiPolygon(polygons=None) # A collection of one or more Polygons. If component polygons overlap the collection is invalid and some operations on it may fail. Parameters: polygonssequence A sequence of Polygons, or a sequence of (shell, holes) tuples where shell is the sequence representation of a linear ring (see LinearRing) and holes is a sequence of such linear ...
shapely.difference # difference(a, b, grid_size=None, **kwargs) # Return the part of geometry A that does not intersect with geometry B. If grid_size is nonzero, input coordinates will be snapped to a precision grid of that size and resulting coordinates will be snapped to that same grid. If 0, this operation will use double precision coordinates.