Skip to content

factory

titiler.pgstac.factory

Custom MosaicTiler Factory for PgSTAC Mosaic Backend.

MosaicTilerFactory dataclass

Bases: BaseTilerFactory

Custom MosaicTiler for PgSTAC Mosaic Backend.

_assets_routes

_assets_routes()

Register assets routes.

_map_routes

_map_routes()

Register /map endpoint.

_part_routes

_part_routes()

Register /bbox and /feature endpoint.

_point_routes

_point_routes()

Register point values endpoint.

_statistics_routes

_statistics_routes()

Register /statistics endpoint.

_tilejson_routes

_tilejson_routes() -> None

register tiles routes.

_tiles_routes

_tiles_routes() -> None

register tiles routes.

_wmts_routes

_wmts_routes()

Add wmts endpoint.

register_routes

register_routes() -> None

This Method register routes to the router.

_first_value

_first_value(values: List[Any], default: Any = None)

Return the first not None value.

add_search_list_route

add_search_list_route(app: FastAPI, *, prefix: str = '', tags: Optional[List[str]] = None)

Add PgSTAC Search (of type mosaic) listing route.

add_search_register_route

add_search_register_route(app: FastAPI, *, prefix: str = '', search_dependency: Callable[..., Tuple[PgSTACSearch, Metadata]] = SearchParams, tile_dependencies: Optional[List[Callable]] = None, tags: Optional[List[str]] = None)

add /register route

check_query_params

check_query_params(*, dependencies: List[Callable], query_params: Union[QueryParams, Dict]) -> None

Check QueryParams for Query dependency.

  1. get_dependant is used to get the query-parameters required by the callable
  2. we use request_params_to_args to construct arguments needed to call the callable
  3. we call the callable and catch any errors

Important: We assume the callable in not a co-routine