[MapProxy] Create WMS from PDOK WMTS and create maps below minimum tile scale

Oliver Tonnhofer olt at omniscale.de
Fri Nov 24 03:57:33 PST 2017


Hi,


> On 24.11.2017, at 12:03, Just van den Broecke <just at justobjects.nl> wrote:
> 
> So if I understand this: in the case where the original WMS Source is not available e.g. when serving from a shipped pre-tiled cache with levels 1-N, MP could in theory serve tiles for levels (N+1)+ by calling the external WMS Service of its own tile-cache as its WMS Source? That would be awesome!

You can create a source and call MapProxy WMS (external), but you can also create a cache that uses another cache as a source (like calling the WMS internally).


> The case Ron describes, and I was trying to explain is similar but the MP instance doesn't have a (filled) tilecache, only an external TMS/WMTS Source. Challenge is to still call MP's WMS for the levels not served by the TMS/WMTS Source. Will need some advanced combined-cache/grid MP-config hacking. (As the Dutch national map-service PDOK Ron and I are referring to is migrating from GeoWebCache to MP, but will probably close off WMS access to GWC/MP...)


It's not that much hacking :)

Extending the example from https://mapproxy.org/docs/nightly/configuration_examples.html#create-wms-from-existing-tile-server

If you only need this for WMS:

layers:
 - name: my_layer
   title: WMS layer from tiles
   sources: [mycache]

caches:
  mycache:
    grids: [mygrid14]
    sources: [my_tile_source]

sources:
  my_tile_source:
    grid: mygrid14
    type: tile
    url: http://tileserver/%(tms_path)s.png


Or if you also need WMTS/TMS:

layers:
 - name: my_layer
   title: WMS layer from tiles
   sources: [mycache]

caches:
  mycache:
    grids: [mygrid18]
    sources: [mycache_in]
    disable_storage: true # optional
  mycache_in:
    grids: [mygrid14]
    sources: [my_tile_source]

sources:
  my_tile_source:
    grid: mygrid14
    type: tile
    url: http://tileserver/%(tms_path)s.png






Regards,
Oliver

-- 
Oliver Tonnhofer  | Omniscale GmbH & Co KG  | https://omniscale.com
OpenStreetMap WMS and tile services         | https://maps.omniscale.com



More information about the MapProxy mailing list