[MapProxy] Chance the cache using a dpi parameter from the request

Andrea Peri aperi2007 at gmail.com
Mon Sep 25 23:04:24 PDT 2017


Hi,

I understand from your response also that this is definitivelly not
possible from inside the mapproxy.
And so is necessary to use an external solution writing a web server
filter that change the request before it reach the mapproxy.
Right ?

Not easy for me, because I never do before a wsgi filter for web server.
However if the solution is an external change to the request before it
reach the mapproxy,

I could use also the mod_rewrite module that allow a change of the
request using a configuration with some regular expressions.

Now I explore these kind of solutions.

many thx for help,
regards,

A.



2017-09-25 12:24 GMT+02:00 Matt Walker <walkermatt at longwayaround.org.uk>:
> Hi Andrea,
>
> We do something similar using a WSGI filter in front of MapProxy. In the
> filter we look for DPI parameter and update the LAYERS query string
> parameter to the appropriate layer based on it. Details of creating a WSGI
> filter for MapProxy can be found here:
> https://mapproxy.org/docs/1.10.0/auth.html. Our logic DPI logic is within
> the __call__ method.
>
> Hope that helps,
>
> Matt.
>
> On 22 September 2017 at 12:41, Andrea Peri <aperi2007 at gmail.com> wrote:
>>
>> Hi,
>>
>> I need to change the resolution of the map returned following the dpi
>> parameter from the request of the gis client.
>> To do this, I try to find a solution to use a different cache folder for
>> the same layer when the dpi from the request are different.
>>
>> I try to have 2 kind of cache. One for 90 dpi and another for 300dpi.
>> The layer should take from the 90 when the user do not put the dpi param
>> or set explicitly the dpi=90.
>> Otherwise the layer use the 300 dpi cache when the user request ask foto
>> dpi=300.
>>
>> Is this allowed with mapproxy ?
>>
>> Manu THX.
>> Andrea Peri
>>
>>
>>
>> _______________________________________________
>> MapProxy mailing list
>> MapProxy at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapproxy
>
>
>
>
> --
> Matt Walker
> @_walkermatt



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------


More information about the MapProxy mailing list