spatialdata.to_polygons

Contents

spatialdata.to_polygons#

spatialdata.to_polygons(data, buffer_resolution=None)#

Convert a set of geometries (2D labels, 2D shapes) to approximated 2D polygons/multypolygons.

Parameters:
  • data (Union[DataArray, DataTree, GeoDataFrame, DataFrame]) – The SpatialElement representing the geometries to approximate as 2D polygons/multipolygons.

  • buffer_resolution (Optional[int] (default: None)) – Used only when constructing polygons from circles. Value of the resolution parement for the buffer() internal call.

Return type:

GeoDataFrame

Returns:

: The approximated 2D polygons/multipolygons in the specified coordinate system.