[MapProxy] Refresh existing tiles

Johannes Weskamm weskamm at terrestris.de
Thu Dec 22 03:16:56 EST 2011


Hi Jaak,

It may be not your exact usecase, but i can explain what i did to serve 
und update tiles from openstreetmap-data.

For the import of new osm-data i use osm2pgsql with the load-next 
script. osm2pgsql can give you a list of tiles that have to be renewed 
after the update, if you use the paraemter -e.
Sadly, this list is not directly useable for a reseed with mapproxy. So 
i did some additional stuff:

I wrote a Script that converts the numbers (path) of the tiles to a 
boundingbox. These Boundingboxes are then saved in a postgres db.
Then i do a reseed with mapproxy, giving an ogr_source which lets me 
connect to the database and use the calculated boundingboxes/poylgons 
for the area that should be reseeded.

In the end, mapproxy will only reseed the parts that have been updated, 
there is no big overhead and the whole process is working fast enough 
for me.

If you need more details, let me know.

Greetings,

Johannes Weskamm





Am 21.12.2011 15:38, schrieb Jaak Laineste:
> Hello,
>
> I have a mapproxy in front of WMS serving large area (it is OSM 
> Planet). It used mapproxy-seed to pregenerate some tiles to make it 
> respond faster.
>
> 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.
>
> 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.
>
>  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.
>
>  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?
>  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.
>
> Regards,
> Jaak
>
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy


-- 
Logo der terrestris GmbH & Co. KG

Dipl.-Geogr. Johannes Weskamm
--- Anwendungsentwickler ---

terrestris GmbH & Co. KG
Pützchens Chaussee 56
53227 Bonn

Tel:   +49 (0)228 / 96 28 99 -555
Fax:   +49 (0)228 / 96 28 99 -57

Email: weskamm at terrestris.de <mailto:weskamm at terrestris.de>
Web: http://www.terrestris.de

Amtsgericht Bonn, HRA 6835
Komplementärin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams

-------------- next part --------------
Skipped content of type multipart/related


More information about the MapProxy mailing list