-
-
Save jalbertbowden/8157624 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| get the FileGDB API http://www.esri.com/apps/products/download/ | |
| extract it somewhere on your system and remember the path :) | |
| mkdir build #directory where we are playing around | |
| cd build | |
| git clone https://github.com/OSGeo/gdal.git | |
| cd gdal | |
| ./configure --with-fgdb=/path/to/your/FileGDB_API | |
| make | |
| (make install) optional, I'm just using it locally | |
| note: you will need all the dependencies, development files as well as all the compile tools. I don't dig into this topic here, but if somebody has trouble, I might be able to help. | |
| First test: | |
| build/gdal/apps/ogrinfo --formats #I have to use absolute paths, since I didn't install gdal system wide | |
| if you are lucky you will see a output like this: | |
| Supported Formats: | |
| ... | |
| -> "FileGDB" (read/write) | |
| ... | |
| Now you can use ogrinfo or ogr2ogr to access your FileGDB | |
| build/gdal/apps/ogrinfo /path/to/your/database.gdb <layername> -summary | |
| convert a FileGDB to Shapefile: | |
| build/gdal/apps/ogrinfo -f "ESRI Shapefile" <out_directory> /path/to/your/database.gdb | |
| A directory will be created and for each layer within the filegdb a shapefile set will be created. | |
| You could also use a query to retrieve a subset of your filegdb. There is an example on the gdal site http://www.gdal.org/ogrinfo.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment