geo.catalog
2 functions / 7 types
Index
| Function | Description |
|---|---|
| get_service_preview | Fetch a representative tile without adding a map layer. Elevation previews contain shaded relief. Missing coverage returns no preview. |
| get_wmts_layers | List every layer a WMTS service offers, in the order its capabilities document declares them. |
| Type | Description |
|---|---|
| ArcgisPreviewSource | ArcgisPreviewSource |
| PreviewSource | PreviewSource |
| PreviewTile | One tile that shows a layer source at a glance, as geo.catalog.get_service_preview answers it. |
| ServiceLayer | One layer a WMTS service offers, as geo.catalog.get_wmts_layers lists it. |
| UvRect | A rectangle inside an image, in fractions of the image’s width and height measured from its top-left corner. |
| WmtsPreviewSource | WmtsPreviewSource |
| XyzPreviewSource | XyzPreviewSource |
get_service_preview
def get_service_preview(
*,
source: types.geo.catalog.PreviewSource,
auth: types.geo.map.layer.TileAuth | None = None,
_transaction_id: str | None = None
) -> types.geo.catalog.PreviewTile | NoneFetch a representative tile without adding a map layer. Elevation previews contain shaded relief. Missing coverage returns no preview.
Returns PreviewTile | None.
source : PreviewSource
auth optional : TileAuth | None
Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
get_wmts_layers
def get_wmts_layers(
*,
capabilities_url: str,
auth: types.geo.map.layer.TileAuth | None = None,
_transaction_id: str | None = None
) -> tuple[types.geo.catalog.ServiceLayer, ...]List every layer a WMTS service offers, in the order its capabilities document declares them.
The document is read with auth and kept, so asking again, or spawning one of the layers with
geo.map.layer.add_wmts_layer and the same credentials, does not fetch it again. This needs
no map. Fails when the document cannot be reached or read.
Returns tuple[ServiceLayer, ...].
capabilities_url : str
The URL of a WMTS capabilities document.
auth optional : TileAuth | None
Credentials of your own, sent with the capabilities request. They appear in each preview URL. Defaults to None.
_transaction_id optional : str | None
Transaction to join. Omit to submit without an explicit transaction. Defaults to None.
ArcgisPreviewSource
ArcgisPreviewSource(
*,
service_url: str,
role: types.geo.map.layer.LayerRole | None = None,
elevation: types.geo.map.layer.ElevationOptions | None = None
)ArcgisPreviewSource
service_url : str
role optional : LayerRole | None
Defaults to None.
elevation optional : ElevationOptions | None
Defaults to None.
PreviewSource
PreviewSource()PreviewSource
Construct one of the nested classes. Use isinstance to check its type.
PreviewSource.Wmts
PreviewSource.Wmts(value: types.geo.catalog.WmtsPreviewSource)PreviewSource.Wmts
value : WmtsPreviewSource
PreviewSource.Arcgis
PreviewSource.Arcgis(value: types.geo.catalog.ArcgisPreviewSource)PreviewSource.Arcgis
value : ArcgisPreviewSource
PreviewSource.Xyz
PreviewSource.Xyz(value: types.geo.catalog.XyzPreviewSource)PreviewSource.Xyz
value : XyzPreviewSource
PreviewTile
PreviewTile(*, url: str, content: types.geo.catalog.UvRect | None = None)One tile that shows a layer source at a glance, as geo.catalog.get_service_preview answers
it.
url : str
The tile’s address, with the credentials asked for applied, ready for an image element. For an elevation layer it is a data: URL holding the tile drawn as shaded relief.
content optional : UvRect | None
The part of the tile the layer draws on, absent when it draws on the whole tile. Crop the image to it to show the layer without the empty part of the tile. Defaults to None.
ServiceLayer
ServiceLayer(
*,
identifier: types.geo.ProviderLayerId,
title: str,
summary: str | None = None,
role: types.geo.map.layer.LayerRole,
formats: tuple[types.geo.MediaType, ...] = (),
tile_matrix_sets: tuple[types.geo.TileMatrixSet, ...] = (),
styles: tuple[types.geo.StyleId, ...] = (),
has_time_dimension: bool,
preview_url: str | None = None,
preview_content: types.geo.catalog.UvRect | None = None,
bounds: types.geo.map.layer.GeoBounds | None = None,
dates: types.geo.map.layer.LayerDates | None = None,
unavailable_tile_matrix_sets: tuple[types.geo.UnavailableTileMatrixSet, ...] = ()
)One layer a WMTS service offers, as geo.catalog.get_wmts_layers lists it.
identifier : ProviderLayerId
The identifier geo.map.layer.add_wmts_layer takes as provider_layer_id.
title : str
The title the service gives the layer, or the identifier where it gives none.
summary optional : str | None
The service’s description of the layer. Defaults to None.
role : LayerRole
Elevation when the layer’s tile formats or name say its tiles hold heights.
formats optional : tuple[MediaType, ...]
The tile media types the layer offers. Defaults to ().
tile_matrix_sets optional : tuple[TileMatrixSet, ...]
The tile matrix sets the layer can be drawn on. A set the layer links to but the service does not declare is left out, because a layer cannot be spawned on it. Defaults to ().
styles optional : tuple[StyleId, ...]
The style identifiers the layer offers, the default first. Defaults to ().
has_time_dimension : bool
Whether the layer changes over time. Spawned, it follows the scene clock.
preview_url optional : str | None
The address of one tile that shows the layer at a glance, absent when the layer has no such tile or holds heights. Defaults to None.
preview_content optional : UvRect | None
The part of the preview tile the layer draws on, absent when it draws on the whole tile. Defaults to None.
bounds optional : GeoBounds | None
The ground the layer covers, where the service declares it. Defaults to None.
dates optional : LayerDates | None
The dates the layer offers, where it declares a time axis of dates. date is the one the preview tile shows, which is the one the layer opens on while the clock reads the present. Defaults to None.
unavailable_tile_matrix_sets optional : tuple[UnavailableTileMatrixSet, ...]
The tile matrix sets the layer links that cannot be drawn until their coordinate reference system is registered, each with the reason. A layer spawned with every set here is saved and reports Failed until a set’s system is registered. Defaults to ().
UvRect
UvRect(*, x: float, y: float, width: float, height: float)A rectangle inside an image, in fractions of the image’s width and height measured from its top-left corner.
x : float
y : float
width : float
height : float
WmtsPreviewSource
WmtsPreviewSource(
*,
capabilities_url: str,
provider_layer_id: types.geo.ProviderLayerId | None = None
)WmtsPreviewSource
capabilities_url : str
provider_layer_id optional : ProviderLayerId | None
Defaults to None.
XyzPreviewSource
XyzPreviewSource(
*,
subdomains: tuple[str, ...] = (),
template: types.geo.TileUrlTemplate,
role: types.geo.map.layer.LayerRole | None = None,
elevation: types.geo.map.layer.ElevationOptions | None = None,
max_zoom: int | None = None,
tile_size: int | None = None
)XyzPreviewSource
subdomains optional : tuple[str, ...]
Defaults to ().
template : TileUrlTemplate
role optional : LayerRole | None
Defaults to None.
elevation optional : ElevationOptions | None
Defaults to None.
max_zoom optional : int | None
Defaults to None.
tile_size optional : int | None
Defaults to None.