From woltering at gmail.com Mon Jun 3 08:44:15 2019 From: woltering at gmail.com (Matthias Woltering) Date: Mon, 3 Jun 2019 17:44:15 +0200 Subject: [MapProxy] Problems with WMTS grid configuration Message-ID: Hi all, I have problems creating the correct mapproxy-grid. Maybe someone can help me?! source (getCapabilities): ========================= RIPS_TK_Cache OGC WMTS 1.0.0 RESTful KVP RESTful KVP RIPS_TK_Cache RIPS_TK_Cache 250000.00000000093 5200000.000000004 749999.9999999991 5600000.000000004 5.474640224093635 46.90644116046651 12.525359775906365 50.55193238381328 image/png default028mm TileMatrix using 0.28mm The tile matrix set that has scale values calculated based on the dpi defined by OGC specification (dpi assumes 0.28mm as the physical distance of a pixel). default028mm urn:ogc:def:crs:EPSG::25832 0 472471.18303754483 -5120900.0 9998100.0 256 256 174 142 1 188988.4732150179 -5120900.0 9998100.0 256 256 434 355 2 94494.23660750895 -5120900.0 9998100.0 256 256 867 709 3 47247.118303754476 -5120900.0 9998100.0 256 256 1734 1417 4 23623.559151877238 -5120900.0 9998100.0 256 256 3468 2834 5 11811.779575938619 -5120900.0 9998100.0 256 256 6935 5668 6 6142.125379488082 -5120900.0 9998100.0 256 256 13335 10899 parts of mapproxy-configuration: ================================ layers: - name: topo title: topographische karte sources: [cache_topo] caches: cache_topo: grids: [rips_grid] sources: [source_topo] format: image/png request_format: image/png source_topo: type: tile grid: rips_grid url: 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 coverage: bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, 50.55193238381328] bbox_srs: 'EPSG:4326' rips_grid: origin: 'nw' bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, 50.55193238381328] bbox_srs: 'EPSG:4326' srs: 'EPSG:25832' # mapproxy-util scales --as-res-config 472471.18303754 188988.47321502 94494.23660751 47247.11830375 23623.55915188 11811.77957594 6142.12537949 res: [ # res level scale @90.7 DPI 132.2919312505, # 0 472471.18303754 52.9167725002, # 1 188988.47321502 26.4583862501, # 2 94494.23660751 13.2291931250, # 3 47247.11830375 6.6145965625, # 4 23623.55915188 3.3072982813, # 5 11811.77957594 1.7197951063, # 6 6142.12537949 ] Problems: ========= 1. check wmts via qgis (see url above): map is visible. At zoom 0 the urls of tiles with maps have a range between TileCol [160..171] TileRow [131..140] see for example (Pforzheim): 2. if I check the wmts in mapproxy-demo, no map is visible. Following errors are seen: [2019-06-03 17:35:53,563] mapproxy.source.request - INFO - GET 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 404 - 151 [2019-06-03 17:35:53,563] mapproxy.source.tile - WARNING - could not retrieve tile: HTTP Error "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": 404 At zoom 0 the urls of tiles with maps have a range between TileCol [4..7] TileRow [6..10] Do I have to set an offset? (Is this possible?) I tried to use the bbox in utm32-coordinates. No effect. Thanks in advance! From traviskirstine at gmail.com Tue Jun 4 05:47:28 2019 From: traviskirstine at gmail.com (Travis Kirstine) Date: Tue, 4 Jun 2019 08:47:28 -0400 Subject: [MapProxy] Problems with WMTS grid configuration In-Reply-To: References: Message-ID: Hey Matthias, 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? I've included a sample of what worked for me for the following WMTS - hope it helps. https://www.toronto.ca/city-government/data-research-maps/open-data/open-data-catalogue/#b2d79926-bce9-989c-390b-7ff5247b6515 grids: spherical_mercator: srs: EPSG:3857 res_factor: 2 num_levels: 22 bbox: [-20037508, -20037508, 20037508, 20037508] bbox_srs: EPSG:3857 tile_size: [256,256] origin: sw GoogleMapsCompatible: origin: nw bbox: [-20037508, -20037508, 20037508, 20037508] bbox_srs: EPSG:3857 tile_size: [256,256] srs: EPSG:3857 res: [ # res level scale @90.7 DPI 156543.0339280410, # 0 559082264.02871776 78271.5169640205, # 1 279541132.01435888 39135.7584820102, # 2 139770566.00717941 19567.8792410051, # 3 69885283.00358970 9783.9396205026, # 4 34942641.50179486 4891.9698102513, # 5 17471320.75089743 2445.9849051256, # 6 8735660.37544871 1222.9924525628, # 7 4367830.18772436 611.4962262814, # 8 2183915.09386218 305.7481131407, # 9 1091957.54693109 152.8740565704, # 10 545978.77346554 76.4370282852, # 11 272989.38673277 38.2185141426, # 12 136494.69336639 19.1092570713, # 13 68247.34668319 9.5546285356, # 14 34123.67334160 4.7773142678, # 15 17061.83667080 2.3886571339, # 16 8530.91833540 1.1943285670, # 17 4265.45916770 0.5971642835, # 18 2132.72958385 ] ####################### sources: toronto_1978_wmts: type: tile url: ' 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 ' grid: GoogleMapsCompatible transparent: true on_error: 404: response: transparent cache: false coverage: datasource: "PG: dbname='db' host='foobar' user='usr'' password='pw'" where: 'SELECT boundary_3857 FROM layers WHERE id = 379' srs: 'EPSG:3857' ############################## caches: toronto_1978_cache: grids: [GoogleMapsCompatible, spherical_mercator] sources: [toronto_1978_wmts] bulk_meta_tiles: true cache: type: sqlite directory: /opt/caches/sqlite/toronto_1978_cache ################################# layers: - name: toronto_1978 title: City of Toronto 1978 sources: [toronto_1978_cache] On Mon, 3 Jun 2019 at 11:44, Matthias Woltering wrote: > Hi all, > > I have problems creating the correct mapproxy-grid. Maybe someone can > help me?! > > > source (getCapabilities): > ========================= > > < > https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS > ?> > > > xmlns:ows="http://www.opengis.net/ows/1.1" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:gml="http://www.opengis.net/gml" > xsi:schemaLocation="http://www.opengis.net/wmts/1.0 > http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" > version="1.0.0"> > > RIPS_TK_Cache > OGC WMTS > 1.0.0 > > > > > > xlink:href=" > http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml > "> > > > RESTful > > > > > xlink:href=" > http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS > ?"> > > > KVP > > > > > > > > > > xlink:href=" > http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/ > "> > > > RESTful > > > > xlink:href=" > http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS > ?"> > > > KVP > > > > > > > > > RIPS_TK_Cache > RIPS_TK_Cache > > 250000.00000000093 5200000.000000004 > 749999.9999999991 5600000.000000004 > > 5.474640224093635 46.90644116046651 > 12.525359775906365 50.55193238381328 > > > image/png > > default028mm > > template=" > 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" > > /> > > > TileMatrix using 0.28mm > The tile matrix set that has scale values calculated based > on the dpi defined by OGC specification (dpi assumes 0.28mm as the > physical distance of a pixel). > default028mm > urn:ogc:def:crs:EPSG::25832 > > 0 > 472471.18303754483 > -5120900.0 9998100.0 > 256 256 > 174 142 > > > 1 > 188988.4732150179 > -5120900.0 9998100.0 > 256 256 > 434 355 > > > 2 > 94494.23660750895 > -5120900.0 9998100.0 > 256 256 > 867 709 > > > 3 > 47247.118303754476 > -5120900.0 9998100.0 > 256 256 > 1734 1417 > > > 4 > 23623.559151877238 > -5120900.0 9998100.0 > 256 256 > 3468 2834 > > > 5 > 11811.779575938619 > -5120900.0 9998100.0 > 256 256 > 6935 5668 > > > 6 > 6142.125379488082 > -5120900.0 9998100.0 > 256 256 > 13335 10899 > > > > xlink:href=" > http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml" > > /> > > parts of mapproxy-configuration: > ================================ > > layers: > - name: topo > title: topographische karte > sources: [cache_topo] > > > caches: > cache_topo: > grids: [rips_grid] > sources: [source_topo] > format: image/png > request_format: image/png > > source_topo: > type: tile > grid: rips_grid > url: > > 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 > coverage: > bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, > 50.55193238381328] > bbox_srs: 'EPSG:4326' > > > > rips_grid: > origin: 'nw' > bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, > 50.55193238381328] > bbox_srs: 'EPSG:4326' > srs: 'EPSG:25832' > > # mapproxy-util scales --as-res-config 472471.18303754 > 188988.47321502 94494.23660751 47247.11830375 23623.55915188 > 11811.77957594 6142.12537949 > res: [ > # res level scale @90.7 DPI > 132.2919312505, # 0 472471.18303754 > 52.9167725002, # 1 188988.47321502 > 26.4583862501, # 2 94494.23660751 > 13.2291931250, # 3 47247.11830375 > 6.6145965625, # 4 23623.55915188 > 3.3072982813, # 5 11811.77957594 > 1.7197951063, # 6 6142.12537949 > ] > > > Problems: > ========= > > 1. check wmts via qgis (see url above): map is visible. At zoom 0 the > urls of tiles with maps have a range between > TileCol [160..171] > TileRow [131..140] > see for example (Pforzheim): > < > 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> > > > > 2. if I check the wmts in mapproxy-demo, no map is visible. Following > errors are seen: > > [2019-06-03 17:35:53,563] mapproxy.source.request - INFO - GET > > 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 > 404 - 151 > [2019-06-03 17:35:53,563] mapproxy.source.tile - WARNING - could not > retrieve tile: HTTP Error > " > 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": > > 404 > > At zoom 0 the urls of tiles with maps have a range between > TileCol [4..7] > TileRow [6..10] > > Do I have to set an offset? (Is this possible?) I tried to use the bbox > in utm32-coordinates. No effect. > > Thanks in advance! > > > _______________________________________________ > MapProxy mailing list > MapProxy at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapproxy -------------- next part -------------- An HTML attachment was scrubbed... URL: From niarolf at gmail.com Tue Jun 4 05:59:04 2019 From: niarolf at gmail.com (Bocquet Florian) Date: Tue, 4 Jun 2019 14:59:04 +0200 Subject: [MapProxy] Problems with WMTS grid configuration In-Reply-To: References: Message-ID: Hi Matthias, chech your source configuration : with this document (https://mapproxy.org/docs/1.11.0/sources.html#tiles) you can make a test with that : source_topo: type: tile grid: rips_grid url: 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 bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, 50.55193238381328] bbox_srs: 'EPSG:4326' 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 ! Le mar. 4 juin 2019 à 14:47, Travis Kirstine a écrit : > Hey Matthias, > > 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? > I've included a sample of what worked for me for the following WMTS - hope > it helps. > > > https://www.toronto.ca/city-government/data-research-maps/open-data/open-data-catalogue/#b2d79926-bce9-989c-390b-7ff5247b6515 > > > grids: > spherical_mercator: > srs: EPSG:3857 > res_factor: 2 > num_levels: 22 > bbox: [-20037508, -20037508, 20037508, 20037508] > bbox_srs: EPSG:3857 > tile_size: [256,256] > origin: sw > GoogleMapsCompatible: > origin: nw > bbox: [-20037508, -20037508, 20037508, 20037508] > bbox_srs: EPSG:3857 > tile_size: [256,256] > srs: EPSG:3857 > res: [ > # res level scale @90.7 DPI > 156543.0339280410, # 0 559082264.02871776 > 78271.5169640205, # 1 279541132.01435888 > 39135.7584820102, # 2 139770566.00717941 > 19567.8792410051, # 3 69885283.00358970 > 9783.9396205026, # 4 34942641.50179486 > 4891.9698102513, # 5 17471320.75089743 > 2445.9849051256, # 6 8735660.37544871 > 1222.9924525628, # 7 4367830.18772436 > 611.4962262814, # 8 2183915.09386218 > 305.7481131407, # 9 1091957.54693109 > 152.8740565704, # 10 545978.77346554 > 76.4370282852, # 11 272989.38673277 > 38.2185141426, # 12 136494.69336639 > 19.1092570713, # 13 68247.34668319 > 9.5546285356, # 14 34123.67334160 > 4.7773142678, # 15 17061.83667080 > 2.3886571339, # 16 8530.91833540 > 1.1943285670, # 17 4265.45916770 > 0.5971642835, # 18 2132.72958385 > ] > > ####################### > > sources: > toronto_1978_wmts: > type: tile > url: ' > 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 > ' > grid: GoogleMapsCompatible > transparent: true > on_error: > 404: > response: transparent > cache: false > coverage: > datasource: "PG: dbname='db' host='foobar' user='usr'' > password='pw'" > where: 'SELECT boundary_3857 FROM layers WHERE id = 379' > srs: 'EPSG:3857' > ############################## > > caches: > toronto_1978_cache: > grids: [GoogleMapsCompatible, spherical_mercator] > sources: [toronto_1978_wmts] > bulk_meta_tiles: true > cache: > type: sqlite > directory: /opt/caches/sqlite/toronto_1978_cache > > ################################# > > layers: > - name: toronto_1978 > title: City of Toronto 1978 > sources: [toronto_1978_cache] > > > > > > On Mon, 3 Jun 2019 at 11:44, Matthias Woltering > wrote: > >> Hi all, >> >> I have problems creating the correct mapproxy-grid. Maybe someone can >> help me?! >> >> >> source (getCapabilities): >> ========================= >> >> < >> https://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS >> ?> >> >> >> > xmlns:ows="http://www.opengis.net/ows/1.1" >> xmlns:xlink="http://www.w3.org/1999/xlink" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:gml="http://www.opengis.net/gml" >> xsi:schemaLocation="http://www.opengis.net/wmts/1.0 >> http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" >> version="1.0.0"> >> >> RIPS_TK_Cache >> OGC WMTS >> 1.0.0 >> >> >> >> >> >> > xlink:href=" >> http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml >> "> >> >> >> RESTful >> >> >> >> >> > xlink:href=" >> http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS >> ?"> >> >> >> KVP >> >> >> >> >> >> >> >> >> >> > xlink:href=" >> http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/ >> "> >> >> >> RESTful >> >> >> >> > xlink:href=" >> http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS >> ?"> >> >> >> KVP >> >> >> >> >> >> >> >> >> RIPS_TK_Cache >> RIPS_TK_Cache >> >> 250000.00000000093 5200000.000000004 >> 749999.9999999991 5600000.000000004 >> >> 5.474640224093635 46.90644116046651 >> 12.525359775906365 50.55193238381328 >> >> >> image/png >> >> default028mm >> >> > template=" >> 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" >> >> /> >> >> >> TileMatrix using 0.28mm >> The tile matrix set that has scale values calculated based >> on the dpi defined by OGC specification (dpi assumes 0.28mm as the >> physical distance of a pixel). >> default028mm >> urn:ogc:def:crs:EPSG::25832 >> >> 0 >> 472471.18303754483 >> -5120900.0 9998100.0 >> 256 256 >> 174 142 >> >> >> 1 >> 188988.4732150179 >> -5120900.0 9998100.0 >> 256 256 >> 434 355 >> >> >> 2 >> 94494.23660750895 >> -5120900.0 9998100.0 >> 256 256 >> 867 709 >> >> >> 3 >> 47247.118303754476 >> -5120900.0 9998100.0 >> 256 256 >> 1734 1417 >> >> >> 4 >> 23623.559151877238 >> -5120900.0 9998100.0 >> 256 256 >> 3468 2834 >> >> >> 5 >> 11811.779575938619 >> -5120900.0 9998100.0 >> 256 256 >> 6935 5668 >> >> >> 6 >> 6142.125379488082 >> -5120900.0 9998100.0 >> 256 256 >> 13335 10899 >> >> >> >> > xlink:href=" >> http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml" >> >> /> >> >> parts of mapproxy-configuration: >> ================================ >> >> layers: >> - name: topo >> title: topographische karte >> sources: [cache_topo] >> >> >> caches: >> cache_topo: >> grids: [rips_grid] >> sources: [source_topo] >> format: image/png >> request_format: image/png >> >> source_topo: >> type: tile >> grid: rips_grid >> url: >> >> 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 >> coverage: >> bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, >> 50.55193238381328] >> bbox_srs: 'EPSG:4326' >> >> >> >> rips_grid: >> origin: 'nw' >> bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, >> 50.55193238381328] >> bbox_srs: 'EPSG:4326' >> srs: 'EPSG:25832' >> >> # mapproxy-util scales --as-res-config 472471.18303754 >> 188988.47321502 94494.23660751 47247.11830375 23623.55915188 >> 11811.77957594 6142.12537949 >> res: [ >> # res level scale @90.7 DPI >> 132.2919312505, # 0 472471.18303754 >> 52.9167725002, # 1 188988.47321502 >> 26.4583862501, # 2 94494.23660751 >> 13.2291931250, # 3 47247.11830375 >> 6.6145965625, # 4 23623.55915188 >> 3.3072982813, # 5 11811.77957594 >> 1.7197951063, # 6 6142.12537949 >> ] >> >> >> Problems: >> ========= >> >> 1. check wmts via qgis (see url above): map is visible. At zoom 0 the >> urls of tiles with maps have a range between >> TileCol [160..171] >> TileRow [131..140] >> see for example (Pforzheim): >> < >> 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> >> >> >> >> 2. if I check the wmts in mapproxy-demo, no map is visible. Following >> errors are seen: >> >> [2019-06-03 17:35:53,563] mapproxy.source.request - INFO - GET >> >> 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 >> 404 - 151 >> [2019-06-03 17:35:53,563] mapproxy.source.tile - WARNING - could not >> retrieve tile: HTTP Error >> " >> 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": >> >> 404 >> >> At zoom 0 the urls of tiles with maps have a range between >> TileCol [4..7] >> TileRow [6..10] >> >> Do I have to set an offset? (Is this possible?) I tried to use the bbox >> in utm32-coordinates. No effect. >> >> Thanks in advance! >> >> >> _______________________________________________ >> MapProxy mailing list >> MapProxy at lists.osgeo.org >> https://lists.osgeo.org/mailman/listinfo/mapproxy > > _______________________________________________ > MapProxy mailing list > MapProxy at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapproxy -------------- next part -------------- An HTML attachment was scrubbed... URL: From woltering at gmail.com Tue Jun 4 06:14:31 2019 From: woltering at gmail.com (Matthias Woltering) Date: Tue, 4 Jun 2019 15:14:31 +0200 Subject: [MapProxy] Problems with WMTS grid configuration In-Reply-To: References: Message-ID: <4287b07b-d5e5-a56c-9dc5-6dfc83817237@gmail.com> Hi Travis, thanks for your reply. I found the solution this morning. The problem is the grid-Tag -5120900.0 9998100.0. That corner is different from the bounding box of the layer. That makes the grid-definition a little bit complicated. I had to calculate new boundaries for the grid (the upper right corner). Helpful is the OpenGIS WMTS Standard I used the following formulae (page 24/25): pixelSpan = scaleDenominator × 0.28 10-3 / metersPerUnit(crs); tileSpanX = tileWidth × pixelSpan; tileSpanY = tileHeight × pixelSpan; tileMatrixMaxX = tileMatrixMinX + tileSpanX × matrixWidth; tileMatrixMinY = tileMatrixMaxY - tileSpanY × matrixHeight; In my example I had the following variable from the getCapabilitie-Document: 472471.18303754483 -5120900.0 9998100.0 256 256 174 142 using the formulae from above: ============================== scaleDenominator 472471,183 pixel/mm 0,28 pixelSpan=scaleDenominator*0.28/1000 132,2919312 tileWidth 256 tileSpanX=tileWidth*pixelSpan 33866,7344 tileMatrixMinX -5120900 tileMatrixMaxY 9998100 matrixWidth 174 matrixHeight 142 tileMatrixMaxX=tileMatrixMinX+tileSpanX*matrixWidth 771911,7855 tileMatrixMinY=tileMatrixMaxY-tileSpanY*matrixHeight 5189023,715 working grid/source-configuration: ================================== source_topo: type: tile grid: rips_grid url: 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/%(y)s/%(x)s.png coverage: bbox: [250000, 5200000, 750000, 5600000] bbox_srs: 'EPSG:25832' rips_grid: origin: 'nw' bbox: [-5120900.0, 5189023, 771911, 9998100.0] bbox_srs: 'EPSG:25832' srs: 'EPSG:25832' Thanks, Matthias Am 04.06.2019 um 14:47 schrieb Travis Kirstine: > Hey Matthias, > > 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? > I've included a sample of what worked for me for the following WMTS - > hope it helps. > > https://www.toronto.ca/city-government/data-research-maps/open-data/open-data-catalogue/#b2d79926-bce9-989c-390b-7ff5247b6515 > > > grids: >    spherical_mercator: >       srs: EPSG:3857 >       res_factor: 2 >       num_levels: 22 >       bbox: [-20037508, -20037508, 20037508, 20037508] >       bbox_srs: EPSG:3857 >       tile_size: [256,256] >       origin: sw >    GoogleMapsCompatible: >       origin: nw >       bbox: [-20037508, -20037508, 20037508, 20037508] >       bbox_srs: EPSG:3857 >       tile_size: [256,256] >       srs: EPSG:3857 >       res: [ >            #  res            level     scale @90.7 DPI >          156543.0339280410, #  0   559082264.02871776 >           78271.5169640205, #  1   279541132.01435888 >           39135.7584820102, #  2   139770566.00717941 >           19567.8792410051, #  3    69885283.00358970 >            9783.9396205026, #  4    34942641.50179486 >            4891.9698102513, #  5    17471320.75089743 >            2445.9849051256, #  6     8735660.37544871 >            1222.9924525628, #  7     4367830.18772436 >             611.4962262814, #  8     2183915.09386218 >             305.7481131407, #  9     1091957.54693109 >             152.8740565704, # 10      545978.77346554 >              76.4370282852, # 11      272989.38673277 >              38.2185141426, # 12      136494.69336639 >              19.1092570713, # 13       68247.34668319 >               9.5546285356, # 14       34123.67334160 >               4.7773142678, # 15       17061.83667080 >               2.3886571339, # 16        8530.91833540 >               1.1943285670, # 17        4265.45916770 >               0.5971642835, # 18        2132.72958385 >       ] > > ####################### > > sources: >    toronto_1978_wmts: >       type: tile >       url: > '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' >       grid: GoogleMapsCompatible >       transparent: true >       on_error: >          404: >             response: transparent >             cache: false >       coverage: >          datasource: "PG: dbname='db' host='foobar' user='usr'' > password='pw'" >          where: 'SELECT boundary_3857 FROM layers WHERE id = 379' >          srs: 'EPSG:3857' > ############################## > > caches: >    toronto_1978_cache: >       grids: [GoogleMapsCompatible, spherical_mercator] >       sources: [toronto_1978_wmts] >       bulk_meta_tiles: true >       cache: >         type: sqlite >         directory: /opt/caches/sqlite/toronto_1978_cache > > ################################# > > layers: >          - name: toronto_1978 >            title: City of Toronto 1978 >            sources: [toronto_1978_cache] > > > > > > On Mon, 3 Jun 2019 at 11:44, Matthias Woltering > wrote: > > Hi all, > > I have problems creating the correct mapproxy-grid. Maybe someone can > help me?! > > > source (getCapabilities): > ========================= > > > > > xmlns:ows="http://www.opengis.net/ows/1.1" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:gml="http://www.opengis.net/gml" > xsi:schemaLocation="http://www.opengis.net/wmts/1.0 > http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" > version="1.0.0"> > > RIPS_TK_Cache > OGC WMTS > 1.0.0 > > > > > > xlink:href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"> > > > RESTful > > > > > xlink:href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS?"> > > > KVP > > > > > > > > > > xlink:href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/tile/1.0.0/"> > > > RESTful > > > > xlink:href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS?"> > > > KVP > > > > > > > > > RIPS_TK_Cache > RIPS_TK_Cache > > 250000.00000000093 5200000.000000004 > 749999.9999999991 5600000.000000004 > > 5.474640224093635 46.90644116046651 > 12.525359775906365 50.55193238381328 > > > image/png > > default028mm > > template="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 > " > > /> > > > TileMatrix using 0.28mm > The tile matrix set that has scale values calculated > based > on the dpi defined by OGC specification (dpi assumes 0.28mm as the > physical distance of a pixel). > default028mm > urn:ogc:def:crs:EPSG::25832 > > 0 > 472471.18303754483 > -5120900.0 9998100.0 > 256 256 > 174 142 > > > 1 > 188988.4732150179 > -5120900.0 9998100.0 > 256 256 > 434 355 > > > 2 > 94494.23660750895 > -5120900.0 9998100.0 > 256 256 > 867 709 > > > 3 > 47247.118303754476 > -5120900.0 9998100.0 > 256 256 > 1734 1417 > > > 4 > 23623.559151877238 > -5120900.0 9998100.0 > 256 256 > 3468 2834 > > > 5 > 11811.779575938619 > -5120900.0 9998100.0 > 256 256 > 6935 5668 > > > 6 > 6142.125379488082 > -5120900.0 9998100.0 > 256 256 > 13335 10899 > > > > xlink:href="http://rips-caches.lubw.baden-wuerttemberg.de/arcgis/rest/services/RIPS_TK_Cache/MapServer/WMTS/1.0.0/WMTSCapabilities.xml" > > /> > > parts of mapproxy-configuration: > ================================ > > layers: >      - name: topo >        title: topographische karte >        sources: [cache_topo] > > > caches: >      cache_topo: >          grids: [rips_grid] >          sources: [source_topo] >          format: image/png >          request_format: image/png > > source_topo: >      type: tile >      grid: rips_grid >      url: > 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 >      coverage: >        bbox: [5.474640224093635, 46.90644116046651, > 12.525359775906365, > 50.55193238381328] >        bbox_srs: 'EPSG:4326' > > > > rips_grid: >      origin: 'nw' >      bbox: [5.474640224093635, 46.90644116046651, 12.525359775906365, > 50.55193238381328] >      bbox_srs: 'EPSG:4326' >      srs: 'EPSG:25832' > >      # mapproxy-util scales --as-res-config 472471.18303754 > 188988.47321502 94494.23660751 47247.11830375 23623.55915188 > 11811.77957594 6142.12537949 >      res: [ >          #  res            level     scale @90.7 DPI >          132.2919312505, #  0      472471.18303754 >           52.9167725002, #  1      188988.47321502 >           26.4583862501, #  2       94494.23660751 >           13.2291931250, #  3       47247.11830375 >            6.6145965625, #  4       23623.55915188 >            3.3072982813, #  5       11811.77957594 >            1.7197951063, #  6        6142.12537949 >          ] > > > Problems: > ========= > > 1. check wmts via qgis (see url above): map is visible. At zoom 0 the > urls of tiles with maps have a range between > TileCol [160..171] > TileRow [131..140] > see for example (Pforzheim): > > > > > 2. if I check the wmts in mapproxy-demo, no map is visible. Following > errors are seen: > > [2019-06-03 17:35:53,563] mapproxy.source.request - INFO - GET > 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 > > 404 - 151 > [2019-06-03 17:35:53,563] mapproxy.source.tile - WARNING - could not > retrieve tile: HTTP Error > "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": > > 404 > > At zoom 0 the urls of tiles with maps have a range between > TileCol [4..7] > TileRow [6..10] > > Do I have to set an offset? (Is this possible?) I tried to use the bbox > in utm32-coordinates. No effect. > > Thanks in advance! > > > _______________________________________________ > MapProxy mailing list > MapProxy at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapproxy > From traviskirstine at gmail.com Mon Jun 10 09:26:18 2019 From: traviskirstine at gmail.com (Travis Kirstine) Date: Mon, 10 Jun 2019 12:26:18 -0400 Subject: [MapProxy] error parsing tms sources with ampersand in url Message-ID: I recently updated to mapproxy 1.12.0a-20190605 and having issues with the parsing of the source tms url which contain an @ which is used in MapCache. In the mapproxy log it appears the url path before the @ is removed resulting in "could not retrieve tile: No response from URL "http://gmaps/10/186/688.xxx": Name or service not known" ## source tms lacombe_2015_tms: type: tile url: ' http://foobar.com/mapcache/tms/1.0.0/lacombe at gmaps/%(tms_path)s.xxx' grid: spherical_mercator transparent: true on_error: 404: response: transparent cache: false coverage: datasource: "PG: dbname='db' host='db' user='db' password='db'" where: 'SELECT boundary_3857 FROM layer WHERE id = 314' srs: 'EPSG:3857' This worked in version 1.10 and 1.11 -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.schmutz at schaellibaum.ch Tue Jun 18 05:52:25 2019 From: d.schmutz at schaellibaum.ch (Schmutz Daniel) Date: Tue, 18 Jun 2019 12:52:25 +0000 Subject: [MapProxy] mapproxy (merging two caches into one layer) Message-ID: <9549BAFD76622E40AEF3C9F4913AC16405E301A6@SRVEXCH01.schaellibaum.local> Hello Mapproxy-Mailing-List We would like to merge two caches into one layer but are having difficulties. We have pre-generated all required Tiles (dataformat=png, size=512x512px) for all of our zoom levels for all of our maps (source type=mapnik), using the seeding functionality. When all of the Tiles were generated, we made all folders immutable (read only) (sudo chattr -R +i /home/administrator/Data/mpy/sbm_av_grau_EPSG2056), withholding Mapproxy from generating unwanted Tiles. These Tiles are used in WMS and WMTS connections. We now want to merge two particular caches (two folders/layers having the same tile size, the same srs, the same origin, the same stretch factor but different bbox). We would like to access the Tiles directly (source type=mapnik is no longer required as all Tiles are available). We have made a transition between the individual caches (max_res=650 and min_res=650). The problem that we are having is that we can only see one of the caches but never both at the same time. The merged layer in our configuration file is called 'sbm_osm_kombiniert_farb'. Have attached the yaml configuration file. Any help would be appreciated. Thanks and Regards Daniel Attachment: mpy_conf_main.yaml mpy_conf_main.yaml Freundliche Grüsse Daniel Schmutz Schällibaum AG Ingenieure und Architekten, Ebnaterstrasse 143, CH-9630 Wattwil T +41 71 987 60 90, F +41 71 987 60 91, www.schaellibaum.ch Daniel Schmutz, Geomatikingenieur Direkt +41 71 987 00 68, Mobile +41 79 479 76 55, Email d.schmutz at schaellibaum.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mpy_conf_main.yaml Type: application/octet-stream Size: 9232 bytes Desc: mpy_conf_main.yaml URL: From traviskirstine at gmail.com Tue Jun 18 08:11:28 2019 From: traviskirstine at gmail.com (Travis Kirstine) Date: Tue, 18 Jun 2019 11:11:28 -0400 Subject: [MapProxy] mapproxy (merging two caches into one layer) In-Reply-To: <9549BAFD76622E40AEF3C9F4913AC16405E301A6@SRVEXCH01.schaellibaum.local> References: <9549BAFD76622E40AEF3C9F4913AC16405E301A6@SRVEXCH01.schaellibaum.local> Message-ID: I think you need to perform the merge at the cache level and I believe you need to store the tiles. Try something like this: caches: sbm_osm_kombiniert_farb_eur: grids: [epsg2056_lv95_europa] sources: [sbm_osm_kombiniert_farb_eur_source] sbm_osm_kombiniert_farb_sui: grids: [epsg2056_lv95_voll] sources: [sbm_osm_kombiniert_farb_sui_source] disable_storage: true merged_cache_osm: grids: [ epsg2056_lv95_voll, epsg2056_lv95_europa] sources: [sbm_osm_kombiniert_farb_eur_source, sbm_osm_kombiniert_farb_sui_source] # other stuff - meta_buffer / meta_size etc.... cache: type: # all your cache parameters layers: - name: sbm_osm_kombiniert_farb title: sbm_osm_kombiniert_farb tile_sources: [merged_cache_osm] ... On Tue, 18 Jun 2019 at 09:22, Schmutz Daniel wrote: > Hello Mapproxy-Mailing-List > > > > We would like to merge two caches into one layer but are having > difficulties. > > > > We have pre-generated all required Tiles (dataformat=png, size=512x512px) > for all of our zoom levels for all of our maps (source type=mapnik), using > the seeding functionality. When all of the Tiles were generated, we made > all folders immutable (read only) (sudo chattr -R +i > /home/administrator/Data/mpy/sbm_av_grau_EPSG2056), withholding Mapproxy > from generating unwanted Tiles. These Tiles are used in WMS and WMTS > connections. > > > > We now want to merge two particular caches (two folders/layers having the > same tile size, the same srs, the same origin, the same stretch factor but > different bbox). We would like to access the Tiles directly (source > type=mapnik is no longer required as all Tiles are available). > > > > We have made a transition between the individual caches (max_res=650 and > min_res=650). The problem that we are having is that we can only see one of > the caches but never both at the same time. The merged layer in our > configuration file is called ‚sbm_osm_kombiniert_farb‘. > > > > Have attached the yaml configuration file. > > > > Any help would be appreciated. > > Thanks and Regards Daniel > > > > Attachment: mpy_conf_main.yaml mpy_conf_main.yaml > > > > Freundliche Grüsse > > Daniel Schmutz > > > > *Schällibaum AG Ingenieure und Architekten, Ebnaterstrasse 143, > CH-9630 Wattwil* > > T +41 71 987 60 90, F +41 71 987 60 91, *www.schaellibaum.ch > * > > > > Daniel Schmutz, Geomatikingenieur > > Direkt +41 71 987 00 68, Mobile +41 79 479 76 55, Email > d.schmutz at schaellibaum.ch > > > _______________________________________________ > MapProxy mailing list > MapProxy at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapproxy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan-lists at lightpear.com Wed Jun 19 01:43:18 2019 From: jonathan-lists at lightpear.com (Jonathan Moules) Date: Wed, 19 Jun 2019 09:43:18 +0100 Subject: [MapProxy] error parsing tms sources with ampersand in url In-Reply-To: References: Message-ID: <69c25316-9a39-18f3-f1e0-f553694a4196@lightpear.com> Hi Travis, I suspect the given TMS url is invalid. I don't believe you're allowed to have @ characters unencoded in a URL except for their explicit reserved use: https://stackoverflow.com/questions/1856785/characters-allowed-in-a-url Anything prefixing an @ character is considered to be username/password, with the hostname appearing after the @, thus the url parser thiks the hostname is "gmaps". I'd suggest the TMS URL needs to be fixed. Cheers, Jonathan On 10/06/2019 17:26, Travis Kirstine wrote: > I recently updated to mapproxy  1.12.0a-20190605 and having issues > with the parsing of the source tms url which contain an @ which is > used in MapCache.  In the mapproxy log it appears the url path before > the @ is removed resulting in > > "could not retrieve tile: No response from URL > "http://gmaps/10/186/688.xxx": Name or service not known" > > ## source tms >    lacombe_2015_tms: >       type: tile >       url: > 'http://foobar.com/mapcache/tms/1.0.0/lacombe at gmaps/%(tms_path)s.xxx > ' >       grid: spherical_mercator >       transparent: true >       on_error: >          404: >             response: transparent >             cache: false >       coverage: >          datasource: "PG: dbname='db' host='db' user='db' password='db'" >          where: 'SELECT boundary_3857 FROM layer WHERE id = 314' >          srs: 'EPSG:3857' > > This worked in version 1.10 and 1.11 > > > > > > > _______________________________________________ > MapProxy mailing list > MapProxy at lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapproxy -------------- next part -------------- An HTML attachment was scrubbed... URL: