I have a QGIS project linked to an ESRI file geodatabase. It was first built a few months ago and hasn't been opened since. I just re-opened it and noticed that the layers looked odd. Upon further investigation I noticed that there was a layer mismatch with the file GDB, so what I thought were points for animal habitat locations look more like polygons for geotech reports, and all the layers seem to not be what the layer says it should be, confirmed by looking at the attribute tables.

I suspect this is due to the QGIS layer source making reference to a layerID in the file GDB, and suspecting that ESRI does some cleanup/shuffling in the background ordering of the gdb layers, similar to when it reassigns OID's to records to clean up deleted record numbering holes. So when QGIS thinks layer 23 = bird habitat, it actually accesses layer 23 = geotech reports, instead of accessing it through a FeatureClass name.

Has anyone else noticed this? Does anyone know a robust way of linking a QGIS project file to a FileGDB and not have it do this 3 months later? I am going to try the ESRI driver for accessing the file GDB instead of the OpenFile GDB and see if that fixes it, but will need to wait a while to see if the GDB reshuffles its layers.

  • If you create a new QGIS project and add layers from the fileGDB, do you get the same mess?
    – AndreJ
    Commented Nov 3, 2017 at 6:18
  • No, adding layers in a new project works as expected, with the proper data from that layer being added, it's only when I have an existing QGIS project that references FileGDB layers already, and that QGIS project is reopened after a while, while other work in the FileGDB has happened (though no layers removed/added etc. just the layer ID #'s within the FileGDB have shuffled, but the layer names (ie. feature classes) are the same.
    – user25644
    Commented Nov 9, 2017 at 18:33
  • I guess this should be worth a bug report, either to GDAL or QGIS.
    – AndreJ
    Commented Nov 9, 2017 at 19:23
  • I also find this. It's incredibly annoying. For me, it happens when I choose to delete a feature class within a FileGDB, then opening a QGIS project which uses it. All the layers sourcing from that particular FileGDB are either broken (bad layer source) or reflections of different layers like you mention. ie. my mine location layer is actually showing my postcode point layer.
    – Theo F
    Commented Feb 21, 2018 at 15:59
  • I would try the ESRI File GeoDatabase Driver. Commented Jul 10, 2018 at 9:19

1 Answer 1


if you use QGIS 2.18.20 the problem is resolved. The pilot openfileGDB of this version of QGIS are substitute the target of the geodatabase "idlayer" by the "namelayer".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.