Installing GDAL and QGIS on OSX Yosemite
For those of you working on geospatial datasets, if you're like me then your go-to tools will be QGIS and GDAL.
Here's my latest homebrew setup for these tools, on a freshly built OSX Yosemite running 10.10.1.
- I'll assume you already have Homebrew installed and working, you know how to use it, you've run "brew update", and "brew doctor" reports everything is okay.
- Install Homebrew's MySQL 5.6 if you need that support
- If you have previous versions of these tools installed via homebrew, then obviously uninstall them
Installing GDAL 1.11
In my line of work, I specifically need support for the following formats: MySQL, OpenFileGDB, KML, ESRI Shapefile, MapInfo File, GeoRSS. It used to have a whole lot of work, but now it's now as simple as this one-liner:
brew install gdal --enable-unsupported --with-libkml --with-mysql
Run this command to verify your formats are available:
Installing QGIS 2.6
I decided to use the Homebrew QGIS version rather than the (excellent) Kyngchaos distribution. I did this because I found MySQL support tends to be missing from his GDAL build, and its QGIS build relies on its version of GDAL.
# Install X11
brew install Caskroom/cask/xquartz
# here's the big trick to success:
# set up python with dependencies for QGIS
# and export its path before the QGIS build so it can find it
pip install numpy scipy matplotlib processing psycopg2
# Install QGIS
brew tap osgeo/osgeo4mac
brew install qgis-26
# Finally, add an icon into /Applications
brew linkapps qgis-26
Warning, this takes a bunch of time so go grab lunch.