[gdal-dev] FileGDB driver - internal paths

Even Rouault even.rouault at mines-paris.org
Wed Jan 23 13:18:14 PST 2013


Le mercredi 23 janvier 2013 20:59:09, Simon Lyngby Kokkendorff a écrit :
> Hello List,
> 
>    I'm using OGR to read a FileGDB database, perform some transformations
> and then write an output FileGDB database. In that process I would like to
> preserve the structure of the original FileGDB, i.e. put "Feature Classes"
> into the right "Feature Datasets" etc.
>    Hence, my question is whether it is possible, from the c-api of OGR, to
> determine the FileGDB specific "internal path" of an OGR-layer
> (corresponding to e.g. a "Feature Class") loaded through the FileGDB
> driver? Perhaps it is necessary to extract this information from the XML
> layer definition, which seem to be available via special SQL requests (in
> gdal/ogr 1.10?) ?

With GDAL/OGR 1.10, this is indeed possible. See :

$ ogr2ogr -f filegdb poly.gdb poly.shp -lco FEATURE_DATASET=my_feature_dataset
$ ogrinfo poly.gdb -sql "GetLayerDefinition poly" | grep CatalogPath
  <CatalogPath>\my_feature_dataset\poly</CatalogPath>

> 
>    Best Regards,
>    Simon Kokkendorff, Danish Geodata Agency (formerly known as KMS)


More information about the gdal-dev mailing list