Skip to content

Instantly share code, notes, and snippets.

@jalbertbowden
Forked from zhm/gist:2005158
Created December 28, 2013 09:20
Show Gist options
  • Select an option

  • Save jalbertbowden/8157627 to your computer and use it in GitHub Desktop.

Select an option

Save jalbertbowden/8157627 to your computer and use it in GitHub Desktop.

Revisions

  1. @zhm zhm revised this gist Feb 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@
    - In the GDAL source root, edit the `configure.in` and replace it with:
    * 1.9.0 https://gist.github.com/2005082
    * 1.9.1 https://gist.github.com/2784084
    * 1.9.2 https://gist.github.com/zhm/055081b46d49c9a87a85
    * 1.9.2 https://gist.github.com/5051253
    - In the GDAL source root, run `./autogen.sh` to re-create the `configure` script
    - Now run the `configure` script:
    <pre>
  2. @zhm zhm revised this gist Feb 27, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,7 @@
    - In the GDAL source root, edit the `configure.in` and replace it with:
    * 1.9.0 https://gist.github.com/2005082
    * 1.9.1 https://gist.github.com/2784084
    * 1.9.2 https://gist.github.com/zhm/055081b46d49c9a87a85
    - In the GDAL source root, run `./autogen.sh` to re-create the `configure` script
    - Now run the `configure` script:
    <pre>
  3. @zhm zhm revised this gist May 24, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Building GDAL 1.9 with ESRI FileGDB support on OS X Lion
    # Building GDAL 1.9.x with ESRI FileGDB support on OS X Lion

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used `~/local/filegdb`. Here's an example path to one of the files: `~/local/filegdb/lib/libFileGDBAPI.dylib`
  4. @zhm zhm revised this gist May 24, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,8 @@
    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config script hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the `configure.in` and replace it with:
    1.9.0 https://gist.github.com/2005082
    1.9.1 https://gist.github.com/2784084
    * 1.9.0 https://gist.github.com/2005082
    * 1.9.1 https://gist.github.com/2784084
    - In the GDAL source root, run `./autogen.sh` to re-create the `configure` script
    - Now run the `configure` script:
    <pre>
  5. @zhm zhm revised this gist May 24, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,9 @@

    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config script hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the `configure.in` and replace it with https://gist.github.com/2005082
    - In the GDAL source root, edit the `configure.in` and replace it with:
    1.9.0 https://gist.github.com/2005082
    1.9.1 https://gist.github.com/2784084
    - In the GDAL source root, run `./autogen.sh` to re-create the `configure` script
    - Now run the `configure` script:
    <pre>
  6. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -50,4 +50,5 @@ ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/
    Note: to select one in QGIS, go to Add Vector Layer -> select the Directory radio button -> Select your .gdb directory

    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+.

    More info: http://trac.osgeo.org/gdal/wiki/FileGDB
  7. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -49,4 +49,5 @@ ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/
    </pre>
    Note: to select one in QGIS, go to Add Vector Layer -> select the Directory radio button -> Select your .gdb directory

    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+. More info: http://trac.osgeo.org/gdal/wiki/FileGDB
    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+.
    More info: http://trac.osgeo.org/gdal/wiki/FileGDB
  8. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -49,4 +49,4 @@ ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/
    </pre>
    Note: to select one in QGIS, go to Add Vector Layer -> select the Directory radio button -> Select your .gdb directory

    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+.
    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+. More info: http://trac.osgeo.org/gdal/wiki/FileGDB
  9. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -47,6 +47,6 @@ cp /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL /Library/Frameworks/GDAL
    rm /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    </pre>
    note: to select one in QGIS, go to Add Vector Layer -> Select Directory radio button -> Select the .gdb directory
    Note: to select one in QGIS, go to Add Vector Layer -> select the Directory radio button -> Select your .gdb directory

    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+.
  10. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,7 @@
    ogr2ogr -f "PostgreSQL" PG:"dbname='somedatabase' host='localhost' port='5432'" ~/Downloads/test_fgdb.gdb
    </pre>

    ## To use this build of GDAL in a KyngChaos build of QGIS, you can do:
    ## Using this build of GDAL in a KyngChaos build of QGIS
    <pre>
    # save your current GDAL so you can put it back if you want
    cp /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL_orig
  11. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -40,12 +40,12 @@

    ## To use this build of GDAL in a KyngChaos build of QGIS, you can do:
    <pre>
    # save your current GDAL so you can put it back if you want
    cp /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL_orig
    # save your current GDAL so you can put it back if you want
    cp /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL_orig

    # symlink the custom GDAL build to the place QGIS looks
    rm /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    # symlink the custom GDAL build to the place QGIS looks
    rm /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    </pre>
    note: to select one in QGIS, go to Add Vector Layer -> Select Directory radio button -> Select the .gdb directory

  12. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -36,4 +36,17 @@

    #convert FileGDB directly to PostGIS
    ogr2ogr -f "PostgreSQL" PG:"dbname='somedatabase' host='localhost' port='5432'" ~/Downloads/test_fgdb.gdb
    </pre>
    </pre>

    ## To use this build of GDAL in a KyngChaos build of QGIS, you can do:
    <pre>
    # save your current GDAL so you can put it back if you want
    cp /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL_orig

    # symlink the custom GDAL build to the place QGIS looks
    rm /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    ln -s ~/local/lib/libgdal.dylib /Library/Frameworks/GDAL.framework/Versions/1.8/GDAL
    </pre>
    note: to select one in QGIS, go to Add Vector Layer -> Select Directory radio button -> Select the .gdb directory

    I had some problems opening certain FileGDB's. I believe the API only supports FileGDB's created with ArcGIS 10.0+.
  13. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,10 @@
    </pre>
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommend at least using `--prefix="$HOME/local"` or some other place on your machine besides `/usr/local` (default for homebrew) or `/opt/local` (default for MacPorts).
    - If it worked properly, you should see in the output of `configure` indicating `yes` for FileGDB support
    - `make && make install`
    - Build it:
    <pre>
    `make && make install`
    </pre>
    - If everything worked, it's time to test it out! Here's a test file: http://trac.osgeo.org/gdal/raw-attachment/wiki/FileGDB/test_fgdb.gdb.zip

    <pre>
  14. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    <pre>
    ./configure --with-fgdb="$HOME/local/filegdb"
    </pre>
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommend at least using `--prefix=~/local` or some other place on your machine besides `/usr/local` (default for homebrew) or `/opt/local` (default for MacPorts).
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommend at least using `--prefix="$HOME/local"` or some other place on your machine besides `/usr/local` (default for homebrew) or `/opt/local` (default for MacPorts).
    - If it worked properly, you should see in the output of `configure` indicating `yes` for FileGDB support
    - `make && make install`
    - If everything worked, it's time to test it out! Here's a test file: http://trac.osgeo.org/gdal/raw-attachment/wiki/FileGDB/test_fgdb.gdb.zip
  15. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@
    - In the GDAL source root, run `./autogen.sh` to re-create the `configure` script
    - Now run the `configure` script:
    <pre>
    ./configure --with-fgdb=/Users/zacmcc/local/filegdb
    ./configure --with-fgdb="$HOME/local/filegdb"
    </pre>
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommend at least using `--prefix=~/local` or some other place on your machine besides `/usr/local` (default for homebrew) or `/opt/local` (default for MacPorts).
    - If it worked properly, you should see in the output of `configure` indicating `yes` for FileGDB support
  16. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@
    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config script hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the `configure.in` and replace it with https://gist.github.com/2005082
    - In the GDAL source root, run `./autogen.sh` to re-create the configure script
    - In the GDAL source root, run `./autogen.sh` to re-create the `configure` script
    - Now run the `configure` script:
    <pre>
    ./configure --with-fgdb=/Users/zacmcc/local/filegdb
  17. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,10 @@
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config script hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the `configure.in` and replace it with https://gist.github.com/2005082
    - In the GDAL source root, run `./autogen.sh` to re-create the configure script
    - Now run the `configure` script
    - Now run the `configure` script:
    <pre>
    ./configure --with-fgdb=/Users/zacmcc/local/filegdb
    </pre>
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommend at least using `--prefix=~/local` or some other place on your machine besides `/usr/local` (default for homebrew) or `/opt/local` (default for MacPorts).
    - If it worked properly, you should see in the output of `configure` indicating `yes` for FileGDB support
    - `make && make install`
  18. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@
    </pre>

    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config script hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the `configure.in` and replace it with https://gist.github.com/2005082
    - In the GDAL source root, run `./autogen.sh` to re-create the configure script
    - Now run the `configure` script
  19. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    - Extract the SDK, and put the contents of the directory in a known location, I used `~/local/filegdb`. Here's an example path to one of the files: `~/local/filegdb/lib/libFileGDBAPI.dylib`
    - I use `~/local/filegdb` so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different.
    - Go into the directory containing the FileGDB SDK, e.g. `~/local/filegdb`
    - ESRI built these dylib's using `@rpath`'s, so to avoid needing to mess with `DYLD_LIBRARY_PATH`, I updated the `@rpath`'s using install_name_tool
    - ESRI built these dylib's using `@rpath`'s, so to avoid needing to mess with `DYLD_LIBRARY_PATH`, I updated the `@rpath`'s using `install_name_tool`. There might be a more elegant way to handle this. If so, comments are welcome!
    - Here are the commands I used to patch the dylibs, this is not required if you want to use `DYLD_LIBRARY_PATH` yourself:

    <pre>
  20. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used `~/local/filegdb`. Here's an example path to one of the files: `~/local/filegdb/lib/libFileGDBAPI.dylib`
    - I use `~/local/filegdb` so it can stay isolated in it's own place, you can put it anywhere, but the next few steps might be different
    - I use `~/local/filegdb` so it can stay isolated in it's own place. You can put it anywhere, but the next few steps might be different.
    - Go into the directory containing the FileGDB SDK, e.g. `~/local/filegdb`
    - ESRI built these dylib's using `@rpath`'s, so to avoid needing to mess with `DYLD_LIBRARY_PATH`, I updated the `@rpath`'s using install_name_tool
    - Here are the commands I used to patch the dylibs, this is not required if you want to use `DYLD_LIBRARY_PATH` yourself:
  21. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used `~/local/filegdb`, Example path to one of the files: `~/local/filegdb/lib/libFileGDBAPI.dylib`
    - Extract the SDK, and put the contents of the directory in a known location, I used `~/local/filegdb`. Here's an example path to one of the files: `~/local/filegdb/lib/libFileGDBAPI.dylib`
    - I use `~/local/filegdb` so it can stay isolated in it's own place, you can put it anywhere, but the next few steps might be different
    - Go into the directory containing the FileGDB SDK, e.g. `~/local/filegdb`
    - ESRI built these dylib's using `@rpath`'s, so to avoid needing to mess with `DYLD_LIBRARY_PATH`, I updated the `@rpath`'s using install_name_tool
  22. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -14,8 +14,8 @@
    </pre>

    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the configure.in script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/2005082
    - We need to make some changes to the `configure.in` script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the `configure.in` and replace it with https://gist.github.com/2005082
    - In the GDAL source root, run `./autogen.sh` to re-create the configure script
    - Now run the `configure` script
    ./configure --with-fgdb=/Users/zacmcc/local/filegdb
  23. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    # Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used ~/local/filegdb, Example path to one of the files: ~/local/filegdb/lib/libFileGDBAPI.dylib
    - I use ~/local/filegdb so it can stay isolated in it's own place, you can put it anywhere, but the next few steps might be different
    - Go into the directory containing the FileGDB SDK, e.g. ~/local/filegdb
    - ESRI built these dylib's using @rpath's, so to avoid needing to mess with DYLD_LIBRARY_PATH, I updated the @rpath's using install_name_tool
    - Here is the commands I used to patch the dylibs, this is not required if you want to use DYLD_LIBRARY_PATH yourself:
    - Extract the SDK, and put the contents of the directory in a known location, I used `~/local/filegdb`, Example path to one of the files: `~/local/filegdb/lib/libFileGDBAPI.dylib`
    - I use `~/local/filegdb` so it can stay isolated in it's own place, you can put it anywhere, but the next few steps might be different
    - Go into the directory containing the FileGDB SDK, e.g. `~/local/filegdb`
    - ESRI built these dylib's using `@rpath`'s, so to avoid needing to mess with `DYLD_LIBRARY_PATH`, I updated the `@rpath`'s using install_name_tool
    - Here are the commands I used to patch the dylibs, this is not required if you want to use `DYLD_LIBRARY_PATH` yourself:

    <pre>
    install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib
    @@ -16,10 +16,10 @@
    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the configure.in script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/2005082
    - In the GDAL source root, run ./autogen.sh to re-create the configure script
    - In the GDAL source root, run `./autogen.sh` to re-create the configure script
    - Now run the `configure` script
    ./configure --with-fgdb=/Users/zacmcc/local/filegdb
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommand at least using --prefix=~/local or some other place on your machine besides /usr/local (default for homebrew) or /opt/local (default for MacPorts).
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommend at least using `--prefix=~/local` or some other place on your machine besides `/usr/local` (default for homebrew) or `/opt/local` (default for MacPorts).
    - If it worked properly, you should see in the output of `configure` indicating `yes` for FileGDB support
    - `make && make install`
    - If everything worked, it's time to test it out! Here's a test file: http://trac.osgeo.org/gdal/raw-attachment/wiki/FileGDB/test_fgdb.gdb.zip
  24. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@

    Building GDAL 1.9 with ESRI FileGDB support on OS X Lion
    # Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used ~/local/filegdb, Example path to one of the files: ~/local/filegdb/lib/libFileGDBAPI.dylib
  25. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

    Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used ~/local/filegdb, Example path to one of the files: ~/local/filegdb/lib/libFileGDBAPI.dylib
    @@ -7,10 +8,12 @@
    - ESRI built these dylib's using @rpath's, so to avoid needing to mess with DYLD_LIBRARY_PATH, I updated the @rpath's using install_name_tool
    - Here is the commands I used to patch the dylibs, this is not required if you want to use DYLD_LIBRARY_PATH yourself:

    install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib

    <pre>
    install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib
    </pre>

    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the configure.in script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/2005082
    @@ -22,9 +25,11 @@
    - `make && make install`
    - If everything worked, it's time to test it out! Here's a test file: http://trac.osgeo.org/gdal/raw-attachment/wiki/FileGDB/test_fgdb.gdb.zip

    <pre>
    which ogr2ogr # make sure it's the correct ogr2ogr first
    ogrinfo --formats # list out the formats
    ogrinfo ~/Downloads/test_fgdb.gdb

    #convert FileGDB directly to PostGIS
    ogr2ogr -f "PostgreSQL" PG:"dbname='somedatabase' host='localhost' port='5432'" ~/Downloads/test_fgdb.gdb
    </pre>
  26. @zhm zhm revised this gist Mar 9, 2012. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -7,9 +7,9 @@
    - ESRI built these dylib's using @rpath's, so to avoid needing to mess with DYLD_LIBRARY_PATH, I updated the @rpath's using install_name_tool
    - Here is the commands I used to patch the dylibs, this is not required if you want to use DYLD_LIBRARY_PATH yourself:

    install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib
    install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib

    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the configure.in script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
  27. @zhm zhm created this gist Mar 9, 2012.
    30 changes: 30 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # Building GDAL 1.9 with ESRI FileGDB support on OS X Lion

    - Download the SDK from ESRI's website http://resources.arcgis.com/content/geodatabases/10.0/file-gdb-api
    - Extract the SDK, and put the contents of the directory in a known location, I used ~/local/filegdb, Example path to one of the files: ~/local/filegdb/lib/libFileGDBAPI.dylib
    - I use ~/local/filegdb so it can stay isolated in it's own place, you can put it anywhere, but the next few steps might be different
    - Go into the directory containing the FileGDB SDK, e.g. ~/local/filegdb
    - ESRI built these dylib's using @rpath's, so to avoid needing to mess with DYLD_LIBRARY_PATH, I updated the @rpath's using install_name_tool
    - Here is the commands I used to patch the dylibs, this is not required if you want to use DYLD_LIBRARY_PATH yourself:

    install_name_tool -id "$(pwd)/lib/libFileGDBAPI.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -change "@rpath/libfgdbunixrtl.dylib" "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libFileGDBAPI.dylib
    install_name_tool -id "$(pwd)/lib/libfgdbunixrtl.dylib" ./lib/libfgdbunixrtl.dylib

    - To verify the paths, use `otool -L lib/libFileGDBAPI.dylib` and `otool -L lib/libfgdbunixrtl.dylib` and make sure the paths are correct
    - We need to make some changes to the configure.in script for GDAL now, since the FileGDB config code hasn't yet been updated for the OSX FileGDB SDK
    - In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/2005082
    - In the GDAL source root, run ./autogen.sh to re-create the configure script
    - Now run the `configure` script
    ./configure --with-fgdb=/Users/zacmcc/local/filegdb
    - The `configure` script has many options, here is the configure line I use for my custom build: https://gist.github.com/2005091, if you have other GDAL builds on your machine (e.g. homebrew) that you don't want to interfere with, I recommand at least using --prefix=~/local or some other place on your machine besides /usr/local (default for homebrew) or /opt/local (default for MacPorts).
    - If it worked properly, you should see in the output of `configure` indicating `yes` for FileGDB support
    - `make && make install`
    - If everything worked, it's time to test it out! Here's a test file: http://trac.osgeo.org/gdal/raw-attachment/wiki/FileGDB/test_fgdb.gdb.zip

    which ogr2ogr # make sure it's the correct ogr2ogr first
    ogrinfo --formats # list out the formats
    ogrinfo ~/Downloads/test_fgdb.gdb

    #convert FileGDB directly to PostGIS
    ogr2ogr -f "PostgreSQL" PG:"dbname='somedatabase' host='localhost' port='5432'" ~/Downloads/test_fgdb.gdb