pystac.extensions.sat#
Implements the Satellite Extension.
- class pystac.extensions.sat.AssetSatExtension(asset: Asset)[source]#
A concrete implementation of
SatExtension
on anAsset
that extends the properties of the Asset to include properties defined in the Satellite Extension.This class should generally not be instantiated directly. Instead, call
SatExtension.ext()
on anAsset
to extend it.
- class pystac.extensions.sat.ItemSatExtension(item: Item)[source]#
A concrete implementation of
SatExtension
on anItem
that extends the properties of the Item to include properties defined in the Satellite Extension.This class should generally not be instantiated directly. Instead, call
SatExtension.ext()
on anItem
to extend it.
- class pystac.extensions.sat.OrbitState(value)[source]#
An enumeration.
- ASCENDING = 'ascending'#
- DESCENDING = 'descending'#
- GEOSTATIONARY = 'geostationary'#
- class pystac.extensions.sat.SatExtension(*args, **kwds)[source]#
An abstract class that can be used to extend the properties of an
Item
orAsset
with properties from the Satellite Extension. This class is generic over the type of STAC Object to be extended (e.g.Item
,Collection
).To create a concrete instance of
SatExtension
, use theSatExtension.ext()
method. For example:>>> item: pystac.Item = ... >>> sat_ext = SatExtension.ext(item)
- apply(orbit_state: OrbitState | None = None, relative_orbit: int | None = None, absolute_orbit: int | None = None, platform_international_designator: str | None = None, anx_datetime: datetime | None = None) None [source]#
Applies ext extension properties to the extended
Item
or class:~pystac.Asset.Must specify at least one of orbit_state or relative_orbit in order for the sat extension to properties to be valid.
- Parameters:
orbit_state – Optional state of the orbit. Either ascending or descending for polar orbiting satellites, or geostationary for geosynchronous satellites.
relative_orbit – Optional non-negative integer of the orbit number at the time of acquisition.
- classmethod ext(obj: T, add_if_missing: bool = False) SatExtension[T] [source]#
Extends the given STAC Object with properties from the Satellite Extension.
This extension can be applied to instances of
Item
orAsset
.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- property orbit_state: OrbitState | None#
Get or sets an orbit state of the object.
- property platform_international_designator: str | None#
Gets or sets the International Designator, also known as COSPAR ID, and NSSDCA ID.
- properties: Dict[str, Any]#
The properties that this extension wraps.
The extension which implements PropertiesExtension can use
_get_property
and_set_property
to get and set values on this instance. Note that _set_properties mutates the properties directly.
- classmethod summaries(obj: Collection, add_if_missing: bool = False) SummariesSatExtension [source]#
Returns the extended summaries object for the given collection.
- class pystac.extensions.sat.SatExtensionHooks[source]#
- prev_extension_ids = {'sat'}#
- stac_object_types = {STACObjectType.ITEM}#
- class pystac.extensions.sat.SummariesSatExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtension
that extends thesummaries
field of aCollection
to include properties defined in the Satellite Extension.- property orbit_state: List[OrbitState] | None#
Get or sets the summary of
SatExtension.orbit_state
values for this Collection.
- property platform_international_designator: List[str] | None#
Get or sets the summary of
SatExtension.platform_international_designator
values for this Collection.
- summaries: Summaries#
The summaries for the
Collection
being extended.