spatialdata_io.generic

Contents

spatialdata_io.generic#

spatialdata_io.generic(input, data_axes=None, coordinate_system=None)#

Read a generic shapes or image file and save it as SpatialData zarr.

Supported image types: .tif, .tiff, .png, .jpg, .jpeg. Supported shape types: .geojson (only Polygons and MultiPolygons are supported).

Parameters:
  • input (Path) – Path to the input file.

  • data_axes (Sequence[str] | None (default: None)) – Axes of the data for image files, required for image files.

  • coordinate_system (str | None (default: None)) – Coordinate system of the spatial element; if None, the default coordinate system (global) is used.

Return type:

DataArray | GeoDataFrame

Returns:

: Parsed spatial element.