Skip to content

factory

titiler.pgstac.factory

Custom MosaicTiler Factory for PgSTAC Mosaic Backend.

MosaicTilerFactory

Bases: BaseFactory

Custom MosaicTiler for PgSTAC Mosaic Backend.

assets_point

assets_point()

Register assets routes.

assets_tile

assets_tile()

Register assets routes.

map_viewer

map_viewer()

Register /map endpoint.

part

part()

Register /bbox and /feature endpoint.

point

point()

Register point values endpoint.

register_routes

register_routes() -> None

This Method register routes to the router.

statistics

statistics()

Register /statistics endpoint.

tile

tile() -> None

register tiles routes.

tilejson

tilejson() -> None

register tiles routes.

tilesets

tilesets()

Register OGC tilesets endpoints.

wmts

wmts()

Add wmts endpoint.

_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