class, layer_name, gettile_extra_kwargs=None)[source]#

A WMTS imagery retriever which can be added to a map.

Uses tile caching for fast repeated map retrievals.


Requires owslib and Pillow to work.

  • wmts – The URL of the WMTS, or an owslib.wmts.WebMapTileService instance.

  • layer_name – The name of the layer to use.

  • gettile_extra_kwargs (dict, optional) – Extra keywords (e.g. time) to pass through to the service’s gettile method.

fetch_raster(projection, extent, target_resolution)[source]#

Return a sequence of images with extents given some constraining information.

  • projection ( – The desired projection of the image.

  • extent (iterable of length 4) – The extent of the requested image in projected coordinates. The resulting image may not be defined exactly by these extents, and so the extent of the resulting image is also returned. The extents must be defined in the form (min_x, max_x, min_y, max_y).

  • target_resolution (iterable of length 2) – The desired resolution of the image as (width, height) in pixels.


images – A sequence of LocatedImage instances.


The layer to fetch.


Raise an error if this raster source cannot provide images in the specified projection.


projection ( – The desired projection of the image.


The OWSLib WebMapTileService instance.