# pytac.extensions.grid

Implements the Grid Extension.

class pystac.extensions.grid.GridExtension(item: Item)

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

      >>> item: pystac.Item = ...
      >>> proj_ext = GridExtension.ext(item)

  apply(code: str) → None

    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 latitude band of the datasource.

  classmethod ext(obj: Item, add_if_missing: bool = False) → GridExtension

    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_uri() → str

    Gets the schema URI associated with this extension.

  classmethod get_schema_uris() → list[str]

    Gets a list of schema URIs associated with this extension.

  item: pystac.Item

    The `Item` being extended.

  name: Literal['grid'] = 'grid'
  properties: dict[str, Any]

    The `Item` properties, including extension properties.

class pystac.extensions.grid.GridExtensionHooks
  prev_extension_ids: set[str] = {'https://stac-extensions.github.io/grid/v1.0.0/schema.json'}
  schema_uri: str = 'https://stac-extensions.github.io/grid/v1.1.0/schema.json'
  stac_object_types = {STACObjectType.ITEM}

pystac.extensions.grid.validated_code(v: str) → str

previous

pystac.extensions.file

next

pystac.extensions.hooks