pytac.extensions.grid#
Implements the Grid Extension.
- class pystac.extensions.grid.GridExtension(item: Item)[source]#
A concrete implementation of
GridExtensionon anItemthat extends the properties of the Item to include properties defined in the Grid Extension.This class should generally not be instantiated directly. Instead, call
ext()on anItemto extend it.>>> item: pystac.Item = ... >>> proj_ext = GridExtension.ext(item)
- apply(code: str) None[source]#
Applies Grid extension properties to the extended Item.
- Parameters:
code – REQUIRED. The code of the Item’s grid location.
- property code: str | None#
Get or sets the grid code of the datasource.
- classmethod ext(obj: Item, add_if_missing: bool = False) GridExtension[source]#
Extends the given STAC Object with properties from the Grid Extension.
This extension can be applied to instances of
Item.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- classmethod get_schema_uris() list[str][source]#
Gets a list of schema URIs associated with this extension.
- item: pystac.Item#
The
Itembeing extended.
- name: Literal['grid'] = 'grid'#