Geometry¶
Utility geometry operations functions.
Functions¶
¶
Merges geometries from a GeoDataFrame into a single MultiPolygon.
Input geometries are expected to be disjointed.
PARAMETER | DESCRIPTION |
---|---|
gdf |
GeoDataFrame with geometries to merge.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
MultiPolygon
|
Merged polygon
TYPE:
|
Source code in srai/geometry.py
¶
Flatten all geometries from a series into a list of BaseGeometries.
Source code in srai/geometry.py
¶
Flatten all geometries into a list of BaseGeometries.
Source code in srai/geometry.py
¶
Merges all polygons into a single MultiPolygon.
Input polygons are expected to be disjointed.
PARAMETER | DESCRIPTION |
---|---|
polygons |
List of polygons to merge
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
MultiPolygon
|
Merged polygon
TYPE:
|
Source code in srai/geometry.py
¶
Close polygon holes by limitation to the exterior ring.
PARAMETER | DESCRIPTION |
---|---|
geometry |
Polygon to close.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Polygon
|
Closed polygon.
TYPE:
|
Source code in srai/geometry.py
¶
Buffer geometry by a given radius in meters.
Projects geometry into azimuthal projection before applying buffer and then changes values back to WGS84 coordinates.
Doesn't work with polygons covering the whole earth (from -180 to 180 longitude).
PARAMETER | DESCRIPTION |
---|---|
geometry |
Geometry to buffer.
TYPE:
|
meters |
Radius distance in meters.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
BaseGeometry
|
Buffered geometry.
TYPE:
|