[MapProxy] Choosing the right grid for Caches with multiple grids

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[MapProxy] Choosing the right grid for Caches with multiple grids

dirk.thalheim

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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Choosing the right grid for Caches with multiple grids

Oliver Tonnhofer-3
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







> On 14. Sep 2018, at 09:41, [hidden email] wrote:
>
> 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
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapproxy

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Choosing the right grid for Caches with multiple grids

dirk.thalheim
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:[hidden email]]
Gesendet: Montag, 17. September 2018 09:08
An: Thalheim, Dirk <[hidden email]>
Cc: [hidden email]
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







> On 14. Sep 2018, at 09:41, [hidden email] wrote:
>
> 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
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapproxy

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] Choosing the right grid for Caches with multiple grids

Oliver Tonnhofer-3
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







> On 17. Sep 2018, at 13:37, [hidden email] wrote:
>
> 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:[hidden email]]
> Gesendet: Montag, 17. September 2018 09:08
> An: Thalheim, Dirk <[hidden email]>
> Cc: [hidden email]
> 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
>
>
>
>
>
>
>
>> On 14. Sep 2018, at 09:41, [hidden email] wrote:
>>
>> 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
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/mapproxy
>
> _______________________________________________
> MapProxy mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapproxy

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy