Product#

class datacube.model.Product(metadata_type, definition, id_=None)[source]#

Product definition

Parameters:
canonical_measurement(measurement)[source]#

resolve measurement alias into canonical name

Return type:

str

definition#

product definition document

property dimensions: Tuple[str, str, str]#

List of dimension labels for data in this product

property extra_dimensions: ExtraDimensions#

Dictionary of metadata for the third dimension.

grid_spec#

Grid specification for this product

load_hints()[source]#

Returns dictionary with keys compatible with dc.load(..) named arguments: :rtype: Dict[str, Any]

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.

lookup_measurements(measurements=None)[source]#

Find measurements by name

Parameters:

measurements (Union[Iterable[str], str, None]) – list of measurement names or a single measurement name, or None to get all

Return type:

Mapping[str, Measurement]

property measurements: Mapping[str, Measurement]#

Dictionary of measurements in this product

to_dict()[source]#

Convert to a dictionary representation of the available fields

Return type:

Mapping[str, Any]

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 (Mapping[str, Any]) – Dimension definition dict, typically retrieved from the product definition’s extra_dimensions field.