pystac.extensions.view#
Implement the View Geometry Extension.
- class pystac.extensions.view.AssetViewExtension(asset: Asset)[source]#
A concrete implementation of
ViewExtension
on anAsset
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 anAsset
to extend it.
- class pystac.extensions.view.ItemViewExtension(item: Item)[source]#
A concrete implementation of
ViewExtension
on anItem
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 anItem
to extend it.
- class pystac.extensions.view.SummariesViewExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtension
that extends thesummaries
field of aCollection
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(*args, **kwds)[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 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
Item
orAsset
.- 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).
- 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).
- 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) SummariesViewExtension [source]#
Returns the extended summaries object for the given collection.