Hallo Dave,
Thank you for the answer. As mentioned im my initial mail, export to Postgres did not work for me at all, regardless if overwriting an existing table or creating a new one. So I ask myself, is there an error in geogig or do I something wrong.
The diff command sounds interesting. Can you give me some more details on that?
On write access to Postgres: I’m afraid, I cannot disallow writing directly to Postgres. I thought, I can do a geogig export to apply any changes from Postgres to geogig. I know, that this will take the same time like an initial full export, but I hope, that will be acceptable. What do you mean with “quite a bit of "little" thing”? Can you give me some keywords about that?
Hi, Markus,
Glad to see that you are using GeoGig - sorry it isn't doing quite what you are expecting.
The "pg import" and "pg export" commands are quite simple - they are used to load (import) a dataset into GeoGig and to create a new database table with geogig data in it (export).
The export command is meant to create a new table and put the data in - like exporting a brand new shapefile. It wasn't designed to maintain the original dataset over time.
However, you can use GeoGig to support this. In general, you'd get a diff from GeoGig and then "apply" that diff to the PostGIS table via INSERT/DELETE/UPDATE sql commands. If you don't allow users to update the PostGIS table outside of applying controlled diffs from GeoGig then the process isn't very complex. It gets much more complex if you allow users to makes changes to the PostGIS table.
The QGIS plugin uses a GeoPKG file that is maintained by the QGIS plugin - you can look into this for more details. It tracks local changes to the GeoPKG file (the "-i" option puts in audit tables) so it can provide sophisticated functionality. However, if multiple people are allowed write access to the postgis database, you'll likely want to make some changes to the process so writes do not occur while the database is being "maintained" by GeoGig. Also, be careful with FIDs - you can see the GeoPKG file maintains FIDs separately.
Let me know if this helps. If you do not allow write access to the PostGIS database, then having GeoGig keep it up-to-date isn't very complex; but there's still quite a bit of "little" things to do.
Thanks, Dave
_______________________________________________________
Mettenmeier GmbH
Sitz der Gesellschaft: 33100 Paderborn
Geschaeftsfuehrung: Ulrich Mettenmeier
Handelsregister: Amtsgericht Paderborn B 1114
USt.-ID: DE 811 324 124
Steuer-Nr.: 339/5873/3133
_______________________________________________________
|