Discussion:
[MapProxy] Choosing the right grid for Caches with multiple grids
d***@bkg.bund.de
2018-09-14 07:41:37 UTC
Permalink
Dear list,

we have a service configured, where a single cache supports two grids in different projections (EPSG:3857 and EPSG:25832). Basically this works pretty good. However, when accessing the layer within the WMS in a projection not matching the grid projections, it seems mapproxy doesn't choose the best grid as source for transformation. E.g. when requesting the layer in EPSG:25833 I would assume the best source is EPSG:25832. Mapproxy however seems to always use EPSG:3857 as source when a projection doesn't match. Is there a way to influence the behavior of mapproxy for choosing the right source grid/projection depending on the requested srsname?

Kind regards, Dirk
Oliver Tonnhofer
2018-09-17 07:07:39 UTC
Permalink
Hi,

can you switch the grids in your cache? (25832 before 3857)


Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | https://omniscale.com
OpenStreetMap WMS and tile services | https://maps.omniscale.com
Post by d***@bkg.bund.de
Dear list,
we have a service configured, where a single cache supports two grids in different projections (EPSG:3857 and EPSG:25832). Basically this works pretty good. However, when accessing the layer within the WMS in a projection not matching the grid projections, it seems mapproxy doesn’t choose the best grid as source for transformation. E.g. when requesting the layer in EPSG:25833 I would assume the best source is EPSG:25832. Mapproxy however seems to always use EPSG:3857 as source when a projection doesn’t match. Is there a way to influence the behavior of mapproxy for choosing the right source grid/projection depending on the requested srsname?
Kind regards, Dirk
_______________________________________________
MapProxy mailing list
https://lists.osgeo.org/mailman/listinfo/mapproxy
d***@bkg.bund.de
2018-09-17 11:37:45 UTC
Permalink
Hello,

I tried. MapProxy seems to stick to a single grid in the cache. I think it's a little bit complicated as we have two caches and four grid definitions:

caches:
cache_src:
grids: [GLOBAL_MERCATOR,eu_grid]
sources: []
cache:
...

cache:
grids: [EU_EPSG_25832,WEBMERCATOR]
sources: [cache_ src]
meta_size: [1, 1]
meta_buffer: 0
disable_storage: true


grids:
WEBMERCATOR:
base: GLOBAL_WEBMERCATOR
num_levels: 19

EU_EPSG_25832:
srs: 'EPSG:25832'
bbox: [-3803165.98427299, 2544186.72572701, 3710899.64427299, 8805908.08284866]
bbox_srs: 'EPSG:25832'
origin: 'ul'
tile_size: [256, 256]
res: [4891.96981025128,
2445.98490512564,
1222.99245256282,
611.49622628141,
305.748113140705,
152.874056570353,
76.4370282851763,
38.2185141425881,
19.1092570712941,
9.55462853564703,
4.77731426782352,
2.38865713391176,
1.19432856695588,
0.597164283477939]
eu_grid:
base: EU_EPSG_25832
origin: 'll'

This is required because the caches were generated with minimal different settings than the interface parameters (e.g. origin or zoom levels). So there is an on the fly transformation of the grid needed. Can this cause suboptimal transformation processes?

However, I also experimented with sources and tile_sources configuration for the layer without success. I believe MapProxy always uses a fixed source cache for transformation. For example having EPSG:3857 as source is not the best result for CRS requests in EPSG:3034. On the other hand choosing EPSG:25832 as source won't work for EPSG:4326 requests.

Kind regards, Dirk

-----Ursprüngliche Nachricht-----
Von: Oliver Tonnhofer [mailto:***@omniscale.de]
Gesendet: Montag, 17. September 2018 09:08
An: Thalheim, Dirk <***@bkg.bund.de>
Cc: ***@lists.osgeo.org
Betreff: Re: [MapProxy] Choosing the right grid for Caches with multiple grids

Hi,

can you switch the grids in your cache? (25832 before 3857)


Regards,
Oliver

--
Oliver Tonnhofer | Omniscale GmbH & Co KG | https://omniscale.com
OpenStreetMap WMS and tile services | https://maps.omniscale.com
Post by d***@bkg.bund.de
Dear list,
we have a service configured, where a single cache supports two grids in different projections (EPSG:3857 and EPSG:25832). Basically this works pretty good. However, when accessing the layer within the WMS in a projection not matching the grid projections, it seems mapproxy doesn’t choose the best grid as source for transformation. E.g. when requesting the layer in EPSG:25833 I would assume the best source is EPSG:25832. Mapproxy however seems to always use EPSG:3857 as source when a projection doesn’t match. Is there a way to influence the behavior of mapproxy for choosing the right source grid/projection depending on the requested srsname?
Kind regards, Dirk
_______________________________________________
MapProxy mailing list
https://lists.osgeo.org/mailman/listinfo/mapproxy
Oliver Tonnhofer
2018-09-19 06:17:09 UTC
Permalink
Hi,

AFAIR, MapProxy uses the first grid when using another cache as a source.
You need to configure a new cache for each cache/grid combination for full control.

Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | https://omniscale.com
OpenStreetMap WMS and tile services | https://maps.omniscale.com
Post by d***@bkg.bund.de
Hello,
grids: [GLOBAL_MERCATOR,eu_grid]
sources: []
...
grids: [EU_EPSG_25832,WEBMERCATOR]
sources: [cache_ src]
meta_size: [1, 1]
meta_buffer: 0
disable_storage: true
base: GLOBAL_WEBMERCATOR
num_levels: 19
srs: 'EPSG:25832'
bbox: [-3803165.98427299, 2544186.72572701, 3710899.64427299, 8805908.08284866]
bbox_srs: 'EPSG:25832'
origin: 'ul'
tile_size: [256, 256]
res: [4891.96981025128,
2445.98490512564,
1222.99245256282,
611.49622628141,
305.748113140705,
152.874056570353,
76.4370282851763,
38.2185141425881,
19.1092570712941,
9.55462853564703,
4.77731426782352,
2.38865713391176,
1.19432856695588,
0.597164283477939]
base: EU_EPSG_25832
origin: 'll'
This is required because the caches were generated with minimal different settings than the interface parameters (e.g. origin or zoom levels). So there is an on the fly transformation of the grid needed. Can this cause suboptimal transformation processes?
However, I also experimented with sources and tile_sources configuration for the layer without success. I believe MapProxy always uses a fixed source cache for transformation. For example having EPSG:3857 as source is not the best result for CRS requests in EPSG:3034. On the other hand choosing EPSG:25832 as source won't work for EPSG:4326 requests.
Kind regards, Dirk
-----Ursprüngliche Nachricht-----
Gesendet: Montag, 17. September 2018 09:08
Betreff: Re: [MapProxy] Choosing the right grid for Caches with multiple grids
Hi,
can you switch the grids in your cache? (25832 before 3857)
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | https://omniscale.com
OpenStreetMap WMS and tile services | https://maps.omniscale.com
Post by d***@bkg.bund.de
Dear list,
we have a service configured, where a single cache supports two grids in different projections (EPSG:3857 and EPSG:25832). Basically this works pretty good. However, when accessing the layer within the WMS in a projection not matching the grid projections, it seems mapproxy doesn’t choose the best grid as source for transformation. E.g. when requesting the layer in EPSG:25833 I would assume the best source is EPSG:25832. Mapproxy however seems to always use EPSG:3857 as source when a projection doesn’t match. Is there a way to influence the behavior of mapproxy for choosing the right source grid/projection depending on the requested srsname?
Kind regards, Dirk
_______________________________________________
MapProxy mailing list
https://lists.osgeo.org/mailman/listinfo/mapproxy
_______________________________________________
MapProxy mailing list
https://lists.osgeo.org/mailman/listinfo/mapproxy
Loading...