Skip to content

model

titiler.pgstac.model

Titiler.pgstac models.

Note: This is mostly a copy of github.com/stac-utils/stac-fastapi/blob/master/stac_fastapi/pgstac/stac_fastapi/pgstac/types/search.py

Context

Bases: BaseModel

Context Model.

validate_limit

validate_limit(v, info: ValidationInfo)

validate limit.

Info

Bases: BaseModel

Response model for /info endpoint.

Infos

Bases: BaseModel

Response model for /list endpoint.

Metadata

Bases: BaseModel

Metadata Model.

defaults_params property

defaults_params: Dict[str, Any]

Return defaults in a form compatible with TiTiler dependencies.

PgSTACSearch

Bases: BaseModel

Search Query model.

Notes/Diff with standard model: - 'fields' is not in the Model because it's defined at the tiler level - we don't set limit

validate_bbox

validate_bbox(v: BBox)

Validate BBOX.

validate_datetime

validate_datetime(v)

Pgstac does not require the base validator for datetime.

validate_query_fields

validate_query_fields(values: Dict) -> Dict

Pgstac does not require the base validator for query fields.

validate_spatial

validate_spatial(v: Optional[Geometry], info: ValidationInfo)

Make sure bbox is not used with Intersects.

RegisterMosaic

Bases: PgSTACSearch

Model of /register endpoint input.

RegisterResponse

Bases: BaseModel

Response model for /register endpoint.

Search

Bases: BaseModel

PgSTAC Search entry.

ref: github.com/stac-utils/pgstac/blob/3499daa2bfa700ae7bb07503795c169bf2ebafc7/sql/004_search.sql#L907-L915

validate_metadata

validate_metadata(v)

Set SearchType.search when not present in metadata.