shapely API reference
69 public APIs from shapely (shapely/shapely) — 20 classes, 31 functions, 18 methods. Signatures extracted by static analysis of the actual source.
Repository: shapely/shapely
| Kind | Count |
|---|---|
| Classes | 20 |
| Functions | 31 |
| Methods | 18 |
API list
class
shapely._coverage.CoverageCleanMergeStrategyEnumeration of coverage clean merge strategies.
func
shapely._coverage.coverage_is_valid(geometry, gap_width=0.0, **kwargs)Verify if a coverage is valid.
class
shapely._enum.ParamEnumWraps IntEnum to provide validation of a requested item.
class
shapely._geometry.GeometryTypeThe enumeration of GEOS geometry types.
func
shapely._geometry.get_m(point, **kwargs)Return the m-coordinate of a point.
func
shapely._geometry.get_precision(geometry, **kwargs)Get the precision of a geometry.
func
shapely._geometry.get_srid(geometry, **kwargs)Return the SRID of a geometry.
func
shapely._geometry.get_type_id(geometry, **kwargs)Return the type ID of a geometry.
func
shapely._geometry.get_x(point, **kwargs)Return the x-coordinate of a point.
func
shapely._geometry.get_y(point, **kwargs)Return the y-coordinate of a point.
func
shapely._geometry.get_z(point, **kwargs)Return the z-coordinate of a point.
func
shapely._geometry.set_srid(geometry, srid, **kwargs)Return a geometry with its SRID set.
class
shapely.constructive.BufferCapStyleEnumeration of buffer cap styles.
class
shapely.constructive.BufferJoinStyleEnumeration of buffer join styles.
func
shapely.constructive.make_valid(geometry, *method='linework', *keep_collapsed=True, **kwargs)Repair invalid geometries.
func
shapely.creation.box(xmin, ymin, xmax, ymax, ccw=True, **kwargs)Create box polygons.
func
shapely.creation.points(coords, y=None, z=None, indices=None, *handle_nan=HandleNaN.allow, *out=None, **kwargs)Create an array of points.
func
shapely.creation.polygons(geometries, holes=None, indices=None, *out=None, **kwargs)Create an array of polygons.
func
shapely.decorators.multithreading_enabled(func)Enable multithreading.
class
shapely.decorators.requires_geosDecorator to require a minimum GEOS version.
class
shapely.errors.DimensionErrorAn error in the number of coordinate dimensions.
class
shapely.errors.TopologicalErrorA geometry is invalid or topologically incorrect.
class
shapely.geometry.base.BaseGeometryProvides GEOS spatial predicates and topological operations.
method
shapely.geometry.base.BaseGeometry.area()Unitless area of the geometry (float).
method
shapely.geometry.base.BaseGeometry.envelope()A figure that envelopes the geometry.
method
shapely.geometry.base.BaseGeometry.geometryType()Get the geometry type (deprecated).
method
shapely.geometry.base.BaseGeometry.is_simple()True if the geometry is simple.
method
shapely.geometry.base.BaseGeometry.is_valid()True if the geometry is valid.
method
shapely.geometry.base.BaseGeometry.svg(scale_factor=1.0, **kwargs)Raise NotImplementedError.
method
shapely.geometry.base.BaseGeometry.type()Get the geometry type (deprecated).
method
shapely.geometry.base.BaseGeometry.union(other, grid_size=None)Return the union of the geometries.
method
shapely.geometry.base.BaseGeometry.wkb()WKB representation of the geometry.
method
shapely.geometry.base.BaseGeometry.wkt()WKT representation of the geometry.
class
shapely.geometry.base.BaseMultipartGeometryBase class for collections of multiple geometries.
method
shapely.geometry.base.BaseMultipartGeometry.coords()Not implemented.
method
shapely.geometry.base.BaseMultipartGeometry.geoms()Access to the contained geometries.
class
shapely.geometry.base.CAP_STYLEBuffer cap styles.
class
shapely.geometry.base.EmptyGeometryAn empty geometry.
class
shapely.geometry.base.JOIN_STYLEBuffer join styles.
func
shapely.geometry.geo.mapping(ob)Return a GeoJSON-like mapping.
class
shapely.geometry.linestring.LineStringA geometry type composed of one or more line segments.
class
shapely.geometry.multilinestring.MultiLineStringA collection of one or more LineStrings.
class
shapely.geometry.multipoint.MultiPointA collection of one or more Points.
class
shapely.geometry.multipolygon.MultiPolygonA collection of one or more Polygons.
class
shapely.geometry.point.PointA geometry type that represents a single coordinate.
method
shapely.geometry.point.Point.m()Return m coordinate.
method
shapely.geometry.point.Point.x()Return x coordinate.
method
shapely.geometry.point.Point.y()Return y coordinate.
method
shapely.geometry.point.Point.z()Return z coordinate.
method
shapely.geometry.polygon.Polygon.coords()Not implemented for polygons.
func
shapely.geometry.polygon.orient(polygon, sign=1.0)Return an oriented polygon.
func
shapely.linear.shared_paths(a, b, **kwargs)Return the shared paths between a and b.
func
shapely.measurement.area(geometry, **kwargs)Compute the area of a (multi)polygon.
func
shapely.ops.transform(func, geom)Apply `func` to all coordinates of `geom`.
func
shapely.ops.validate(geom)Return True if the geometry is valid.
func
shapely.predicates.crosses(a, b, **kwargs)Return True if A and B spatially cross.
func
shapely.predicates.is_prepared(geometry, **kwargs)Return True if a Geometry is prepared.
func
shapely.predicates.is_simple(geometry, **kwargs)Return True if the geometry is simple.
func
shapely.set_operations.coverage_union(a, b, **kwargs)Merge multiple polygons into one.
func
shapely.set_operations.union(a, b, grid_size=None, **kwargs)Merge geometries into one.
class
shapely.strtree.BinaryPredicateThe enumeration of GEOS binary predicates types.
class
shapely.strtree.STRtreeA query-only R-tree spatial index.
method
shapely.strtree.STRtree.nearest(geometry) -> Any | NoneReturn the index of the nearest geometry in the tree.
func
shapely.wkb.dump(ob, fp, hex=False, **kw)Dump a geometry to an open file.
func
shapely.wkb.load(fp, hex=False)Load a geometry from an open file.
func
shapely.wkb.loads(data, hex=False)Load a geometry from a WKB byte string.
func
shapely.wkt.dump(ob, fp, **settings)Dump a geometry to an open file.
func
shapely.wkt.load(fp)Load a geometry from an open file.
func
shapely.wkt.loads(data)Load a geometry from a WKT string.
About this data
These signatures were extracted from the public source of shapely/shapely
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.