wiki:FileGDB

Version 15 (modified by Jeff McKenna, 13 years ago) ( diff )

--

FileGDB

Build GDAL with FileGDB Support

Download the API/SDK

Compile

Windows (Visual Studio 2008)

You will have to compile filegdb as a plugin for GDAL:

  1. Compile GDAL with the FGDB section commented
  1. Now edit your nmake.opt so it contains something like the following (pay attention to the FGDB_SDK path):
  FGDB_ENABLED = YES
  FGDB_PLUGIN = YES
  FGDB_SDK = $(GDAL_HOME)\..\FileGDB_API_VS2008_1_0Final
  FGDB_INC = $(FGDB_SDK)\include
  FGDB_LIB = $(FGDB_SDK)\lib\FileGDBAPI.lib
  1. Next, cd to the /ogr/ogrsf_frmts/filegdb directory
  1. Execute the following:
  nmake /f makefile.vc plugin

A file named ogr_FileGDB.dll should be generated.

  1. You will also need the file: FileGDB_API_VS2008_1_0Final/bin/FileGDBAPI.dll

Testing the driver

To test if the driver is been loaded, make sure ogr_FileGDB.dll and FileGDBAPI.dll are found in your path, and then execute the following (look for "FileGDB" in the results):

.\> ogrinfo --formats
Supported Formats:
  -> "FileGDB" (read/write)
  -> "ESRI Shapefile" (read/write)
  -> "MapInfo File" (read/write)
  -> "UK .NTF" (readonly)
  -> "SDTS" (readonly)
  -> "TIGER" (read/write)
  -> "S57" (read/write)
  -> "DGN" (read/write)
  -> "VRT" (readonly)
  -> "REC" (readonly)

Then test with a sample file (such as here):

  ogrinfo test_fgdb.gdb
    INFO: Open of `test_fgdb.gdb'
      using driver `FileGDB' successful.
      1: basetable_2 (None)
      2: basetable (None)
      3: base_table1 (None)
      4: test_lines (3D Multi Line String)
      5: more_test_lines (3D Multi Line String)
      6: test_points (3D Point)
      7: test_areas (3D Multi Polygon)

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.