Module tipg.dependencies¶
tipg dependencies.
Variables¶
FilterLang
ItemResponseType
ItemsResponseType
QueryablesResponseType
ResponseType
VectorResponseType
VectorType
tms_settings
Functions¶
CollectionParams¶
def CollectionParams(
request: starlette.requests.Request,
collectionId: typing_extensions.Annotated[str, Path(PydanticUndefined)]
) -> tipg.collections.Collection
Return Layer Object.
CollectionsParams¶
def CollectionsParams(
request: starlette.requests.Request,
bbox_filter: typing_extensions.Annotated[Union[List[float], NoneType], Depends(bbox_query)],
datetime_filter: typing_extensions.Annotated[Union[List[str], NoneType], Depends(datetime_query)],
type_filter: typing_extensions.Annotated[Union[Literal['Function', 'Table'], NoneType], Query(PydanticUndefined)] = None,
limit: typing_extensions.Annotated[Union[int, NoneType], Query(PydanticUndefined)] = None,
offset: typing_extensions.Annotated[Union[int, NoneType], Query(PydanticUndefined)] = None
) -> tipg.collections.CollectionList
Return Collections Catalog.
ItemOutputType¶
def ItemOutputType(
request: starlette.requests.Request,
f: typing_extensions.Annotated[Union[Literal['geojson', 'html', 'json'], NoneType], Query(PydanticUndefined)] = None
) -> Union[tipg.resources.enums.MediaType, NoneType]
Output MediaType: geojson, json or html.
ItemsOutputType¶
def ItemsOutputType(
request: starlette.requests.Request,
f: typing_extensions.Annotated[Union[Literal['geojson', 'html', 'json', 'csv', 'geojsonseq', 'ndjson'], NoneType], Query(PydanticUndefined)] = None
) -> Union[tipg.resources.enums.MediaType, NoneType]
Output MediaType: geojson, html, json, csv, geojsonseq, ndjson.
OutputType¶
def OutputType(
request: starlette.requests.Request,
f: typing_extensions.Annotated[Union[Literal['json', 'html'], NoneType], Query(PydanticUndefined)] = None
) -> Union[tipg.resources.enums.MediaType, NoneType]
Output MediaType: json or html.
QueryablesOutputType¶
def QueryablesOutputType(
request: starlette.requests.Request,
f: typing_extensions.Annotated[Union[Literal['schemajson', 'html'], NoneType], Query(PydanticUndefined)] = None
) -> Union[tipg.resources.enums.MediaType, NoneType]
Output MediaType: schemajson or html.
TileParams¶
def TileParams(
z: typing_extensions.Annotated[int, Path(PydanticUndefined)],
x: typing_extensions.Annotated[int, Path(PydanticUndefined)],
y: typing_extensions.Annotated[int, Path(PydanticUndefined)]
) -> morecantile.commons.Tile
Tile parameters.
accept_media_type¶
def accept_media_type(
accept: str,
mediatypes: List[tipg.resources.enums.MediaType]
) -> Union[tipg.resources.enums.MediaType, NoneType]
Return MediaType based on accept header and available mediatype.
Links: - www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
bbox_query¶
def bbox_query(
bbox: typing_extensions.Annotated[Union[str, NoneType], Query(PydanticUndefined)] = None
) -> Union[List[float], NoneType]
BBox dependency.
datetime_query¶
def datetime_query(
datetime: typing_extensions.Annotated[Union[str, NoneType], Query(PydanticUndefined)] = None
) -> Union[List[str], NoneType]
Datetime dependency.
filter_query¶
def filter_query(
query: typing_extensions.Annotated[Union[str, NoneType], Query(PydanticUndefined)] = None,
filter_lang: typing_extensions.Annotated[Union[Literal['cql2-text', 'cql2-json'], NoneType], Query(PydanticUndefined)] = None
) -> Union[ForwardRef('Node'), pygeofilter.values.Geometry, pygeofilter.values.Envelope, datetime.date, datetime.datetime, datetime.timedelta, pygeofilter.values.Interval, bool, float, int, str, list, NoneType]
Parse Filter Query.
function_parameters_query¶
def function_parameters_query(
request: starlette.requests.Request,
collection: tipg.collections.Collection
) -> Dict[str, str]
Get parameters for function layers.
ids_query¶
def ids_query(
ids: typing_extensions.Annotated[Union[str, NoneType], Query(PydanticUndefined)] = None
) -> Union[List[str], NoneType]
Ids dependency.
properties_filter_query¶
def properties_filter_query(
request: starlette.requests.Request,
collection: tipg.collections.Collection
) -> List[Tuple[str, str]]
Get properties to filter on excluding reserved keys.
properties_query¶
def properties_query(
properties: typing_extensions.Annotated[Union[str, NoneType], Query(PydanticUndefined)] = None
) -> Union[List[str], NoneType]
Return property list.
s_intersects¶
def s_intersects(
bbox: List[float],
spatial_extent: List[float]
) -> bool
Check if bbox intersects with spatial extent.
sortby_query¶
def sortby_query(
sortby: typing_extensions.Annotated[Union[str, NoneType], Query(PydanticUndefined)] = None
)
Sortby dependency.
t_intersects¶
def t_intersects(
interval: List[str],
temporal_extent: List[str]
) -> bool
Check if dates intersect with temporal extent.