Data formats (advanced)#
The SpatialData format is defined as a set of versioned subclasses of spatialdata._io.format.SpatialDataFormat
, one per type of element.
These classes are useful to ensure backward compatibility whenever a major version change is introduced. We also provide pointers to the latest format.
- spatialdata._io.format.CurrentRasterFormat#
alias of
RasterFormatV01
- class spatialdata._io.format.RasterFormatV01#
Bases:
SpatialDataFormat
Formatter for raster data.
- init_store(path, mode='r')#
Not ideal. Stores should remain hidden TODO: could also check dimension_separator
- Return type:
FSStore
- validate_coordinate_transformations(ndim, nlevels, coordinate_transformations=None)#
Validate that a list of dicts contains a ‘scale’ transformation.
Raises ValueError if no ‘scale’ found or doesn’t match ndim :type ndim:
int
:param ndim:Number of image dimensions.- Return type:
None
- spatialdata._io.format.CurrentShapesFormat#
alias of
ShapesFormatV02
- class spatialdata._io.format.ShapesFormatV01#
Bases:
SpatialDataFormat
Formatter for shapes.
- init_store(path, mode='r')#
Not ideal. Stores should remain hidden TODO: could also check dimension_separator
- Return type:
FSStore
- validate_coordinate_transformations(ndim, nlevels, coordinate_transformations=None)#
Validates that a list of dicts contains a ‘scale’ transformation
Raises ValueError if no ‘scale’ found or doesn’t match ndim.
- Parameters:
ndim (
int
) – Number of image dimensions.- Return type:
None
- class spatialdata._io.format.ShapesFormatV02#
Bases:
SpatialDataFormat
Formatter for shapes.
- init_store(path, mode='r')#
Not ideal. Stores should remain hidden TODO: could also check dimension_separator
- Return type:
FSStore
- validate_coordinate_transformations(ndim, nlevels, coordinate_transformations=None)#
Validates that a list of dicts contains a ‘scale’ transformation
Raises ValueError if no ‘scale’ found or doesn’t match ndim.
- Parameters:
ndim (
int
) – Number of image dimensions.- Return type:
None
- spatialdata._io.format.CurrentPointsFormat#
alias of
PointsFormatV01
- class spatialdata._io.format.PointsFormatV01#
Bases:
SpatialDataFormat
Formatter for points.
- init_store(path, mode='r')#
Not ideal. Stores should remain hidden TODO: could also check dimension_separator
- Return type:
FSStore
- validate_coordinate_transformations(ndim, nlevels, coordinate_transformations=None)#
Validates that a list of dicts contains a ‘scale’ transformation
Raises ValueError if no ‘scale’ found or doesn’t match ndim.
- Parameters:
ndim (
int
) – Number of image dimensions.- Return type:
None
- spatialdata._io.format.CurrentTablesFormat#
alias of
TablesFormatV01
- class spatialdata._io.format.TablesFormatV01#
Bases:
SpatialDataFormat
Formatter for the table.
- init_store(path, mode='r')#
Not ideal. Stores should remain hidden TODO: could also check dimension_separator
- Return type:
FSStore
- validate_coordinate_transformations(ndim, nlevels, coordinate_transformations=None)#
Validates that a list of dicts contains a ‘scale’ transformation
Raises ValueError if no ‘scale’ found or doesn’t match ndim.
- Parameters:
ndim (
int
) – Number of image dimensions.- Return type:
None