I can open my gdb on the command line:
C:\data>ogrinfo --version GDAL 1.10.0, released 2013/04/24 C:\data>ogrinfo data.gdb INFO: Open of `data.gdb' using driver `FileGDB' successful.
In "C:\Program Files\GDAL\gdalplugins" I have a file named ogr_FileGDB.dll
However, when I execute the following code:
os.environ['PATH'] = "C:\\Program Files\\GDAL" + ';' + os.environ['PATH'] os.environ['GDAL_DRIVER_PATH'] = "C:\\Program Files\\GDAL\\gdalplugins" os.environ['GDAL_DATA'] = "C:\\Program Files\\GDAL\\gdal-data" print os.path.exists(os.environ['PATH'].split(';')) print os.path.exists(os.environ['GDAL_DRIVER_PATH']) print os.path.exists(os.environ['GDAL_DATA']) driver = ogr.GetDriverByName('FileGDB') print driver
I get the following output:
True True True None
It looks like the FileGDB driver does not work with Python. Did I miss something to install?
Is it possible to print all available drivers of GDAL in Python?
p.s. A similar questions was asked already: "How to Open a File Geodatabase with ogr? [duplicate]". It was marked as duplicate to "How to access feature classes in file geodatabases with Python and GDAL?". However, I think there ogr.GetDriverByName('FileGDB') clearly works.