gws.plugin.ows_client.wmts.layer

WMTS layer.

Source code: gws.plugin.ows_client.wmts.layer

Module Contents

class gws.plugin.ows_client.wmts.layer.Config

Bases: gws.base.layer.Config

Layer that shows tiles from a WMTS service.

display: gws.LayerDisplayMode

The way the layer is rendered in the client.

provider: Config.provider

WMTS service the layer is loaded from.

sourceLayers: gws.gis.source.LayerFilter | None

Source layer to show.

style: str | None

Source style to request.

class gws.plugin.ows_client.wmts.layer.Object

Bases: gws.base.layer.image.Object

Image layer that shows the tiles of a WMTS source layer.

The tiles are fetched by the server through a WMTS grabber, or loaded by the client directly from the service in the client display mode.

activeLayer: gws.SourceLayer

Source layer shown by this layer.

activeStyle: gws.SourceStyle

Source style requested for the tiles.

activeTms: gws.TileMatrixSet

Tile matrix set used for the tiles.

canRenderInClient = True
provider: Object.provider

WMTS service provider.

sourceLayers: list[gws.SourceLayer]

Source layers selected for this layer.

configure()
configure_extent()
configure_legend()
configure_metadata()
configure_provider()
configure_resolutions()
configure_source_layers()

Select the source layers from the image layers of the provider.

Returns:

Always True.

configure_sources()
configure_style()

Select the style of the active source layer.

The style is the one named by the styleName configuration value, else the default style of the source layer, else a style named default.

Returns:

Always True.

Raises:

gws.Error – If the configured style does not exist.

configure_tms()

Select the tile matrix set of the active source layer.

The tile matrix set must be in the forced CRS of the provider or, if none is forced, in the CRS that best matches the map CRS.

Raises:

gws.Error – If there is no tile matrix set in that CRS.

create_cache_name(cache)
create_grabber(opts)
props(user)
class gws.plugin.ows_client.wmts.layer.Props

Bases: gws.base.layer.core.Props

tileMatrixSet: TileMatrixSetProps | None

Tile matrix set for the client display mode.

class gws.plugin.ows_client.wmts.layer.TileMatrixSetProps(*args, **kwargs)

Bases: gws.Props

Tile matrix set, as needed by the client to address source tiles directly.

matrixIds: list[str]

Matrix identifiers, in the order of resolutions.

origin: gws.Point

Top-left corner of the matrices.

resolutions: list[float]

Resolutions, coarsest first.

tileSize: gws.Size

Tile size in pixels.