[MapProxy] Stretching local tiles for TMS requests with higher zoom levels than stored

Oliver Tonnhofer olt at omniscale.de
Tue Mar 19 07:08:17 PDT 2013


Hi Mario,

On 18.03.2013, at 09:29, Mario Köpping wrote:
> I have mapproxy providing a TMS service for tiles that I store locally (on my notebook, later on a server). These tiles are pre-generated in a certain range of zoom levels, let's say 0-12. Since the source has a resolution of 100m*100m per pixel and I'd like to limit computation time and storage space, I don't want to pre-generate higher zoom levels. However, it should be possible to zoom in further. Therefore, I'm looking for a way to configurate mapproxy so that it delivers stretched images based on the pre-generated tiles whenever a higher zoom level is requested. If possible, I'd prefer to realize this in mapproxy, since the Leaflet client I'm using does not seem to support something like this natively and I can't change the client.

TMS itself is "passive", it never scales any outgoing tiles. 

> From the documentation, I found that the definition of a custom grid and the stretch_factor option could help. However, I tried many things and I just can't get it to work. I'd really appreciate it if someone could help me with this. You can find a minimal configuration below.

stretch_factor only works for WMS and is for scaling between cached grid levels.

You could create a cache with more than 13 levels that uses your pre-generated cache as the source and then make the >13-levels cache available via TMS. See http://mapproxy.org/docs/nightly/configuration_examples.html#using-existing-caches


Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.com
http://mapproxy.org | https://github.com/olt    | @oltonn









More information about the MapProxy mailing list