Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using Geoserver with Geocache to get WMS tiles and a PostGIS backend. There are 2 systems using the PostGIS database: one that is with Geoserver and one that is an old system that just uses the database. All changes made to the geometry using either system need to cause the tiles to be recreated, and we can't change the code in the old system. I think I need to use a trigger in PostGIS. I understand how to create the trigger, but how do I make it regenerate the tiles that include the point that was changed?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

One option is create trigger into postgis table which uses "NOTIFY channel_name message" when something happens. Then create softaware which conencts to postgresql and executes "LISTEN channel_name" and when something happens on channel it executes command which re-creates tiles. You can forward needed coordinates with in message

share|improve this answer
    
I understand the trigger part and the notify part but what do I use to make the second part - the software that connects to postgresql and executes the Listen? –  bl8rchk Mar 27 '13 at 12:51
    
as I undestand it, you use external program to compile tile, not postgis. So you code program that connects to postgis and LISTENs channel_name. When it hears somethign , it executes re-tiling. see postgresql.org/message-id/… .. postgresql.org/docs/9.2/interactive/plperl-trusted.html gives you idea howto do it straight from trigeer, but it has more problems that listen notify design –  simplexio Mar 27 '13 at 13:08
add comment

Your Answer

 
discard

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.