Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I installed:

  • gdal-110-1600-x64-core.msi
  • GDAL-1.10.0.win-amd64-py2.7.msi
  • gdal-110-1600-x64-filegdb.msi

from www.gisinternals.com

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(';')[0])
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.

share|improve this question
    
problem of improper installation, because the FileGDB driver work with Python, even with GDAL 1.9 –  gene Jun 5 '13 at 14:06
    
what do I need to do to get it working? –  brumgabrasch Jun 5 '13 at 15:11
    
use the Python gdal module of Unofficial Windows Binaries for Python Extension Packages and copy/paste ogr_FileGDB.dll from GDAL –  gene Jun 5 '13 at 16:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.