14

I think I've found the answer (you can't edit FGDB's) but there seem to be few reports around that it is possible to edit FGDB files in QGIS.

Can anyone advise if it's possible to setup QGIS (presently 1.8) to edit FGDB's, and how?

It seems like this lack of editing ability could either be a bug in OGR or something to do with having to compile with the FGDB API (I've only ever used OS4GEOW to install QGIS etc).

nmtoken
  • 13,355
  • 5
  • 38
  • 87
user10849
  • 141
  • 1
  • 3
  • possible duplicate of How to get ".GDB" (Esri File Geodatabase) support in Quantum GIS (osgeo4w - qgis)

    That one's for QGIS 1.7.4 but the steps should be more or less the same.

    – R.K. Oct 10 '12 at 02:18
  • 3
    @R.K. - it looks like this is a valid entry and not a duplicate. The answer you reference discusses how to be able to load layers into QGIS. It does not discuss editing at all. I think it is valid to ask why layers may be added in from a File GDB, but they are not editable, though the API and the GDAL documentation say this should be possible. – Get Spatial Oct 10 '12 at 06:50
  • Definitely a valid question. From all the posts I've read, it still isn't clear whether or not you can edit a file geodatabase using the latest version of QGIS compiled with the latest version of GDAL. – Rayner Oct 10 '12 at 06:51
  • If QGIS is using the GDAL support for the File GDB API, then it seems like editing should be possible. Hopefully one of the QGIS Developers will weigh in. It may be a bit early yet for that to happen. – Get Spatial Oct 10 '12 at 06:53
  • I stand corrected. – R.K. Oct 10 '12 at 10:52
  • 1
    Convert to Shapefile using GDAL - File Geodatabase source is locked down (arcobjects) you can create using http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api but it is still restricted. – Mapperz Oct 10 '12 at 13:44
  • 1
    I think I have to correct myself here. After reviewing the documentation for the OGR Driver for the File GDB, it only talks about creation and bulk feature loading in the FGDB. There is no talk about editing at the feature level. The API documentation referenced by @Mapperz, states that "Read and write data in the geodatabase" is an option, but not to what extent. – Get Spatial Oct 10 '12 at 15:08
  • 1
    If you look at the File GDB API Details, it states that it is possible to Insert, Delete and Edit the contents of simple datasets:. Upon seeing that, the inability to edit in QGIS is likely a limitation of the OGR driver. – Get Spatial Oct 10 '12 at 15:14
  • 2
    Last I heard, the File GDB does not have write yet do to a bug in the Arc API (I believe I saw this on the github page for the driver). – wildintellect Oct 11 '12 at 06:13
  • @DavidF - the discussion here seemed pretty specific regarding the abilities of OGR and the File GDB. The issue of what problems proprietary data formats may or may not cause, doesn't seem to help solve this specific issue. It is worthy of discussion, but not necessarily on GIS.se. – Get Spatial Nov 19 '12 at 06:07

2 Answers2

2

It is possible to read, edit and create features of a FileGDB in QGIS 3 (maybe also QGIS 2). You need an OSGeo4W-Installation with the optional FileGDB-Driver (not OpenFileGDB).

Vaiaro
  • 528
  • 3
  • 12
0

You CAN edit fGDBs in QGIS (tested in 1.8.0 standalone and package based install, Win7 x64), however the technique to do this suggests that it is unintended, though I'm not sure of the reason for not enabling this feature. The steps to edit are described below:

  1. Load a fGDB layer
  2. Open the Layer properties and switch to the Fields tab
  3. You should see an edit mode toggle button that is enabled (unlike all the others in QGIS for this layer)
  4. Enable editing and start drawing / modifying
  5. To save your changes, the only way is to disable the editing mode using the same button as described above. You'll then be prompted to save.

Note that this only allows the editing of existing layers in the fGDB, I've not been able to add new layers yet.

Update

Expanding on @Vaiaro's answer, at the time of writing this answer originally there was only one driver for loading fGDB layers into QGIS. Subsequently the open FileGDB driver was reverse engineered and added to QGIS, and now this is the default that QGIS uses. The edit button should still be active if you load the fGDB layer using the FileGDB driver:

Choose Layer > Add Layer > Add Vector Layer... and then switch to the 'Directory' source type as shown below. If you have the ESRI FileGDB driver installed in your QGIS setup then you should see 'ESRI FileGDB' as an option in the type dropdown. FGDB Layers loaded using this driver will be editable (all the edit button instances should be visible and active).

ESRI fGDB load

If the ESRI FileGDB is not available as an option, then it will have to be installed via the OSGeo4W setup utility if using a package based install for QGIS (gdal-filegdb package), or by manually copying in the relevant files for a standalone version (see this answer for an older version of QGIS)

Andy Harfoot
  • 3,367
  • 1
  • 24
  • 33