[MapProxy] Troubles creating a proper configuration for german wmts service
Malte Zacharias
saeckereier at gmx.de
Wed Oct 3 04:04:54 PDT 2012
Hi folks,
I'm currently trying to setup MapProxy as a WMS cache for a wmts service. The german authorities provide a free-for-private-use service with a complete official german map.
Unfortunately this is wmts only and I also want to leverage the cache feature for possible offline usage. I'm trying to configure mapproxy to do this but I'm failing because with
my configuration the wrong tiles are requested. In zoom level 0 for example tile 0,0 is requested, but the service returns a 404 error. I'm pretty sure that there needs to be some
kind of offset in the tile number, but I don't know how to configure that. I've attached the WMTSCapabiliites file (I had to remove my user credentials as license agreement states
that I may not publish those, but if you want to try it out you can register for a free user id at https://upd.geodatenzentrum.de/auftrupd/gdz_webatlas.wade?gdz_kz=0&gdz_service=&gdz_kontakt=&gdz_kontaktr=&gdz_spr=deu german language only)
Anyway, I hope my question can be answered based on the Capabilities file alone.
I am pretty new to all this, so I'm having trouble understanding, how to configure mapproxy properly. This is my configuration so far (only changes from the standard demo config file):
------------------------------------------------------------------------------------------
layers:
- name: geoserver
title: geoserver
sources: [osm_cache]
caches:
osm_cache:
grids: [mygrid]
sources: [geoserver]
sources:
geoserver:
type: tile
grid: mygrid
url: https://sg.geodatenzentrum.de/wmts_webatlasde__<user-id removed>/tile/1.0.0/Webatlas/default/default028mm/%(z)s/%(y)s/%(x)s.png
http:
ssl_no_cert_checks: true # going to change this later
on_error:
404:
response: '#DD7777' # just to highlight the 404 errors
cache: False
coverage:
bbox: [280387.70990000013, 5193471.164086349, 981683.1163957692, 6137570.076873273]
bbox_srs: EPSG:25832
mygrid:
srs: EPSG:25832
tile_size: [512, 512]
bbox: [280387.70990000013, 5193471.164086349, 981683.1163957692, 6137570.076873273]
origin: ul
res: [
# res level scale @91.0 DPI
2637.5261643119, # 0 9449404.76190476
1978.1446232339, # 1 7087053.57142857
1318.7630821559, # 2 4724702.38095238
791.2578492936, # 3 2834821.42857143
527.5052328624, # 4 1889880.95238095
395.6289246468, # 5 1417410.71428571
263.7526164312, # 6 944940.47619048
197.8144623234, # 7 708705.35714286
131.8763082156, # 8 472470.23809524
79.1257849294, # 9 283482.14285714
39.5628924647, # 10 141741.07142857
26.3752616431, # 11 94494.04761905
19.7814462323, # 12 70870.53571429
7.9125784929, # 13 28348.21428571
5.2750523286, # 14 18898.80952381
3.9562892465, # 15 14174.10714286
2.6375261643, # 16 9449.40476190
1.9781446232, # 17 7087.05357143
1.3187630822, # 18 4724.70238095
0.7912578493, # 19 2834.82142857
]
------------------------------------------------------------------------------------------
I also know that for example https://sg.geodatenzentrum.de/wmts_webatlasde__<user-id removed>/tile/1.0.0/Webatlas/default/default028mm/7/44/54.png is a valid URL,
and if I open the demo page viewer I can actually zoom in to level 7 and pan the map around until I finally get to the tile 44/54 and those are displayed properly along with the
surrounding tiles. If I zoom in or out however I'm again not at the right tile coordinates. My best guess currently is, that I somehow have to factor in the TopLeftCorner from the TileMatrix part in the xml:
<TileMatrix>
<ows:Identifier>0</ows:Identifier>
<ScaleDenominator>9449404.761904761</ScaleDenominator>
<TopLeftCorner>-5120900.0 9998100.0</TopLeftCorner>
<TileWidth>512</TileWidth>
<TileHeight>512</TileHeight>
<MatrixWidth>2</MatrixWidth>
<MatrixHeight>2</MatrixHeight>
</TileMatrix>
I'd appreciate your help on this, as I hope it's not much that is left...
Thanks
Malte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WMTSCapabilities.xml
Type: application/xml
Size: 21196 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20121003/860c47de/attachment-0001.xml>
More information about the MapProxy
mailing list