[MapProxy] zoom levels and resolution
A.Pirard.Papou at gmail.com
Sat Dec 1 15:47:28 PST 2012
On 2012-10-01 14:07, Oliver Tonnhofer wrote :
> On 01.10.2012, at 05:45, André Pirard wrote:
>> I was using a cache that, without any res configuration created folders 16, 17, 18 and 19 which I relate to zoom levels.
>> To follow your method, I used
>> type: debug
>> This painted the following first 2 numbers, roughly at the indicated meters/JOSM scale (2.5 screen cm).
>> I suggest you write them to standard output (instead or in addition).
>> I have absolutely no idea what calculation produces those numbers.
>> I assumed they correspond to the former 19 and 18, I continued multiplying by 2 and I got:
>> 19: 0.29858214: 4, 11, 22,
>> 18: 0.59716428: 63
>> 17: 1.19432856
>> 16: 2.38865712
>> 15: 4.77731424
>> 14: 9.55462848
>> 13: 19.10925696
>> 12: 38.21851392
>> 11: 76.43702784
>> I chose to use:
>> res: [76.43702784, 19.10925696, 4.77731424, 1.19432856, 0.29858214]
>> Now I surprised to find directories 4 and 3 instead of 19 and 17.
>> Why? It would have been simple.
> Because you told MapProxy to do so :)
> You configured a grid with 5 levels, from level 0 at resolution 76.43702784 to level 4 at resolution 0.29858214.
>> Q5: is there anything to read on the Web that would help answering not only Q1-Q4 but also Q6-Q∞? :-)
> The question is: What are you trying to do and what did not work with your first configuration (without res)?
The practical goal is to remove some of the zoom levels directories from
the cache to minimize server requests and conserve disk space (as the
doc explains or implies, I think).
In my case, the highest resolution is kept and one or two lower levels
It's very tedious to 1) compute resolutions with debug 2) have to rename
the directories to new, unpredicted numbers and keep the previous
contents without goofing 3) experiment and loop repeating (2) with yet
different directory names each time
Wouldn't it be possible to specify sth like res: [16:2.38865712,
to indicate to use the existing directories named 16 and 19 with their
contents and with the indicated resolution. If other names are
required, symbolic links can be automatically created. The user
shouldn't know the new numbers except for possibly erasing them.
Better yet, to specify res: [16:, 19:] meaning the same except that the
original, default resolutions are kept. In other words, the user just
selects the original, default zoom levels that she/he wants to keep and
she/he can change her/his (or even his/her ;-) mind later.
In the meantime, without that comfort, it would be interesting
1) to know how the default resolutions are computed: can we get them
from a server query instead of the debug method?
2) said unselfishly: to learn what you said from the doc but in terms of
directory names: level 0 to 5 = what filenames if you don't succeed
creating more than 3 and 4?
3) to understand how an application uses the defined levels to force
filling the right ones;
in JOSM I see a) change resolution b) zoom to native resolution but I
don't relate that to file numbers.
Any how it works is appreciated because it implies 20+ howtos; the
opposite is not true.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MapProxy