Skip to content

backend

titiler.pgstac.backend

TiTiler.PgSTAC custom Mosaic Backend and Custom STACReader.

PGSTACBackend

Bases: BaseBackend

PgSTAC Mosaic Backend.

__attrs_post_init__

__attrs_post_init__() -> None

Post Init.

_read

_read() -> MosaicJSON

This method is not used but is required by the abstract class.

assets_for_bbox

assets_for_bbox(xmin: float, ymin: float, xmax: float, ymax: float, coord_crs: CRS = WGS84_CRS, **kwargs: Any) -> List[Dict]

Retrieve assets for bbox.

assets_for_point

assets_for_point(lng: float, lat: float, coord_crs: CRS = WGS84_CRS, **kwargs: Any) -> List[Dict]

Retrieve assets for point.

assets_for_tile

assets_for_tile(x: int, y: int, z: int, **kwargs: Any) -> List[Dict]

Retrieve assets for tile.

feature

feature(shape: Dict, dst_crs: Optional[CRS] = None, shape_crs: CRS = WGS84_CRS, max_size: int = 1024, scan_limit: Optional[int] = None, items_limit: Optional[int] = None, time_limit: Optional[int] = None, exitwhenfull: Optional[bool] = None, skipcovered: Optional[bool] = None, **kwargs: Any) -> Tuple[ImageData, List[str]]

Create an Image from multiple items for a GeoJSON feature.

get_assets

get_assets(geom: Geometry, fields: Optional[Dict[str, Any]] = None, scan_limit: Optional[int] = None, items_limit: Optional[int] = None, time_limit: Optional[int] = None, exitwhenfull: Optional[bool] = None, skipcovered: Optional[bool] = None) -> List[Dict]

Find assets.

part

part(bbox: BBox, dst_crs: Optional[CRS] = None, bounds_crs: CRS = WGS84_CRS, scan_limit: Optional[int] = None, items_limit: Optional[int] = None, time_limit: Optional[int] = None, exitwhenfull: Optional[bool] = None, skipcovered: Optional[bool] = None, **kwargs: Any) -> Tuple[ImageData, List[str]]

Create an Image from multiple items for a bbox.

point

point(lon: float, lat: float, coord_crs: CRS = WGS84_CRS, scan_limit: Optional[int] = None, items_limit: Optional[int] = None, time_limit: Optional[int] = None, exitwhenfull: Optional[bool] = None, skipcovered: Optional[bool] = None, **kwargs: Any) -> List

Get Point value from multiple observation.

tile

tile(tile_x: int, tile_y: int, tile_z: int, scan_limit: Optional[int] = None, items_limit: Optional[int] = None, time_limit: Optional[int] = None, exitwhenfull: Optional[bool] = None, skipcovered: Optional[bool] = None, **kwargs: Any) -> Tuple[ImageData, List[str]]

Get Tile from multiple observation.

update

update() -> None

We overwrite the default method.

write

write(overwrite: bool = True) -> None

This method is not used but is required by the abstract class.

multi_points_pgstac

multi_points_pgstac(asset_list: Sequence[Dict[str, Any]], reader: Callable[..., PointData], *args: Any, threads: int = MAX_THREADS, allowed_exceptions: Optional[Tuple] = None, **kwargs: Any) -> Dict

Merge values returned from tasks.

Custom version of rio_tiler.task.multi_values which use constructed item_id as dict key.