5

I'm looking into providing a map amendment service for a particular map series. The service will help map owners look into the changes made to the operational features of the map, after the map was published.

There are three basic types of changes: 1) An object has been added. 2) An object has been deleted. 3) An object has changed, either an attribute or its geometry.

For object changes, the user should get both the old and the new value of the attribute or geometry.

Now, I'm looking into a clever way to implement this.

The basic idea is that the database administrator edits the map data in an interface, just as he would edit a normal map, and the rest is taken care of behind the scenes.

As I see it, there are two basic approaches: 1) Store the changes in a separate table, and keep the main database current. 2) Timestamp the records in the main database. In case of changes, I cannot change a record, but timestamp the old one as expired and add a new urrent one.

My main concern is not performance (not huge amounts of data), but ease of implementation. Is there a way I can make the DBMS (say, PostGIS) handle this automatically (for example by using triggers), Or can I build my own interface on top af an exisiting GIS (say, QGIS or ArcGIS) to handle the storage of records in the various tables as the database administrator makes changes to the map. Preferrably, I'd like a Web-interface.

Any Ideas anyone?

1 Answer 1

2

I prefer do this kind of stuff at database level, to ensure the integrity of the data. If you make some custom plugin in your GIS to handle it, any user with database access can make changes without using your plugin.

I see two option to implement it in the database, where the best option depends on your user cases:

  • Triggers, that tracks the changes to another table. Is easy to implement in postgis and keeps the namespace clean. But if you are changing you data model frecuently it can be difficult to maintain.
  • Views. A big table with all the records with timestamps, and views over that table that exposes different information.

If you have few tables and the model is mostly static i think that triggers are easy to maintain.

Now, there are other options out there, like geogit that try to fill this gap. geogit is probably not still mature but boundless is working on it and developing a web interface.

2
  • I have implemented number 2. I used VIEWs wich select latest data from base table with update trigger to write data into underlying tables. All operations are converted to insert in base table and with time stamp and operation. It needed serialid, objectid and versionid to work. But it is quite nice system. With it you can get data state at given time. Only thing needed from client was postGIS support (i used QGIS ) Dec 19, 2013 at 13:06
  • thanks. Feel free to select my answer as the correct if you think that is enough useful for you. Dec 22, 2013 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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