Geometric Objects |
Object. Area |
Returns the area (float) of the object. |
|
Object. bounds |
Returns A (Minx, Miny, Maxx, Maxy) tuple (float values) that bounds the object. |
|
Object. length |
Returns the length (float) of the object. |
|
Object. Geom_type |
Returns a string specifying the Geometry Type |
|
object. Distance (Other) |
Returns the minimum distance (float) to the other geometric object. |
|
object. Representative_point () |
Returns a cheaply computed point, is guaranteed to be within the geometric object. |
|
|
|
|
Unary predicates |
Object. has_z |
Returns True If the feature have not only x and y, but also z coordinates for 3D (or so-called, 2.5D) geometries. |
|
Object. IS_CCW |
Returns True If coordinates is in the counter-clockwise order (bounding a region with positive signed area). This method applies to linearring objects only |
|
Object. Is_empty |
Returns True If the feature ' s interior and boundary (in point set terms) are coincide with the empty set. |
|
Object. is_ring |
Returns True If the feature is closed. A closed feature ' s boundary coincides with the empty set. |
|
Object. Is_simple |
Returns True If the feature does not cross itself. |
|
Object. Is_valid |
Returns True If a feature is ' valid ' in the sense of [1]. |
|
|
|
|
| Binary predicates |
object. almost_equals (Other [, decimal=6]) |
Returns True If the object is approximately equal to the other at all points to specified decimal place Precision. |
|
object. contains (Other) |
Returns True If the object ' s interior contains the boundary and interior of the other object an D Their boundaries do not touch @ all. |
|
object. crosses (Other) |
Returns True If the interior of the object intersects the interior of the other but does not contain I T, and the dimension of the intersection are less than the dimension of the one or the other. |
|
object. disjoint (Other) |
Returns True If the boundary and interior of the object do not intersect at all with those of the other. |
|
object. equals (Other) |
Returns True If the set-theoretic boundary, interior, and exterior of the object coincide wit H those of the other. |
|
object. intersects (Other) |
Returns True If the boundary and interior of the object intersect in any of the . |
|
object. touches (Other) |
Returns True If the objects has at least one point in common and their interiors does not intersect with any part of the OT Her. |
|
object. within (Other) |
Returns True If the object ' s boundary and interior intersect only with the interior of the othe R (not its boundary or exterior). |
|
|
|
|
| De-9im relationships |
object. Relate (Other) |
Returns a string representation of the De-9im matrix of relationships between an object ' s interior, boundary< /c4>, exterior and those of another geometric object. |
|
|
|
|
| Set-theoretic Methods |
Object. Boundary |
Returns a lower dimensional object representing the object ' s set-theoretic boundary. |
|
Object. centroid |
Returns a representation of the object ' s geometric centroid (point). |
|
object. difference (Other) |
Returns a representation of the points making up this geometric object that does not make to the other object. |
|
object. intersection (Other) |
Returns a representation of the intersection of this object with the other geometric object. |
|
object. symmetric_difference (Other) |
Returns a representation of the points in this object isn't in the other geometric object, and the points in the other the This geometric object. |
|
object. Union (Other) |
Returns a representation of the Union of points from this object and the other geometric object. |
|
|
|
|
| Constructive Methods |
object. Buffer (distance, resolution=16, cap_style=1, join_style=1, mitre_limit=1.0) |
Returns an approximate representation of all points within a given distance of the that this geometric object. |
|
Object. Convex_hull |
Returns a representation of the smallest convex Polygon containing all the points in the object unless the numb Er of points in the object was less than three. |
|
Object. Envelope |
Returns a representation of the point or smallest rectangular polygon (with sides parallel to the coordinate axes) that CO Ntains the object. |
|
object. Parallel_offset (distance, side, resolution=16, join_style=1, mitre_limit=1.0) |
Returns a LineString or multilinestring geometry at a distance from the object to its right or its left side. |
|
object. Simplify (tolerance, preserve_topology=true) |
Returns a simplified representation of the geometric object. |
|
|
|
|
| Affine transformations |
shapely.affinity. Affine_transform (geom, matrix) |
Returns a transformed geometry using an affine transformation matrix. |
|
shapely.affinity. Rotate (geom, angle, origin= ' center ', Use_radians=false) |
Returns a rotated geometry on a 2D plane. |
|
shapely.affinity. Scale (geom, xfact=1.0, yfact=1.0, zfact=1.0, origin= ' center ') |
Returns a scaled geometry, scaled by factors along each dimension. |
|
shapely.affinity. Skew (geom, xs=0.0, ys=0.0, origin= ' center ', use_radians=false) |
Returns a skewed geometry, sheared by angles along X and y dimensions. |
|
shapely.affinity. Translate (geom, xoff=0.0, yoff=0.0, zoff=0.0) |
Returns a translated geometry shifted by offsets along each dimension. |
|
Shapely.ops. Transform (func, geom) |
Applies func to all coordinates of Geom and returns a new geometry of the same type from the transformed Coordinates. |
|
|
|
|
| Merging Linear Features |
Shapely.ops. polygonize (lines) |
Returns an iterator through polygons constructed from the input lines. |
|
Shapely.ops. polygonize_full (lines) |
Creates polygons from a source of lines, returning the polygons and leftover geometries. |
|
Shapely.ops. Linemerge (lines) |
Returns a LineString or multilinestring representing the merger of all contiguous elements of lines< /c8>. |
|
|
|
|
| Cascading unions |
Shapely.ops. cascaded_union (geoms) |
Returns a representation of the Union of the given geometric objects. |
|
Shapely.ops. unary_union (geoms) |
Returns a representation of the Union of the given geometric objects. |
|
|
|
|
| Prepared Geometry Operations |
prepared. Prep (ob) |
Creates and returns a prepared geometric object. |
|
|
|
|
| Diagnostics |
Validation.explain_validity (OB) |
Returns a string explaining the validity or invalidity of the object. |
|
|
|
|
| Interoperation--well-known Formats |
Object. wkb.encode (' hex ') |
A well known Text (WKT) or well known Binary (WKB) representation [1] of any geometric object can be had Via its wkt or wkb attribute. |
|
Object. wkt |
|
|
SHAPELY.WKB. dumps (ob) |
Returns a WKB representation of ob. |
|
SHAPELY.WKB. loads (wkb) |
Returns a geometric object from a WKB representation WKB. |
|
shapely.wkt. dumps (ob) |
Returns a WKT representation of ob. |
|
shapely.wkt. loads (wkt) |
Returns a geometric object from a WKT representation WKT. |
|
|
|
|
interoperation--Numpy and Python Arrays |
Shapely.geometry. Asshape () |
Family of functions can be used to wrap Numpy coordinate arrays so this they can then is analyzed using shapely while main Taining their original storage |
|
|
|
|
interoperation--Python Geo Interface |
Shapely.geometry. Asshape (context) |
Adapts the context to a geometry interface. The coordinates remain stored in the context. |
|
Shapely.geometry. Shape (context) |
Returns a new, independent geometry with coordinates copied from the context. |
|
Shapely.geometry. Mapping (ob) |
Returns a new, independent geometry with coordinates copied from the context. |
|
|
|
|
|
|
|