Dataset Type¶
- class datacube.model.DatasetType(metadata_type, definition, id_=None)[source]¶
Product definition
- Parameters
metadata_type (MetadataType) –
definition (dict) –
Methods:
canonical_measurement
(measurement)resolve measurement alias into canonical name
Returns dictionary with keys compatible with
dc.load(..)
named arguments:lookup_measurements
([measurements])Find measurements by name.
to_dict
()Convert to a dictionary representation of the available fields.
validate_extra_dims
(definition)Validate 3D metadata in the product definition.
Attributes:
product definition document
List dimension labels for data in this product.
Return dictionary of metadata for the third dimension.
Return Grid specification for this product.
Return dictionary of measurements in this product.
- canonical_measurement(measurement)[source]¶
resolve measurement alias into canonical name
- Return type
- definition¶
product definition document
- property dimensions: Tuple[str, str, str]¶
List dimension labels for data in this product.
- property extra_dimensions: Mapping[str, datacube.model.Measurement]¶
Return dictionary of metadata for the third dimension.
- Return type
- grid_spec¶
Return Grid specification for this product.
- load_hints()[source]¶
Returns dictionary with keys compatible with
dc.load(..)
named arguments:output_crs - CRS resolution - Tuple[float, float] align - Tuple[float, float] (if defined)
Returns {} if load hints are not defined on this product, or defined with errors.
- property measurements: Mapping[str, datacube.model.Measurement]¶
Return dictionary of measurements in this product.
- Return type
- static validate_extra_dims(definition)[source]¶
Validate 3D metadata in the product definition.
- Perform some basic checks for validity of the 3D dataset product definition:
Checks extra_dimensions section exists
For each 3D measurement, check if the required dimension is defined
If the 3D spectral_definition is defined: - Check there’s one entry per coordinate. - Check that wavelength and response are the same length.
- Parameters
definition (
dict
) – Dimension definition dict, typically retrieved from the product definition’s extra_dimensions field.