[Qgis-user] FileGDB: missing FID column

Mats Elfström mats.elfstrom at gmail.com
Wed Dec 16 10:27:51 PST 2015


Hi!
Do not rely on the ESRI FID/ObjectID for any external purpose.
It must be treated and considered as an internal ESRI geodatabase
parameter, and can be unpredicatbly rewritten any time by ESRI processes.
This goes for gdb tables as well as shapefiles. Of course, if you
completely externalise the data, and never intend to link it back or use it
in its original environment, you can keep the FID and use it for your own
purposes. But since it is never more than a random integer, it may be even
better to create a UID yourself. If you do this in the original table you
can safely rely on that UID even if the ESRI FID is rewritten.
It may be by purpose that you do not see the FID in QGIS, because of the
above.
Here is a similar question from a while back. Read the helpful replies.
http://gis.stackexchange.com/questions/72495/how-to-copy-table-in-arcgis-for-desktop-and-keep-same-feature-id-objectid

2015-12-16 14:04 GMT+01:00 Thomas Schüttenberg <t.schuettenberg at mailbox.org>
:

> Hi!
>
> please can anybody tell me why the FID column of a fileGDB-Layer is
> ignored and not shown in QGIS?
>
> I added a fileGDB via add vector layer>directory>type OpenFileGDB or
> ESRI-FileGDB and everything
> works fine and fast.
> But when looking at the attribute table or the layer propeties the column
> "objectid" is not there
> although it is part of the data (see ogrinfo below). I tested this with
> 2.8.4 and 2.12.1
>
> The actual reason to fumble with the FileGDB is, that i want to transfer
> this data to my PG. In this
> import process (e.g. OGR processing "Import Vector into PostGIS database")
> however the FID column is
> also ignored.
> A (new) FID/PK-column, that can be created during import is always filled
> with fresh serial values -
> not the original IDs from the data source -even when their name are the
> same.
>
> The only way I see to solve / by-pass this (in my use case) is to
> duplicate the objectids to a new,
> seperate field befor doing the ogr-import.
>
> But maybe some of you could suggest a better solution (and save me from
> the manual
> table-editing-pain? ;-)
>
> thanks in advance
> Thomas
>
> C:\Windows\System32>ogrinfo -so c:\zeug\kanal_end.gdb KaAnschlusspunkt
> Had to open data source read-only.
> INFO: Open of `c:\zeug\kanal_end.gdb'
>       using driver `OpenFileGDB' successful.
>
> Layer name: KaAnschlusspunkt
> Geometry: Point
> Feature Count: 3377
> Extent: (8.300000, 11.186000) - (371550.148000, 5663269.606000)
> Layer SRS WKT:
> PROJCS["ETRS89 / UTM zone 32N",
>     GEOGCS["ETRS89",
>         DATUM["European_Terrestrial_Reference_System_1989",
>             SPHEROID["GRS 1980",6378137,298.257222101,
>                 AUTHORITY["EPSG","7019"]],
>             TOWGS84[0,0,0,0,0,0,0],
>             AUTHORITY["EPSG","6258"]],
>         PRIMEM["Greenwich",0,
>             AUTHORITY["EPSG","8901"]],
>         UNIT["degree",0.0174532925199433,
>             AUTHORITY["EPSG","9122"]],
>         AUTHORITY["EPSG","4258"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",9],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AXIS["Easting",EAST],
>     AXIS["Northing",NORTH],
>     AUTHORITY["EPSG","25832"]]
> FID Column = OBJECTID
> Geometry Column = Shape
> PunktNr: String (0.0)
> Punktkennung: String (0.0)
> Kanalart: String (0.0)
> ...
>
> --
> QGIS-DE e.V. | http://qgis.de
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user




-- 
______________________________________________
Mats Elfström, Väpplingvägen 21, SE-227 38 LUND, Sweden
tel: +46 46 145959 / mob: +46 70 595 39 35
alt e-mail: mats.elfstrom at giskraft.com <mats.elfstrom at telia.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151216/00b733ba/attachment.html>


More information about the Qgis-user mailing list