[MapProxy] Re: Refresh existing tiles

Jaak Laineste jaak at nutiteq.com
Thu Dec 22 05:08:02 EST 2011


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

Right, there are two use cases when tiles may need update:
a) layout is changed - all existing tiles in given zooms should be updated, regardless of data change.
b) data is changed - tiles which have data change should be updated, except low-level zooms.

I was trying to solve case a) now, but now I start also real data updates with osm2pgsql, so your case (b) is very relevant also.

> 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.

Can you share this load-next script part? 

> 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.

Great idea, and pretty simple to implement.

> 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.
> 

You reseed only existing tiles, I guess, not generating new ones? How it is configured in seed.yaml to get this? This is something I may need for layout-driven update also.

ps. my server setup notes are in https://code.google.com/p/maakaart-ee/wiki/ServersGeneral, just the notes are in Estonian. 

Jaak


More information about the MapProxy mailing list