pystac.extensions.view#
Implement the View Geometry Extension.
- class pystac.extensions.view.AssetViewExtension(asset: Asset)[source]#
A concrete implementation of
ViewExtensionon anAssetthat extends the Asset fields to include properties defined in the View Geometry Extension.This class should generally not be instantiated directly. Instead, call
ViewExtension.ext()on anAssetto extend it.
- class pystac.extensions.view.ItemAssetsViewExtension(item_asset: ItemAssetDefinition)[source]#
- asset_defn: ItemAssetDefinition#
- 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.view.ItemViewExtension(item: Item)[source]#
A concrete implementation of
ViewExtensionon anItemthat extends the properties of the Item to include properties defined in the View Geometry Extension.This class should generally not be instantiated directly. Instead, call
ViewExtension.ext()on anItemto extend it.
- class pystac.extensions.view.SummariesViewExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtensionthat extends thesummariesfield of aCollectionto include properties defined in the View Object Extension.- property azimuth: RangeSummary[float] | None#
Get or sets the summary of
ViewExtension.azimuthvalues for this Collection.
- property incidence_angle: RangeSummary[float] | None#
Get or sets the summary of
ViewExtension.incidence_anglevalues for this Collection.
- property off_nadir: RangeSummary[float] | None#
Get or sets the summary of
ViewExtension.off_nadirvalues for this Collection.
- property sun_azimuth: RangeSummary[float] | None#
Get or sets the summary of
ViewExtension.sun_azimuthvalues for this Collection.
- property sun_elevation: RangeSummary[float] | None#
Get or sets the summary of
ViewExtension.sun_elevationvalues for this Collection.
- class pystac.extensions.view.T#
Generalized version of
Item,AssetorItemAssetDefinitionalias of TypeVar(‘T’, ~pystac.item.Item, ~pystac.asset.Asset, ~pystac.item_assets.ItemAssetDefinition)
- class pystac.extensions.view.ViewExtension[source]#
An abstract class that can be used to extend the properties of an
Itemwith properties from the View Geometry Extension. This class is generic over the type of STAC Object to be extended (e.g.Item,Asset).To create a concrete instance of
ViewExtension, use theViewExtension.ext()method. For example:>>> item: pystac.Item = ... >>> view_ext = ViewExtension.ext(item)
- apply(off_nadir: float | None = None, incidence_angle: float | None = None, azimuth: float | None = None, sun_azimuth: float | None = None, sun_elevation: float | None = None) None[source]#
Applies View Geometry extension properties to the extended
Item.- Parameters:
off_nadir – The angle from the sensor between nadir (straight down) and the scene center. Measured in degrees (0-90).
incidence_angle – The incidence angle is the angle between the vertical (normal) to the intercepting surface and the line of sight back to the satellite at the scene center. Measured in degrees (0-90).
azimuth – Viewing azimuth angle. The angle measured from the sub-satellite point (point on the ground below the platform) between the scene center and true north. Measured clockwise from north in degrees (0-360).
sun_azimuth – Sun azimuth angle. From the scene center point on the ground, this is the angle between truth north and the sun. Measured clockwise in degrees (0-360).
sun_elevation – Sun elevation angle. The angle from the tangent of the scene center point to the sun. Measured from the horizon in degrees (0-90).
- property azimuth: float | None#
Get or sets the viewing azimuth angle.
The angle measured from the sub-satellite point (point on the ground below the platform) between the scene center and true north. Measured clockwise from north in degrees (0-360).
- classmethod ext(obj: T, add_if_missing: bool = False) ViewExtension[T][source]#
Extends the given STAC Object with properties from the View Geometry Extension.
This extension can be applied to instances of
ItemorAsset.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- property incidence_angle: float | None#
Get or sets the incidence angle is the angle between the vertical (normal) to the intercepting surface and the line of sight back to the satellite at the scene center. Measured in degrees (0-90).
- name: Literal['view'] = 'view'#
- property off_nadir: float | None#
Get or sets the angle from the sensor between nadir (straight down) and the scene center. Measured in degrees (0-90).
- classmethod summaries(obj: Collection, add_if_missing: bool = False) SummariesViewExtension[source]#
Returns the extended summaries object for the given collection.
- property sun_azimuth: float | None#
Get or sets the sun azimuth angle.
From the scene center point on the ground, this is the angle between truth north and the sun. Measured clockwise in degrees (0-360).
- property sun_elevation: float | None#
Get or sets the sun elevation angle. The angle from the tangent of the scene center point to the sun. Measured from the horizon in degrees (0-90).