[MapProxy] WTMS tile reprojection and 'dimension'
Marc Monnerat
procrastinatio at gmail.com
Sun Jun 15 12:34:51 PDT 2014
Hello,
I have about 300 WMTS layers in a national projection which are
pregenerated and stored in Amazon S3.
Now, I would like to offer these layers also as WMTS tiles in a few more
popular "projections", like the ubiquitous spheric mercator and other.
1/ Only one layer per cache
The solution using a cache as cache source as described in [1] works
perfectly. The downside is that I have to define a new layer per new
cache/projection
layers:
- name: pixelkarte.mercator
title: Pixelkarte in Mercator
sources: [pixelkarte_cache_mercator]
- name: pixelkarte.utm32
title: Pixelkarte in UTM32
source: [pixelkarte_cache_utm32]
Using more thant a source pro layer doesn't not work, only the first source
is displayed:
layers:
- name: pixelkarte
title: Pixelkarte in UTM
sources: [pixelkarte_cache_mercator,pixelkarte_cache_utm32]
The goal is to have coherent urls like this:
Default projection
*http://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/21781/10/200/200.jpeg
<http://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/21781/10/200/200.jpeg>*
Spherical Mercator
*http://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/3857/10/1234/2345.jpeg
<http://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/3857/10/1234/2345.jpeg>*
ETRS89
*http://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/4258/10/567/432.jpeg
<http://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/4258/10/567/432.jpeg>*
where only the TileMatrixSet is changing, and not both the TileMatrixSet
and the layer name. I guess this can also be done with url rewriting
(mode_rewrite, varnish).
2/ WMTS Dimension
I am using a WMTS 'dimension' to represent time (timestamp). In the
following example [2] it is possible to forward the 'dimension' value to
the source, in this case a WMS service. I would like to do the same, but
using a WMTS source, for a source defined like this, where 'time' is the
dimension to forward:
sources:
ch.swisstopo.pixelkarte-farbe:
coverage:
bbox: [420000, 30000, 900000, 350000]
bbox_srs: EPSG:21781
grid: swisstopo-pixelkarte
type: tile
url:
http://wmts3.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/%(time)s/21781/%(z)d/%(y)d/%(x)d.%(format)s
The workaround is to define a new source per each dimension and having hthe
dimension hardcoded in the url template, but I have already 10'000 of them.
Multiplying this for each new projection described above and the config
file will be quite big.
Thank you for any advice
Marc
[1] *http://mapproxy.org/docs/latest/configuration_examples.html#reprojecting-tiles
<http://mapproxy.org/docs/latest/configuration_examples.html#reprojecting-tiles>*
[2] *http://mapproxy.org/docs/latest/configuration_examples.html?#wmts-service-with-dimensions
<http://mapproxy.org/docs/latest/configuration_examples.html?#wmts-service-with-dimensions>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20140615/82373e64/attachment.html>
More information about the MapProxy
mailing list