Installing GDAL (mac)

GDAL is a powerful library, but for many it is the first step into an open-source GIS world, which tends to lack GUIs and becomes an introduction to the command line or terminal. To get GDAL installed on your mac, grab the most recent release from Kyngchaos (currently at version 1.10). If you haven’t installed any of the necessary packages, I recommend installing the GDAL 1.xx Complete package, which will include all of the necessary python frameworks.

Once you have that downloaded, go through the normal install process as if it were another application. Once installed, there is one very important step in order to get it working on your command line. I’m grabbing this directly from Mapbox, but it’s such a necessary step that needs repeating. Run the following command in your terminal:

echo 'export PATH=/Library/Frameworks/GDAL.frame
work/Programs:$PATH' >> ~/.bash_profile
source ~/.bash_profile

This will set your path for the GDAL framework and will make the ‘gdal’ and ‘ogr’ commands global. That’s it! Check out some of Chandler’s tips on using GDAL/OGR, or even the python examples he put together to run spatial processes.