mapchete.stac module

mapchete.stac.create_prototype_files(mp)
mapchete.stac.tile_directory_stac_item(item_id=None, tile_pyramid=None, zoom_levels=None, item_path=None, asset_basepath=None, relative_paths=False, item_metadata=None, bounds=None, bounds_crs=None, bands_type='image/tiff; application=geotiff', crs_unit_to_meter=1)

Create STAC item from a Tile Directory using the tiled-assets.

Currently only works for one asset.

Parameters
item_idstr

Unique item ID. (required)

tile_pyramidmapchete.tile.BufferedTilePyramid

Tile pyramid of tiled asset. (required)

zoom_levelslist

List of zoom levels. (required)

item_pathstr

Path of stac item.

asset_basepathstr

Base path of asset.

relative_pathsbool

Interpret asset path schema as being relative to item. If not set, one of item_path or asset_basepath has to be set. (default: False)

item_metadatadict

Optional additional item metadata to be appended.

boundslist or tuple

Tile directory bounds. (default: tile_pyramid.bounds)

bounds_crsCRS

CRS of bounds. (default: tile_pyramid.crs)

bands_typestr

Media typ of tile directory tiles. (default: “image/tiff; application=geotiff”)

crs_unit_to_meterint or float

Factor to convert CRS units to meter if tile pyramid grid is not “geodetic” or “mercator”. (default: 1)

Returns
pystac.Item
mapchete.stac.tile_pyramid_from_item(item)
mapchete.stac.update_tile_directory_stac_item(item_id=None, tile_pyramid=None, item_path=None, zoom_levels=None, item=None, bounds=None, item_metadata=None, bands_type=None, crs_unit_to_meter=1)

Create STAC item from a Tile Directory using the tiled-assets.

Currently only works for one asset.

Parameters
item_idstr

Unique item ID. (required)

tile_pyramidmapchete.tile.BufferedTilePyramid

Tile pyramid of tiled asset. (required)

item_pathstr

Path of stac item.

zoom_levelslist

List of zoom levels. (required)

itempystac.Item

Existing Item to be extended. (optional)

asset_basepathstr

Base path of asset.

relative_pathsbool

Interpret asset path schema as being relative to item. If not set, one of item_path or asset_basepath has to be set. (default: False)

item_metadatadict

Optional additional item metadata to be appended.

boundslist or tuple

Tile directory bounds. (default: tile_pyramid.bounds)

bounds_crsCRS

CRS of bounds. (default: tile_pyramid.crs)

bands_typestr

Media typ of tile directory tiles. (default: “image/tiff; application=geotiff”)

crs_unit_to_meterint or float

Factor to convert CRS units to meter if tile pyramid grid is not “geodetic” or “mercator”. (default: 1)

Returns
pystac.Item
mapchete.stac.zoom_levels_from_item(item)