pystac.extensions.xarray_assets#
Implements the Xarray Assets Extension.
- class pystac.extensions.xarray_assets.AssetXarrayAssetsExtension(asset: Asset)[source]#
A concrete implementation of
XarrayAssetsExtensionon anAssetthat extends the Asset fields to include properties defined in the XarrayAssets Extension.This class should generally not be instantiated directly. Instead, call
XarrayAssetsExtension.ext()on anAssetto extend it.- additional_read_properties: Iterable[dict[str, Any]] | None = None#
Additional read-only properties accessible from the extended object.
These are used when extending an
Assetto give access to the properties of the owningItem. If a property exists in bothadditional_read_propertiesandproperties, the value inadditional_read_propertieswill take precedence.
- property open_kwargs: dict[str, Any] | None#
Additional keywords for opening the dataset
- properties: dict[str, Any]#
The properties that this extension wraps.
The extension which implements PropertiesExtension can use
_get_propertyand_set_propertyto get and set values on this instance. Note that _set_properties mutates the properties directly.
- property storage_options: dict[str, Any] | None#
Additional keywords for accessing the dataset from remote storage
- class pystac.extensions.xarray_assets.CollectionXarrayAssetsExtension(collection: Collection)[source]#
A concrete implementation of
XarrayAssetsExtensionon aCollectionthat extends the properties of the Item to include properties defined in the XarrayAssets Extension.This class should generally not be instantiated directly. Instead, call
XarrayAssetsExtension.ext()on anCollectionto extend it.- collection: Collection#
- properties: dict[str, Any]#
The properties that this extension wraps.
The extension which implements PropertiesExtension can use
_get_propertyand_set_propertyto get and set values on this instance. Note that _set_properties mutates the properties directly.
- class pystac.extensions.xarray_assets.ItemXarrayAssetsExtension(item: Item)[source]#
A concrete implementation of
XarrayAssetsExtensionon anItemthat extends the properties of the Item to include properties defined in the XarrayAssets Extension.This class should generally not be instantiated directly. Instead, call
XarrayAssetsExtension.ext()on anItemto extend it.- properties: dict[str, Any]#
The properties that this extension wraps.
The extension which implements PropertiesExtension can use
_get_propertyand_set_propertyto get and set values on this instance. Note that _set_properties mutates the properties directly.
- class pystac.extensions.xarray_assets.T#
Generalized version of
Collection,Item, orAssetalias of TypeVar(‘T’, ~pystac.collection.Collection, ~pystac.item.Item, ~pystac.asset.Asset)
- class pystac.extensions.xarray_assets.XarrayAssetsExtension[source]#
An abstract class that can be used to extend the properties of a
Collection,Item, orAssetwith properties from the Xarray Assets Extension. This class is generic over the type of STAC Object to be extended (e.g.Item,Asset).To create a concrete instance of
XarrayAssetsExtension, use theXarrayAssetsExtension.ext()method. For example:>>> item: pystac.Item = ... >>> xr_ext = XarrayAssetsExtension.ext(item)
- classmethod ext(obj: T, add_if_missing: bool = False) XarrayAssetsExtension[T][source]#
Extend the given STAC Object with properties from the XarrayAssets Extension.
This extension can be applied to instances of
Collection,ItemorAsset.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- name: Literal['xarray'] = 'xarray'#