<div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>Hi Matthias,<br></div>chech your source configuration :<br></div>with this document (<a href="https://mapproxy.org/docs/1.11.0/sources.html#tiles">https://mapproxy.org/docs/1.11.0/sources.html#tiles</a>) you can make a test with that :<br><br>source_topo:<br>
     type: tile<br>
     grid: rips_grid<br>
     url: <br>
<a href="https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/%%28z%29s/%%28x%29s/%%28y%29s.png" rel="noreferrer" target="_blank">https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/%(z)s/%(x)s/%(y)s.png</a><br>
     bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, <br>
50.55193238381328]<br>
     bbox_srs: 'EPSG:4326'<br><br></div><div>In my product platform I use "transparent" and "on_error" with the transparency to avoid errors for the users and offer the possibilites to superimpose the tiles !<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 4 juin 2019 à 14:47, Travis Kirstine <<a href="mailto:traviskirstine@gmail.com" target="_blank">traviskirstine@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hey Matthias, </div><div><br></div><div>Not really sure what the issue is - maybe you need to specify the tile_size in the grid or the on_error in the source?</div><div>I've included a sample of what worked for me for the following WMTS - hope it helps.<br></div><div><br></div><div><a href="https://www.toronto.ca/city-government/data-research-maps/open-data/open-data-catalogue/#b2d79926-bce9-989c-390b-7ff5247b6515" target="_blank">https://www.toronto.ca/city-government/data-research-maps/open-data/open-data-catalogue/#b2d79926-bce9-989c-390b-7ff5247b6515</a>  <br></div><div><br></div><div>grids:<br>   spherical_mercator:<br>      srs: EPSG:3857<br>      res_factor: 2<br>      num_levels: 22<br>      bbox: [-20037508, -20037508, 20037508, 20037508]<br>      bbox_srs: EPSG:3857<br>      tile_size: [256,256]<br>      origin: sw<br>   GoogleMapsCompatible:<br>      origin: nw<br>      bbox: [-20037508, -20037508, 20037508, 20037508]<br>      bbox_srs: EPSG:3857<br>      tile_size: [256,256]<br>      srs: EPSG:3857<br>      res: [<br>           #  res            level     scale @90.7 DPI<br>         156543.0339280410, #  0   559082264.02871776<br>          78271.5169640205, #  1   279541132.01435888<br>          39135.7584820102, #  2   139770566.00717941<br>          19567.8792410051, #  3    69885283.00358970<br>           9783.9396205026, #  4    34942641.50179486<br>           4891.9698102513, #  5    17471320.75089743<br>           2445.9849051256, #  6     8735660.37544871<br>           1222.9924525628, #  7     4367830.18772436<br>            611.4962262814, #  8     2183915.09386218<br>            305.7481131407, #  9     1091957.54693109<br>            152.8740565704, # 10      545978.77346554<br>             76.4370282852, # 11      272989.38673277<br>             38.2185141426, # 12      136494.69336639<br>             19.1092570713, # 13       68247.34668319<br>              9.5546285356, # 14       34123.67334160<br>              4.7773142678, # 15       17061.83667080<br>              2.3886571339, # 16        8530.91833540<br>              1.1943285670, # 17        4265.45916770<br>              0.5971642835, # 18        2132.72958385<br>      ]<br></div><div><br></div><div>#######################</div><div><br></div><div>sources:</div>   toronto_1978_wmts:<br>      type: tile<br>      url: '<a href="https://gis.toronto.ca/arcgis/rest/services/basemap/cot_historic_aerial_1978/MapServer/WMTS/tile/1.0.0/basemap_cot_historic_aerial_1978/default/GoogleMapsCompatible/%%28z%29s/%%28y%29s/%%28x%29s" target="_blank">https://gis.toronto.ca/arcgis/rest/services/basemap/cot_historic_aerial_1978/MapServer/WMTS/tile/1.0.0/basemap_cot_historic_aerial_1978/default/GoogleMapsCompatible/%(z)s/%(y)s/%(x)s</a>'<br>      grid: GoogleMapsCompatible<br>      transparent: true<br>      on_error:<br>         404:<br>            response: transparent<br>            cache: false<br>      coverage:<br>         datasource: "PG: dbname='db' host='foobar' user='usr'' password='pw'"<br>         where: 'SELECT boundary_3857 FROM layers WHERE id = 379'<br>         srs: 'EPSG:3857'<br><div>##############################</div><div><br></div><div>caches:</div><div>   toronto_1978_cache:<br>      grids: [GoogleMapsCompatible, spherical_mercator]<br>      sources: [toronto_1978_wmts]<br>      bulk_meta_tiles: true<br>      cache:<br>        type: sqlite<br>        directory: /opt/caches/sqlite/toronto_1978_cache<br></div><div><br></div><div>#################################</div><div><br></div><div>layers:</div><div>         - name: toronto_1978<br>           title: City of Toronto 1978<br>           sources: [toronto_1978_cache]<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 3 Jun 2019 at 11:44, Matthias Woltering <<a href="mailto:woltering@gmail.com" target="_blank">woltering@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I have problems creating the correct mapproxy-grid. Maybe someone can <br>
help me?!<br>
<br>
<br>
source (getCapabilities):<br>
=========================<br>
<br>
<<a href="https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS" rel="noreferrer" target="_blank">https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS</a>?><br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<Capabilities xmlns="<a href="http://www.opengis.net/wmts/1.0" rel="noreferrer" target="_blank">http://www.opengis.net/wmts/1.0</a>"<br>
xmlns:ows="<a href="http://www.opengis.net/ows/1.1" rel="noreferrer" target="_blank">http://www.opengis.net/ows/1.1</a>"<br>
xmlns:xlink="<a href="http://www.w3.org/1999/xlink" rel="noreferrer" target="_blank">http://www.w3.org/1999/xlink</a>"<br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"<br>
xmlns:gml="<a href="http://www.opengis.net/gml" rel="noreferrer" target="_blank">http://www.opengis.net/gml</a>"<br>
xsi:schemaLocation="<a href="http://www.opengis.net/wmts/1.0" rel="noreferrer" target="_blank">http://www.opengis.net/wmts/1.0</a> <br>
<a href="http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" rel="noreferrer" target="_blank">http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd</a>"<br>
version="1.0.0"><br>
<!-- Service Identification --> <ows:ServiceIdentification><br>
<ows:Title>RIPS_TK_Cache</ows:Title><br>
<ows:ServiceType>OGC WMTS</ows:ServiceType><br>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion><br>
</ows:ServiceIdentification> <!-- Operations Metadata --> <br>
<ows:OperationsMetadata><br>
<ows:Operation name="GetCapabilities"><br>
<ows:DCP><br>
<ows:HTTP><br>
<ows:Get <br>
xlink:href="<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</a>"><br>
<ows:Constraint name="GetEncoding"><br>
<ows:AllowedValues><br>
<ows:Value>RESTful</ows:Value><br>
</ows:AllowedValues><br>
</ows:Constraint><br>
</ows:Get><br>
<!-- add KVP binding in 10.1 --><br>
<ows:Get <br>
xlink:href="<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS</a>?"><br>
<ows:Constraint name="GetEncoding"><br>
<ows:AllowedValues><br>
<ows:Value>KVP</ows:Value><br>
</ows:AllowedValues><br>
</ows:Constraint><br>
</ows:Get><br>
</ows:HTTP><br>
</ows:DCP><br>
</ows:Operation><br>
<ows:Operation name="GetTile"><br>
<ows:DCP><br>
<ows:HTTP><br>
<ows:Get <br>
xlink:href="<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/</a>"><br>
<ows:Constraint name="GetEncoding"><br>
<ows:AllowedValues><br>
<ows:Value>RESTful</ows:Value><br>
</ows:AllowedValues><br>
</ows:Constraint><br>
</ows:Get><br>
<ows:Get <br>
xlink:href="<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS</a>?"><br>
<ows:Constraint name="GetEncoding"><br>
<ows:AllowedValues><br>
<ows:Value>KVP</ows:Value><br>
</ows:AllowedValues><br>
</ows:Constraint><br>
</ows:Get><br>
</ows:HTTP><br>
</ows:DCP><br>
</ows:Operation><br>
</ows:OperationsMetadata> <Contents><br>
<!--Layer--> <Layer><br>
<ows:Title>RIPS_TK_Cache</ows:Title> <br>
<ows:Identifier>RIPS_TK_Cache</ows:Identifier><br>
<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::25832"><br>
<ows:LowerCorner>250000.00000000093 5200000.000000004</ows:LowerCorner><br>
<ows:UpperCorner>749999.9999999991 5600000.000000004</ows:UpperCorner><br>
</ows:BoundingBox> <ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84"><br>
<ows:LowerCorner>5.474640224093635 46.90644116046651</ows:LowerCorner><br>
<ows:UpperCorner>12.525359775906365 50.55193238381328</ows:UpperCorner><br>
</ows:WGS84BoundingBox><br>
<Style isDefault="true"><br>
<ows:Title>Default Style</ows:Title><br>
<ows:Identifier>default</ows:Identifier><br>
</Style><br>
<Format>image/png</Format><br>
<TileMatrixSetLink><br>
<TileMatrixSet>default028mm</TileMatrixSet><br>
</TileMatrixSetLink><br>
<ResourceURL format="image/png" resourceType="tile" <br>
template="<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/%7BStyle%7D/%7BTileMatrixSet%7D/%7BTileMatrix%7D/%7BTileRow%7D/%7BTileCol%7D.png" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png</a>" <br>
/><br>
</Layer> <!--TileMatrixSet--><br>
<TileMatrixSet><br>
<ows:Title>TileMatrix using 0.28mm</ows:Title><br>
<ows:Abstract>The tile matrix set that has scale values calculated based <br>
on the dpi defined by OGC specification (dpi assumes 0.28mm as the <br>
physical distance of a pixel).</ows:Abstract> <br>
<ows:Identifier>default028mm</ows:Identifier><br>
<ows:SupportedCRS>urn:ogc:def:crs:EPSG::25832</ows:SupportedCRS><br>
<TileMatrix><br>
<ows:Identifier>0</ows:Identifier><br>
<ScaleDenominator>472471.18303754483</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>174</MatrixWidth> <MatrixHeight>142</MatrixHeight><br>
</TileMatrix><br>
<TileMatrix><br>
<ows:Identifier>1</ows:Identifier><br>
<ScaleDenominator>188988.4732150179</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>434</MatrixWidth> <MatrixHeight>355</MatrixHeight><br>
</TileMatrix><br>
<TileMatrix><br>
<ows:Identifier>2</ows:Identifier><br>
<ScaleDenominator>94494.23660750895</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>867</MatrixWidth> <MatrixHeight>709</MatrixHeight><br>
</TileMatrix><br>
<TileMatrix><br>
<ows:Identifier>3</ows:Identifier><br>
<ScaleDenominator>47247.118303754476</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>1734</MatrixWidth> <MatrixHeight>1417</MatrixHeight><br>
</TileMatrix><br>
<TileMatrix><br>
<ows:Identifier>4</ows:Identifier><br>
<ScaleDenominator>23623.559151877238</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>3468</MatrixWidth> <MatrixHeight>2834</MatrixHeight><br>
</TileMatrix><br>
<TileMatrix><br>
<ows:Identifier>5</ows:Identifier><br>
<ScaleDenominator>11811.779575938619</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>6935</MatrixWidth> <MatrixHeight>5668</MatrixHeight><br>
</TileMatrix><br>
<TileMatrix><br>
<ows:Identifier>6</ows:Identifier><br>
<ScaleDenominator>6142.125379488082</ScaleDenominator><br>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner> <br>
<TileWidth>256</TileWidth> <TileHeight>256</TileHeight><br>
<MatrixWidth>13335</MatrixWidth> <MatrixHeight>10899</MatrixHeight><br>
</TileMatrix><br>
</TileMatrixSet><br>
</Contents><br>
<ServiceMetadataURL <br>
xlink:href="<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</a>" <br>
/> </Capabilities><br>
<br>
parts of mapproxy-configuration:<br>
================================<br>
<br>
layers:<br>
     - name: topo<br>
       title: topographische karte<br>
       sources: [cache_topo]<br>
<br>
<br>
caches:<br>
     cache_topo:<br>
         grids: [rips_grid]<br>
         sources: [source_topo]<br>
         format: image/png<br>
         request_format: image/png<br>
<br>
source_topo:<br>
     type: tile<br>
     grid: rips_grid<br>
     url: <br>
<a href="https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/%%28z%29s/%%28x%29s/%%28y%29s.png" rel="noreferrer" target="_blank">https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/%(z)s/%(x)s/%(y)s.png</a><br>
     coverage:<br>
       bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, <br>
50.55193238381328]<br>
       bbox_srs: 'EPSG:4326'<br>
<br>
<br>
<br>
rips_grid:<br>
     origin: 'nw'<br>
     bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, <br>
50.55193238381328]<br>
     bbox_srs: 'EPSG:4326'<br>
     srs: 'EPSG:25832'<br>
<br>
     # mapproxy-util scales --as-res-config 472471.18303754 <br>
188988.47321502 94494.23660751 47247.11830375 23623.55915188 <br>
11811.77957594 6142.12537949<br>
     res: [<br>
         #  res            level     scale @90.7 DPI<br>
         132.2919312505, #  0      472471.18303754<br>
          52.9167725002, #  1      188988.47321502<br>
          26.4583862501, #  2       94494.23660751<br>
          13.2291931250, #  3       47247.11830375<br>
           6.6145965625, #  4       23623.55915188<br>
           3.3072982813, #  5       11811.77957594<br>
           1.7197951063, #  6        6142.12537949<br>
         ]<br>
<br>
<br>
Problems:<br>
=========<br>
<br>
1. check wmts via qgis (see url above): map is visible. At zoom 0 the <br>
urls of tiles with maps have a range between<br>
TileCol [160..171]<br>
TileRow [131..140]<br>
see for example (Pforzheim):<br>
<<a href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/0/135/165.png" rel="noreferrer" target="_blank">http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/0/135/165.png</a>> <br>
<br>
<br>
2. if I check the wmts in mapproxy-demo, no map is visible. Following <br>
errors are seen:<br>
<br>
[2019-06-03 17:35:53,563] mapproxy.source.request - INFO - GET <br>
<a href="https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/0/10/4.png" rel="noreferrer" target="_blank">https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/0/10/4.png</a> <br>
404 - 151<br>
[2019-06-03 17:35:53,563] mapproxy.source.tile - WARNING - could not <br>
retrieve tile: HTTP Error <br>
"<a href="https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/0/10/4.png" rel="noreferrer" target="_blank">https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/RIPS_TK_Cache/default/default028mm/0/10/4.png</a>": <br>
404<br>
<br>
At zoom 0 the urls of tiles with maps have a range between<br>
TileCol [4..7]<br>
TileRow [6..10]<br>
<br>
Do I have to set an offset? (Is this possible?) I tried to use the bbox <br>
in utm32-coordinates. No effect.<br>
<br>
Thanks in advance!<br>
<br>
<br>
_______________________________________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" target="_blank">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a></blockquote></div>
_______________________________________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" target="_blank">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a></blockquote></div>