spatialdata.to_circles#
- spatialdata.to_circles(data)#
Convert a set of geometries (2D/3D labels, 2D shapes) to approximated circles/spheres.
- Parameters:
data (
Union
[SpatialImage
,MultiscaleSpatialImage
,GeoDataFrame
,DataFrame
]) – The SpatialElement representing the geometries to approximate as circles/spheres.- Return type:
- Returns:
: The approximated circles/spheres.
Notes
The approximation is done by computing the centroids and the area/volume of the geometries. The geometries are then replaced by circles/spheres with the same centroids and area/volume.