Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this idea of using postgis together with a tile renderer for serving my organization with tiled maps. As I believe my data will be partially altered almost on a daily basis it does feel like a performance issue if I have to render the whole cache every night as the changes are quite small but still significant.

Would it be possible to re-render parts of a tile pyramid or a grid in a cache instead of a complete re-rendering?

And have anyone tried to execute this rendering in for example mapnik from inside postgresql/postgis using a database trigger? I believe the first issue would be to determine what tiles are affected and then re-render them specifically.

Any ideas?

share|improve this question
I use geoserver to render my maps, and I refresh my entire information every 2 minutes, I only have to delete the geoserver cache, and the tiles are on-demand generated. – pacofvf Feb 21 '12 at 15:39
@FishHead: Please share your findings. – menjaraz Jul 24 '12 at 16:44

You should be able to easily achieve that by:

  1. implement an on insert/update trigger which puts changed features on a work queue
  2. a worker that periodically wales up and grabs stuff to do from the queue and refreshes tiles

Item 1 can be easily written in pure sql in postgres by means of a trigger. As for item 2 you just need to call the seed program (all caches provide one) with the following options:

  • force: regenerate tiles even if already present in the cache
  • bbox: regenerate tiles only for the provided bbox, which in your case is the bbox of the modified feature

Hint: documentation link for the relevant section of the TileCache manual.

Please note that it might be worth doing some bbox merging prior to start the reseeding process as it is most likely that changes happen in spatially close/limited areas and theregore you could end up regeneratong the same tile over and over again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.