<div dir="ltr">Thanks for your help Just.<div>I hadn't tried applying the min_res and max_res directly to the source only against a grid. My configuration is below.</div><div><br></div><div>Josh</div><div><br></div><div><div><i>services:</i></div><div><i>  demo:</i></div><div><i>  tms:</i></div><div><i>  wmts:</i></div><div><i>    restful: true</i></div><div><i>    kvp: true</i></div><div><i><br></i></div><div><i>layers:</i></div><div><i>-   name: Topo</i></div><div><i>    title: Topo</i></div><div><i>    sources: [topo_cache_gpk]</i></div><div><i><br></i></div><div><i>caches:</i></div><div><i>  topo_cache_gpk:</i></div><div><i>    sources: [topo_esri_source, linz_topo250_source, linz_topo50_source]</i></div><div><i>    grids: [GLOBAL_WEBMERCATOR]</i></div><div><i>    cache:</i></div><div><i>      type: geopackage</i></div><div><i>      filename: /opt/mapproxy/cache_data/topo_tiles.gpk</i></div><div><i>      table_name: topo</i></div><div><i><br></i></div><div><i>sources:</i></div><div><i>  topo_esri_source:</i></div><div><i>    type: tile</i></div><div><i>    transparent: true</i></div><div><i>    grid: GLOBAL_WEBMERCATOR</i></div><div><i>    url: <a href="http://agshost/arcgis/rest/services/Topo/MapServer/tile/%(z)s/%(y)s/%(x)s">http://agshost/arcgis/rest/services/Topo/MapServer/tile/%(z)s/%(y)s/%(x)s</a></i></div><div><i><br></i></div><div><i>  linz_topo250_source:</i></div><div><i>    type: tile</i></div><div><i>    transparent: true</i></div><div><i>    grid: GLOBAL_WEBMERCATOR</i></div><div><i>    url: <a href="http://tiles-a.data-cdn.linz.govt.nz/services;key=api_key/tiles/v4/layer=2324/EPSG:3857/%(z)s/%(x)s/%(y)s.png">http://tiles-a.data-cdn.linz.govt.nz/services;key=api_key/tiles/v4/layer=2324/EPSG:3857/%(z)s/%(x)s/%(y)s.png</a></i></div><div><i>    min_res: 1222</i></div><div><i>    max_res: 38</i></div><div><i><br></i></div><div><i>  linz_topo50_source:</i></div><div><i>    type: tile</i></div><div><i>    transparent: true</i></div><div><i>    grid: GLOBAL_WEBMERCATOR</i></div><div><i>    url: <a href="http://tiles-a.data-cdn.linz.govt.nz/services;key=api_key/tiles/v4/layer=2343/EPSG:3857/%(z)s/%(x)s/%(y)s.png">http://tiles-a.data-cdn.linz.govt.nz/services;key=api_key/tiles/v4/layer=2343/EPSG:3857/%(z)s/%(x)s/%(y)s.png</a></i></div><div><i>    min_res: 38</i></div><div><i>    max_res: 0.2</i></div><div><i><br></i></div><div><i>globals:</i></div><div><i>  image:</i></div><div><i>    formats:</i></div><div><i>      default_format:</i></div><div><i>        format: image/png</i></div><div><i>        colors: 0</i></div><div><i>        resampling_method: bilinear</i></div></div><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 26 August 2017 at 00:37, Just van den Broecke <span dir="ltr"><<a href="mailto:just@justobjects.nl" target="_blank">just@justobjects.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I just did almost the same, though with 2 sources and without cache-storage. After quite some fiddling with configs, it worked by playing with min_res, max_res and transparency on the source-level.<br>
Keep the grid defs as is (GLOBAL_WEBMERCATOR in your case). Tiles are here only requested from 1 TMS remote source at a time, otherwise a transparent png is returned by source locally, my config-sketch:<br>
<br>
layers:<br>
  - name: combilayer<br>
    title: combined topo..<br>
    sources: [combi_cache]<br>
<br>
caches:<br>
  combi_cache:<br>
    grids: [dutch_grid]<br>
    disable_storage: true<br>
    sources: [source1, source2]<br>
    format: image/png<br>
    meta_buffer: 0<br>
<br>
sources:<br>
  source1:<br>
    type: tile<br>
    url: URL1..%(tms_path)s.png<br>
    transparent: true<br>
    grid: dutch_grid<br>
    max_res: 0.84<br>
<br>
  source2:<br>
    type: tile<br>
    url: URL2..%(tms_path)s.png<br>
    transparent: true<br>
    grid: dutch_grid<br>
    min_res: 0.84<br>
<br>
grids:<br>
  dutch_grid:<br>
    tile_size: [256, 256]<br>
    srs: 'EPSG:28992'<br>
    bbox: [-285401.920, 22598.080, 595401.920, 903401.920]<br>
    bbox_srs: 'EPSG:28992'<br>
    res: [3440.64, 1720.32, 860.16, 430.08, 215.04, 107.52, 53.76, 26.88, 13.44, 6.72, 3.36, 1.68, 0.84, 0.42, 0.21, 0.105, 0.0525]<br>
<br>
etc, no specific grid definitions. Though with 3 layers you have to play with min_res and max_res for the "middle" scale 1:250. Somehow I got errors "min_res > "max_res" when both specified on source. Looks like they need to be reversed? Maybe others can fill in here.<br>
<br>
Best,<br>
<br>
Just van den Broecke<br>
<br>
On 25-08-17 02:06, Josh Norton wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi there,<br>
<br>
I'm wanting to merge 3 tiled sources into a single tiled service as below:<br>
<br>
Global topo service for levels 0-7<br>
Country 1:250k service for levels 8-12 (rendering the global tiles in<br>
areas outside the country covered)<br>
Country 1:50k service for levels 13- (rendering the global tiles for<br>
areas outside the country covered)<br>
<br>
I have been able to merge the first 2 services where the country 250k<br>
renders on top of the global service but I am unable to control the<br>
scale that the 250k or 50k tiles start to render.<br>
I have tried specifying a set resolution list, setting min_res and<br>
max_res, num_levels etc<br>
<br>
A working configuration file is below with some options commented out in<br>
the grid section that do not produce the desired results.<br>
Grateful for any help anyone can offer.<br>
<br>
Josh<br>
<br>
<br>
/services:/<br>
/  demo:/<br>
/  tms:/<br>
/  wmts:/<br>
/    restful: true/<br>
/    kvp: true/<br>
/<br>
/<br>
/layers:/<br>
/<br>
/<br>
/-   name: Topo/<br>
/    title: Topo/<br>
/    sources: [topo_cache_gpk]/<br>
/<br>
/<br>
/-   name: LINZtopo50/<br>
/    title: LINZ Topo 50/<br>
/    sources: [linz_topo50_cache_gpk]/<br>
/<br>
/<br>
/-   name: LINZtopo250/<br>
/    title: LINZ Topo 250/<br>
/    sources: [linz_topo250_cache_gpk]/<br>
/    /<br>
/caches:/<br>
/<br>
/<br>
/  topo_cache_gpk:/<br>
/    sources: [topo_esri_source, linz_topo250_source]/<br>
/    grids: [GLOBAL_WEBMERCATOR]/<br>
/    cache:/<br>
/      type: geopackage/<br>
/      filename: /opt/mapproxy/cache_data/topo_<wbr>tiles.gpk/<br>
/      table_name: topo/<br>
/<br>
/<br>
/  topo_esri_cache_gpk:/<br>
/    sources: [topo_esri_source]/<br>
/    grids: [GLOBAL_WEBMERCATOR]/<br>
/    cache:/<br>
/      type: geopackage/<br>
/      filename: /opt/mapproxy/cache_data/topo_<wbr>esri_tiles.gpk/<br>
/      table_name: topo_esri/<br>
/<br>
/<br>
/  linz_topo50_cache_gpk:/<br>
/    sources: [linz_topo50_source]/<br>
/    grids: [GLOBAL_WEBMERCATOR]/<br>
/    cache:/<br>
/      type: geopackage/<br>
/      filename: /opt/mapproxy/cache_data/LINZ_<wbr>topo50_tiles.gpk/<br>
/      table_name: linz_topo50/<br>
/      /<br>
/  linz_topo250_cache_gpk:/<br>
/    sources: [linz_topo250_source]/<br>
/    grids: [GLOBAL_WEBMERCATOR]/<br>
/    cache:/<br>
/      type: geopackage/<br>
/      filename: /opt/mapproxy/cache_data/LINZ_<wbr>topo250_tiles.gpk/<br>
/      table_name: linz_topo250/<br>
/<br>
/<br>
/sources:/<br>
/  topo_esri_source:/<br>
/    type: tile/<br>
/    grid: GLOBAL_WEBMERCATOR/<br>
/    url:<br>
<a href="http://10.0.0.232:6080/arcgis/rest/services/Topo/MapServer/tile/%(z)s/%(y)s/%(x)s" rel="noreferrer" target="_blank">http://10.0.0.232:6080/arcgis/<wbr>rest/services/Topo/MapServer/t<wbr>ile/%(z)s/%(y)s/%(x)s</a><br>
<<a href="http://10.0.0.232:6080/arcgis/rest/services/Topo/MapServer/tile/%(z)s/%(y)s/%(x)s" rel="noreferrer" target="_blank">http://10.0.0.232:6080/arcgis<wbr>/rest/services/Topo/MapServer/<wbr>tile/%(z)s/%(y)s/%(x)s</a>>/<br>
/<br>
/<br>
/  linz_topo50_source:/<br>
/    type: tile/<br>
/    transparent: true/<br>
/    grid: 'topo50grid'/<br>
/    url:<br>
<a href="http://tiles-a.data-cdn.linz.govt.nz/services;key=dd53dc504e3b4c37a627fa41a74ffd2b/tiles/v4/layer=2343/EPSG:3857/%(z)s/%(x)s/%(y)s.png" rel="noreferrer" target="_blank">http://tiles-a.data-cdn.linz.g<wbr>ovt.nz/services;key=dd53dc504e<wbr>3b4c37a627fa41a74ffd2b/tiles/<wbr>v4/layer=2343/EPSG:3857/%(z)s/<wbr>%(x)s/%(y)s.png</a><br>
<<a href="http://tiles-a.data-cdn.linz.govt.nz/services;key=dd53dc504e3b4c37a627fa41a74ffd2b/tiles/v4/layer=2343/EPSG:3857/%(z)s/%(x)s/%(y)s.png" rel="noreferrer" target="_blank">http://tiles-a.data-cdn.linz.<wbr>govt.nz/services;key=dd53dc504<wbr>e3b4c37a627fa41a74ffd2b/tiles/<wbr>v4/layer=2343/EPSG:3857/%(z)s/<wbr>%(x)s/%(y)s.png</a>>/<br>
/  /<br>
/  linz_topo250_source:/<br>
/    type: tile/<br>
/    transparent: true/<br>
/    grid: 'topo250grid'/<br>
/    url:<br>
<a href="http://tiles-a.data-cdn.linz.govt.nz/services;key=dd53dc504e3b4c37a627fa41a74ffd2b/tiles/v4/layer=2324/EPSG:3857/%(z)s/%(x)s/%(y)s.png" rel="noreferrer" target="_blank">http://tiles-a.data-cdn.linz.g<wbr>ovt.nz/services;key=dd53dc504e<wbr>3b4c37a627fa41a74ffd2b/tiles/<wbr>v4/layer=2324/EPSG:3857/%(z)s/<wbr>%(x)s/%(y)s.png</a><br>
<<a href="http://tiles-a.data-cdn.linz.govt.nz/services;key=dd53dc504e3b4c37a627fa41a74ffd2b/tiles/v4/layer=2324/EPSG:3857/%(z)s/%(x)s/%(y)s.png" rel="noreferrer" target="_blank">http://tiles-a.data-cdn.linz.<wbr>govt.nz/services;key=dd53dc504<wbr>e3b4c37a627fa41a74ffd2b/tiles/<wbr>v4/layer=2324/EPSG:3857/%(z)s/<wbr>%(x)s/%(y)s.png</a>>/<br>
/<br>
/<br>
/grids:/<br>
/  topo250grid:/<br>
/    base: GLOBAL_WEBMERCATOR/<br>
/    #num_levels: 6/<br>
/    #max_res: 4891.96981025128/<br>
/    #res: [611.49622628141, 305.748113140705, 152.8740565703525,<br>
76.43702828517625, 38.21851414258813, 19.109257071294063]/<br>
/  topo50grid:/<br>
/    base: GLOBAL_WEBMERCATOR/<br>
/    #res: [9.554628535647032, 4.777314267823516, 2.388657133911758,<br>
1.194328566955879, 0.5971642834779395, 0.29858214173896974]    /<br>
/<br>
/<br>
/# globals:/<br>
/#   image:/<br>
/#     formats:/<br>
/#       default_format:/<br>
/#         format: image/png/<br>
/#         colors: 0/<br>
/#         resampling_method: bilinear/<br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/mapproxy</a><br>
<br>
</blockquote>
<br>
<br>
______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/mapproxy</a></blockquote></div><br></div></div></div>