Dataset#
- class datacube.model.Dataset(product, metadata_doc, uris=None, uri=None, sources=None, indexed_by=None, indexed_time=None, archived_time=None, source_tree=None, derived_tree=None)[source]#
A Dataset. A container of metadata, and refers typically to a multi-band raster on disk.
Most important parts are the metadata_doc and uri.
Dataset objects should be constructed by an index driver, or with the datacube.index.hl.Doc2Dataset
- Parameters:
- Members:
- center_time#
mid-point of time range
- extent#
- Returns:
valid extent of the dataset or None
- has_multiple_uris()[source]#
This is a 1.9-2.0 transitional method and will be removed in 2.0.
Returns true if the dataset has multiple locations.
Allows checking for multiple locations without tripping a deprecation warning.
- Return type:
- indexed_by#
The User who indexed this dataset
- property is_archived: bool#
Is this dataset archived?
(an archived dataset is one that is not intended to be used by users anymore: eg. it has been replaced by another dataset. It will not show up in search results, but still exists in the system via provenance chains or through id lookup.)
- legacy_uri(schema=None)[source]#
This is a 1.9-2.0 transitional method and will be removed in 2.0.
If the dataset has only one location, it returns that uri, but if the dataset has multiple locations, it calls various deprecated methods to achieve the legacy behaviour. It is intended for internal core use only.
- property local_uri: str | None#
Return the uri if it is local, or None.
Legacy behaviour: The latest local file uri, if any.
- metadata_doc#
The document describing the dataset as a dictionary. It is often serialised as YAML on disk or inside a NetCDF file, and as JSON-B inside the database index.
- sources#
The datasets that this dataset is derived from (if requested on load).