[MapProxy-dev] Support for WMTS with non-numeric TileMatrix Identifiers

Matt Walker walkermatt at longwayaround.org.uk
Sat Mar 11 05:09:40 PST 2023


Yesterday I attempted to configure MapProxy to use a WMTS as a source and
ran into an issue with the tile source url template due to the source WMTS
having non-numeric tilematrix identifiers.

Currently MapProxy can be configured with a suitable grid and tile
source in order to treat a WMTS as a source. The source url is a GetTile
request with placeholders for tilecol (x) and tilerow (y) plus the
tilematrix. The tilematrix is commonly substituted with the tile zoom
level (z) which in practice works for the majority of WMTS servers but
not all: The tilematrix value should really be the <ows:Identifier>
value for the corresponding <TileMatrix> defined in the WMTS
GetCapabilities response. The WMTS 1.0.0 spec states that a TileMatrix
Identifier is a "CodeType" and includes an example capabilities document
with TileMatrix Identifiers such as "2g", "1g" and "30m".

I've drafted a potential pull request (in this branch
https://github.com/walkermatt/mapproxy/tree/grid_tile_matrix) which extends
grid config to include an optional tile_matrix_ids
property which is a list of TileMatrix Identifiers in the same order as
the grid resolutions; a new "tile_matrix_id" substituion token is also made
available for use in a tile source url.

I'd welcome any thoughts before I submit a pull request as well as any
example WMTS services that I could test with.

Kind regards,

Matt.

@_walkermatt (Twitter)
https://mastodon.social/@walkermatt
https://fosstodon.org/@astuntechnology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy-dev/attachments/20230311/db7d012a/attachment.htm>


More information about the MapProxy-dev mailing list