cuspa.io.from_spatialdata#
- cuspa.io.from_spatialdata(
- sdata: Any,
- shape_key: str,
- *,
- dtype: Any = None,
Convert a SpatialData ShapesModel element to
Polygons.- Parameters:
- sdata
A
spatialdata.SpatialDataobject.- shape_key
Name of a shapes element.
sdata[shape_key]must be a GeoDataFrame whosegeometrycolumn contains ShapelyPolygongeometries.- dtype
Floating-point dtype for the coordinate tensor. Defaults to
cupy.float32.
- Returns: