pystac.extensions.xarray_assets#
Implements the Xarray Assets Extension.
- class pystac.extensions.xarray_assets.AssetXarrayAssetsExtension(asset: Asset)[source]#
A concrete implementation of
XarrayAssetsExtension
on anAsset
that 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 anAsset
to extend it.- additional_read_properties: list[dict[str, Any]] | None = None#
Additional read-only properties accessible from the extended object.
These are used when extending an
Asset
to give access to the properties of the owningItem
. If a property exists in bothadditional_read_properties
andproperties
, the value inadditional_read_properties
will take precedence.
- class pystac.extensions.xarray_assets.CollectionXarrayAssetsExtension(collection: Collection)[source]#
A concrete implementation of
XarrayAssetsExtension
on aCollection
that 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 anCollection
to extend it.- collection: pystac.Collection#
- class pystac.extensions.xarray_assets.ItemXarrayAssetsExtension(item: Item)[source]#
A concrete implementation of
XarrayAssetsExtension
on anItem
that 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 anItem
to extend it.- item: pystac.Item#
- class pystac.extensions.xarray_assets.XarrayAssetsExtension[source]#
An abstract class that can be used to extend the properties of a
Collection
,Item
, orAsset
with 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
,Item
orAsset
.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- name: Literal['xarray'] = 'xarray'#