I have a GeoServer with integrated GeoWebCache. Data is stored on a PostGIS database. I'm looking to have pre-seeded layers, but since my data is going to change several times per day, I'm looking to avoid truncating and then re-seeding the layers from scratch. Data is changed through several other applications, mainly QGIS (directly operating on the PostGIS database).
So, from my research, this can be done by specifying a GeoRSS feed on the GeoWebCache configuration. This looks for an
updated field on each RSS entry, in order to know which tiles to update.
Unfortunately, the native Geoserver RSS implementation doesn't have such a field, so I'm going to have to build one from scratch. This is fine, I doubt Geoserver would know of the changes either way, since the data is modified directly on the database.
So, the proposed solution:
- Add a timestamp
updatedfield on each db layer.
- Add triggers to update that field on insert/update.
- Poll the database and generate a GeoRSS feed periodically.
- Link that feed in the GeoWebCache configuration.
My questions are:
- How to handle deleted features? Track deletions in a separate table, and link those to the GeoRSS feed with a
- Is this the only/best way I can accomplish what I'm looking for or am I missing something?