Skip to content

reader

titiler.pgstac.reader

Custom STAC reader.

PgSTACReader

Bases: STACReader

Custom version of rio_tiler.io.STACReader.

Only accept pystac.Item as input (while rio_tiler.io.STACReader accepts url or pystac.Item)

__attrs_post_init__

__attrs_post_init__()

Check Item properties and get list of valid assets.

SimpleSTACReader

Bases: MultiBaseReader

Simplified STAC Reader.

Inputs should be in form of:

{
    "id": "IAMASTACITEM",
    "collection": "mycollection",
    "bbox": (0, 0, 10, 10),
    "assets": {
        "COG": {
            "href": "https://somewhereovertherainbow.io/cog.tif"
        }
    }
}

__attrs_post_init__

__attrs_post_init__() -> None

Set reader spatial infos and list of valid assets.

_get_asset_info

_get_asset_info(asset: str) -> AssetInfo

Validate asset names and return asset's url.

Parameters:

  • asset (str) –

    STAC asset name.

Returns:

  • str ( AssetInfo ) –

    STAC asset href.