Hi there, I have some questions about the role of primary keys when importing / exporting between PostGIS and GRASS. I've been making some tests regarding this process and what follows are my impressions, so they may be wrong in some points.
I fully understand that, given the disparity of data models, simplifications needs to be taken regarding the very complex primary key arrangements (multi column keys, for example) a Relational Database can do, and that going through the GDAL pipeline with an integer autonumber ogc_fid key is the sensible way to go, this is something that can be easily managed. However, my workflow implies quite a lot of PostGIS ingested data that goes to GRASS to perform topology cleaning and some other operations and back to PostGIS. In this process, I've notice the following: - GDAL ignores the primary key of the database, substituting it with an ogc_fid, when importing into GRASS; - when going back to PostGIS, another key comes from GRASS. I'm aware of the FID option to rename the key. My problem with this is that I lose in the process the original PostGIS table PK. I'm workarounding this by making a physical copy of the PK into another column, so when data is back, I can link original / GRASS processed data. Then, my question is: is there a way to keep the PK field at PostGIS into the GDAL pipeline as a normal column, so I don't have to duplicate the original PK as I'm doing right now? Thank you so much, best regards, --- Juan Pedro Pérez Alcántara jp.perez.alcant...@gmail.com
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev