[gdal-dev] Using the OGR library with FileGDB driver

Even Rouault even.rouault at mines-paris.org
Tue Jul 30 15:26:58 PDT 2013


Le mercredi 31 juillet 2013 00:07:08, Carl Godkin a écrit :
> Hi,
> 
> I'm trying for the first time to use the OGR library to read ESRI FileGDB
> (".gdb") databases and I think I must be doing something wrong.
> 
> I built GDAL 1.10.0 with VS2010 and (among other additions) the FileGDB_API
> 1.3 for VS2010 all on Win64.  Everything built cleanly but the OGR library
> seems to be unable find layers in some .gdb data sets.
> 
> To take my own code out of the equation, I tried to list the layers in
> various .gdb files from around the web using the version of "ogrinfo" built
> along with the library.
> 
> All of example .gdb projects from the samples/data directory in the ESRI
> FileGDB_API distribution work just fine as does some data from other
> sources.
> 
> However, I find that a lot of .gdb data sets that I find on the web act as
> if they have no layers.  (These are apparently up to date sites too, not
> very old sites.)
> 
> In lots of cases, ogrinfo says just this:
> >ogrinfo -al WA_wetlands.gdb
> 
> INFO: Open of `WA_wetlands.gdb'
>       using driver `FileGDB' successful.
> 
> However, I know there are layers in the these files because ArcGIS Explorer
> Desktop shows them just fine, but calls them "datasets."  The datasets,
> however, are not quite the same as the layers listed by "ogrinfo" (in the
> cases where ogrinfo shows something useful) so I'm wondering if I am
> confused about the nomenclature or something.
> 
> Does anyone have any suggestions?  I feel like I must be missing something
> obvious. Thanks very much for any ideas,

Carl,

The driver is supposed to have some support for reading layers in "datasets", 
but you are perhaps running into a bug, or a limitation of the FileGDB SDK 
itself. Perhaps you could create a GDAL Trac ticket and attach one of those 
.gdb for investigation.

Best regards,

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list