[gdal-dev] Genaral option for saving fids as attributes

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Feb 13 12:06:39 PST 2019


Hi,

Every now and then people would like to keep the fids of original data as attributes like in this question https://gis.stackexchange.com/questions/312088/os-translator-plugin-replaces-the-unique-feature-references-toids-with-ogc-fid. Well, perhaps in this case the user wants to use the Master map TOIDs as fids/primary keys in PostGIS but that might not be a practical idea because I guess that TOIDs are strings.

So far I have usually advised users to use SQLite dialect and pick the FID field into a new attribute with for example "SELECT fid AS fid_attribute..." but now I wonder if it would be reasonable or not to have a general option "EXPOSE_FID" config option like we have a GML specific option "GML_EXPOSE_FID". Any opinions? I do know that it is dangerous to make an editable copy of fids if the original fids are also used as feature ids in the converted data but let's assume that those who would use that option understand what they are doing.

-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190213/713922ef/attachment.html>


More information about the gdal-dev mailing list