[MapProxy] Refresh existing tiles

Oliver Tonnhofer olt at omniscale.de
Thu Dec 22 04:01:55 EST 2011


On 21.12.2011, at 15:38, Jaak Laineste wrote:
> Now I refreshed data and need to refresh all the existing tiles (at least in given zoom range) in cache. So how to do it properly? One way would be just deleting everything from cache and regenerating, but this would make service slow after updates, I would rather serve a bit older tiles than give long time to wait for live regeneration.

The best is to seed again and let mapproxy-seed overwrite all older tiles with the refresh_before option.

> I ran to set of questions:
> 
>  1) I initially tried the same seed.yaml file (with limited area, zoom up to 13) as for initial seeding, just changed refresh_before (time: 2011-12-21T15:35:00) so it should refresh all the tiles, and I run mapproxy-seed. It runs now, but it does not look like it really generates any updated tiles. At least postgres is idle which is not normal for real bulk tile generation.

That's odd. Your server has the right time and you do not use the -n/--dry-run option? Can you post your seed and MapProxy configuration?

>  2) I want to make sure that all the cached tiles will be refreshed, up to maximum zoom (18), but only existing tiles and for the whole grid (i.e. in global scale). How could I accomplish this? I assume that existing tile indicates that this may be needed soon again, so these should be faster. 

Sorry, you can't reseed existing tiles without creating missing tile in your seed area.

>  3) From documentation about refresh_before there is statement "By default, existing tiles will be refreshed.". What does it mean in this context? One way to understand would be that if this parameter is given, then only old tiles are refreshed, no new tiles generated (as I need)? Or is it vice versa? Or is it something else?

By default, existing tiles in your seed area are overwritten. You can prevent that with the refresh_before option. With that option, only older tiles will be overwritten.

>  4) I have following output for seeder:
> ...
>     Limited to: 21.00000, 57.00000, 27.00000, 60.00000 (EPSG:4326)
>     Levels: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
>     Overwriting: tiles older than 2011-12-21 15:35:00
> [16:00:11]  0   0.00% 2337709.30666, 7760118.67290, 3005626.25142, 8399737.88982 (0 tiles) ETA: N/A
> [16:00:11]  1   0.00% 2337709.30666, 7760118.67290, 3005626.25142, 8399737.88982 (0 tiles) ETA: N/A
> [16:00:11]  2   0.00% 2337709.30666, 7760118.67290, 3005626.25142, 8399737.88982 (0 tiles) ETA: N/A
> ...
>  Why there is 0 tiles for zooms 0...8? Even if my given pre-seed area is smaller than tile, I want to get also low-zoom tiles pregenerated. You know live generation of low zoom tiles is very slow, especially with whole planet database.

mapproxy-seed uses a depth-first algorithm and it will start at the bottom, level 13 in your case. The upper levels are seeded at the end. The output is just the part where the tool traverses into the tile pyramid.


Regards,
Oliver

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






More information about the MapProxy mailing list