<div dir="ltr"><div><div>Hello,</div><div><br></div><div>I have about 300 WMTS layers in a national projection which are pregenerated and stored in Amazon S3.</div><div><br></div><div>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.</div>
<div><br></div><div>1/ Only one layer per cache</div><div><br></div><div>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</div>
<div><br></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">layers:</font></div><div><font face="courier new, monospace"> - name: pixelkarte.mercator</font></div><div>
<font face="courier new, monospace"> title: Pixelkarte in Mercator</font></div><div><font face="courier new, monospace"> sources: [pixelkarte_cache_mercator]</font></div><div><font face="courier new, monospace"> - name: pixelkarte.utm32</font></div>
<div><font face="courier new, monospace"> title: Pixelkarte in UTM32</font></div><div><font face="courier new, monospace"> source: [pixelkarte_cache_utm32]</font></div><div><br></div><div>Using more thant a source pro layer doesn't not work, only the first source is displayed:</div>
<div><br></div><div><font face="courier new, monospace">layers:</font></div><div><font face="courier new, monospace"> - name: pixelkarte</font></div><div><font face="courier new, monospace"> title: Pixelkarte in UTM</font></div>
<div><font face="courier new, monospace"> sources: [pixelkarte_cache_mercator,pixelkarte_cache_utm32]</font></div><div><br></div><div><br></div><div>The goal is to have coherent urls like this:</div><div><br></div><div>
Default projection</div><div><i><a href="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</a></i></div>
<div><br></div><div>Spherical Mercator</div><div><i><a href="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</a></i></div>
<div><br></div><div>ETRS89</div><div><i><a href="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</a></i></div>
<div><br></div><div>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).</div><div><br></div><div>2/ WMTS Dimension</div>
<div><br></div><div>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:</div>
<div><br></div><div><font face="courier new, monospace">sources:</font></div><div><font face="courier new, monospace"> ch.swisstopo.pixelkarte-farbe:</font></div><div><font face="courier new, monospace"> coverage:</font></div>
<div><font face="courier new, monospace"> bbox: [420000, 30000, 900000, 350000]</font></div><div><font face="courier new, monospace"> bbox_srs: EPSG:21781</font></div><div><font face="courier new, monospace"> grid: swisstopo-pixelkarte</font></div>
<div><font face="courier new, monospace"> type: tile</font></div><div><font face="courier new, monospace"> url: <a href="http://wmts3.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/%(time)s/21781/%(z)d/%(y)d/%(x)d.%(format)s">http://wmts3.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte/default/%(time)s/21781/%(z)d/%(y)d/%(x)d.%(format)s</a></font></div>
<div><br></div><div>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.</div>
<div><br></div><div>Thank you for any advice</div><div><br></div><div><br></div><div>Marc</div><div><br></div><div><br></div><div>[1] <i><a href="http://mapproxy.org/docs/latest/configuration_examples.html#reprojecting-tiles">http://mapproxy.org/docs/latest/configuration_examples.html#reprojecting-tiles</a></i></div>
<div>[2] <i><a href="http://mapproxy.org/docs/latest/configuration_examples.html?#wmts-service-with-dimensions">http://mapproxy.org/docs/latest/configuration_examples.html?#wmts-service-with-dimensions</a></i></div><div><br>
</div></div><div><br></div><div>
<br></div><div><br clear="all"><div><br></div><div><br></div>
</div></div>