[MapProxy] questions: WMS raster quality, up/down-scaling, docker, config best practices

Azucar Lodzopoulos azucar.lodzopoulos at gmail.com
Sun Dec 29 05:56:48 PST 2024


Hi,

I have some questions around Mapproxy:

1. Quality issues with WMS source.
I have this source and this cache:
sources:
  pcrs:
    type: wms
    wms_opts:
      version: 1.3.0
    req:
      transparent: true
      layers: PCRS.LAMB93
      url: https://data.geopf.fr/wms-r/wms
caches:
  cache_pcrs:
    grids: [webmercator]
    sources: [pcrs]
    cache:
      type: sqlite

(my webmercator grid is simply a redefinition of GLOBAL_WEBMERCATOR)

It works and I can serve this proxied layer. It's okay as long as I don't
zoom in too much, however the quality of images served by the proxy gets
really bad when zooming in a lot. How can I address this?

2. Upscaling/downscaling issues, grids, tile size questions.
I have a tile source that serves tiles in 512x512 (as opposed to 256x256
for my other tile sources) and has a max zoom level of 15. A working
solution that I've found is to define a grid specifically for those source
tiles:
grids:
  webmercator:
    base: GLOBAL_WEBMERCATOR
  custom_grid:
    base: GLOBAL_WEBMERCATOR
    tile_size: [512, 512]
    num_levels: 16

But I was expecting the upscale_tiles/downscale_tiles cache options to
handle this, but those seem to have no effect.
Another way to phrase this issue is, for a given source or for a given
cache, how do I tell Mapproxy: fetch tiles for zoom levels within a range,
then scale up/down if outside of that range? I am facing this issue both
for XYZ tiles but also for WMS sources.
If I have some sources in 256x256 and some in 512x512, do I have no other
way but to create grids that fit the upstream tile format?

3. Docker, seeding.
I am using the Docker image
ghcr.io/mapproxy/mapproxy/mapproxy:3.1.3-alpine-nginx to run Mapproxy. I
have some caches that I want to seed/prep so that I can easily prepare
combined mbtiles files for offline use. I have my seed config file and I
trigger the seed by issuing:
docker exec -ti mapproxy mapproxy-seed -s config/seed.yaml -f
config/mapproxy.yaml
(-ti optional)
Is there a more ergonomic way to implement seeding with this container
image? Right now I have the seeding command triggered regularly via a
systemd timer.

4. General config advice?
My mapproxy.yaml is quickly getting pretty big. While I've found yaml
tricks (anchors) to avoid repetition, it seems like I can't use yaml
includes to split my yaml configuration across multiple sub-files. And I'm
only a hobbyist with limited amounts of data. Do you have any tips when it
comes to configuration organisation?

Thanks for your help and for a great tool!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20241229/9b1667ee/attachment.htm>


More information about the MapProxy mailing list