pystac.extensions.view#

Implement the View Geometry Extension.

class pystac.extensions.view.AssetViewExtension(asset: Asset)[source]#

A concrete implementation of ViewExtension on an Asset that 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 an Asset to extend it.

additional_read_properties: Iterable[dict[str, Any]] | None = None#

If present, this will be a list containing 1 dictionary representing the properties of the owning Item.

asset_href: str#

The href value of the Asset being extended.

properties: dict[str, Any]#

The Asset fields, including extension properties.

class pystac.extensions.view.ItemAssetsViewExtension(item_asset: AssetDefinition)[source]#
asset_defn: item_assets.AssetDefinition#
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.

class pystac.extensions.view.ItemViewExtension(item: Item)[source]#

A concrete implementation of ViewExtension on an Item that 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 an Item to extend it.

item: pystac.Item#

The Item being extended.

properties: dict[str, Any]#

The Item properties, including extension properties.

class pystac.extensions.view.SummariesViewExtension(collection: Collection)[source]#

A concrete implementation of SummariesExtension that extends the summaries field of a Collection to include properties defined in the View Object Extension.

property azimuth: RangeSummary[float] | None#

Get or sets the summary of ViewExtension.azimuth values for this Collection.

property incidence_angle: RangeSummary[float] | None#

Get or sets the summary of ViewExtension.incidence_angle values for this Collection.

property off_nadir: RangeSummary[float] | None#

Get or sets the summary of ViewExtension.off_nadir values for this Collection.

summaries: Summaries#

The summaries for the Collection being extended.

property sun_azimuth: RangeSummary[float] | None#

Get or sets the summary of ViewExtension.sun_azimuth values for this Collection.

property sun_elevation: RangeSummary[float] | None#

Get or sets the summary of ViewExtension.sun_elevation values for this Collection.

class pystac.extensions.view.ViewExtension[source]#

An abstract class that can be used to extend the properties of an Item with 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 the ViewExtension.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 Item or Asset.

Raises:

pystac.ExtensionTypeError – If an invalid object type is passed.

classmethod get_schema_uri() str[source]#

Gets the schema URI associated with this extension.

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).

class pystac.extensions.view.ViewExtensionHooks[source]#
prev_extension_ids = {'view'}#
schema_uri = 'https://stac-extensions.github.io/view/v1.0.0/schema.json'#
stac_object_types = {STACObjectType.ITEM}#