-
-
Save codegordi/507c17cb35385fdce531 to your computer and use it in GitHub Desktop.
This file contains 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
1) Get the FileGDB API http://www.esri.com/apps/products/download/ | |
2) Extract it somewhere on your system and remember the path :) | |
3) Do: | |
> 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 # this will take a while .... | |
# (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 _before_ configuring and compiling geo. I don't dig into this topic here, but if somebody has trouble, I might be able to help. *** | |
4) 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) | |
... | |
5) 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/ogr2ogr -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 |
Note: The ESRI FileGDB API only converts ESRI v. 10+ .gdb's. May want to consider using OpenFileGDB instead for vv. 9.+.
http://www.gdal.org/drv_openfilegdb.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is OK, but there is an easier way to install as a homebrewed gdal plug-in
==> You should end up with several files output, including the .shp (ESRI shapefile(s))