pytac.extensions.grid#
Implements the Grid Extension.
- class pystac.extensions.grid.GridExtension(item: Item)[source]#
A concrete implementation of
GridExtension
on anItem
that extends the properties of the Item to include properties defined in the Grid Extension.This class should generally not be instantiated directly. Instead, call
GridExtension.ext()
on anItem
to 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.
- 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
Item
being extended.
- name: Literal['grid'] = 'grid'#