[Qgis-user] FileGDB: missing FID column

Thomas Schüttenberg t.schuettenberg at mailbox.org
Wed Dec 16 05:04:51 PST 2015


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



More information about the Qgis-user mailing list