shapely.build_area#
- build_area(geometry, **kwargs)#
Create an areal geometry formed by the constituent linework of given geometry.
Equivalent of the PostGIS ST_BuildArea() function.
- Parameters:
- geometryGeometry or array_like
Geometry or geometries for which to build an area.
- **kwargs
See NumPy ufunc docs for other keyword arguments.
Examples
>>> from shapely import GeometryCollection, Polygon >>> polygon1 = Polygon([(0, 0), (3, 0), (3, 3), (0, 3), (0, 0)]) >>> polygon2 = Polygon([(1, 1), (1, 2), (2, 2), (1, 1)]) >>> build_area(GeometryCollection([polygon1, polygon2])) <POLYGON ((0 0, 0 3, 3 3, 3 0, 0 0), (1 1, 2 2, 1 2, 1 1))>