[MapProxy] convert WMTS koordinate reference with map

Travis Kirstine traviskirstine at gmail.com
Thu Oct 8 14:13:51 PDT 2020


 I think you may need to provide more information in your grid definition
for the source. You can use your wmts getcapaiblites and the mapproxy-util
to help with the scales
https://mapproxy.org/docs/nightly/mapproxy_util.html#mapproxy-util-scales

This worked for me for a ESRI WMTS

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
      ]

caches:
   toronto_1978_cache:
      grids: [GoogleMapsCompatible, spherical_mercator]
      sources: [toronto_1978_tms]
      bulk_meta_tiles: true
      cache:
        type: sqlite
        directory: /opt/caches/sqlite/toronto_1978_cache

sources:
  toronto_1978_tms:
      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='postgis_db' host=foobar user='foobar'
password='foobar'"
 #      where: 'SELECT boundary_3857 FROM layer WHERE id = 379'
 #     srs: 'EPSG:3857'

On Thu, 8 Oct 2020 at 06:55, 4 t <d.viert at googlemail.com> wrote:

> Hello everyone,
>
> i am currently failing to convert a swiss wmts service in EPSG code 2056
> to a WMTS in the globalwebmercator with mapproxy.
> Can anyone tell me where the mistake lies? Thank you very much in advance.
>
> My configuration (yaml-file):
>
> layers:
>>    - name: ch_basiskarte                        #online
>>      title: Basiskarte Zuerich
>>      sources: [ch_basiskarte_cache]
>> caches:
>>     ch_basiskarte_cache:
>>         sources: [ch_basiskarte_cache_old]
>>         format: image/png
>>         disable_storage: false
>>         grids: ['GLOBAL_WEBMERCATOR']
>>     ch_basiskarte_cache_old:
>>         sources: [ch_basiskarte_tiles]
>>         format: image/png
>>         disable_storage: false
>>         grids: CH1903
>> sources:
>>     ch_basiskarte_tiles:
>>         type: tile
>>         url:
>> https://www.ogd.stadt-zuerich.ch/mapproxy/wmts/1.0.0/Basiskarte_Zuerich_Raster/default/%(tms_path)s.%(format)s
>>         grid: CH1903
>> grids:
>>     CH1903:
>>         srs: EPSG:2056
>>
>>
>
> Kind regards,
> David
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapproxy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20201008/df18c200/attachment.html>


More information about the MapProxy mailing list