David Strauch
s t r a u c h  at  h a w a i i . e d u

Installing Open-Source QGIS/GRASS on Macs

GRASS logo


This page will guide you through the steps to install two of the leading open-source GIS applications, which can be integrated to use the advantages of both together. These instructions are specifically for MacOSX, but the software can also be installed on other operating systems (a couple good introductions with installation notes are here and here). This page was written to supplement a workshop at the University of Hawai‘i at Mānoa (UHM) Geography department's Cartography Lab, and includes several GRASS locations for Hawai‘i.

Geographic Information Systems (GIS) are powerful tools for modeling and analyzing spatially referenced data. There are a variety of different systems, the most common of which is ArcGIS. However, Arc is both expensive, and restricted to computers running Microsoft Windows operating systems. A good way to move beyond these limitations is to use free and open-source software (FOSS).

FOSS is free both in the sense that it costs nothing ("free as in beer," or gratis) and in the sense that it can be modified by users as they see fit ("free as in speech," or libre). Open-source projects tend to be collaborative, and to build on work that other programmers have done before. Because of this, it is sometimes necessary to install a series of frameworks or software libraries before installing the applications themselves. While this may seem a little daunting at first, it isn't really difficult at all.

Open-source projects also have a reputation for being a bit anarchic and unpolished, and harder to use than commercial packages — but while this has sometimes been the true of early versions, many FOSS programs are now quite slick and user-friendly. With the integration of QGIS and GRASS, there is now an open-source alternative which is arguably as powerful and easy to use as Arc — and it's free.

Quantam GIS (QGIS) is an elegant program which provides a good way to arrange and view GIS data. Its earlier versions had limited ability to analyze and manipulate data, but it can now integrate "plug-ins" from other FOSS projects which give it extensive capabilities. GRASS (for Geographic Resources Analysis Support System) has long been one of the most analytically powerful command-line GIS applications available, but its complexity and former lack of a smooth graphic user interface (GUI) has made it difficult for new users. Recent versions have had better and better GUIs, and now that it can be integrated with QGIS as a smooth front-end, it has become much more accessible.

Both GRASS and QGIS can be easily installed as "stand-alone" applications, but installing them so that they work together takes a couple of addtional steps. Because both programs are cross-platform, and will work on a number of operating systems, each new version needs to be "ported" to each system. In this case, the work of porting this software to OSX has been done by William Kyngesburye, and additional information and software can be found on his KyngChaos website.

Notes on Installing Software for Mac OSX

The following packages are designed for operating systems OSX 10.6 (Snow Leopard) and OSX 10.7 (Lion). Some versions for earlier systems can be found on the KyngChaos website. You can check which version of OSX you're running using "About This Mac" under the Apple menu.

Installing GRASS and QGIS

I. Download and install libraries and frameworks in the following order:
  1. FreeType Framework 2.4.10-1
  2. GDAL Complete 1.10 (or GDAL Complete 1.9 for QGIS)
  3. Cairo Framework 1.12.2-1
  4. GSL Framework 1.16-1
  5. Python Imaging Library (PIL) 1.1.7-4
  6. Tcl/Tk Aqua 8.5.8-2
II. Then download and install QGIS and GRASS:
  1. QGIS 1.8-2 (or try out the development version QGIS 1.9 (2012/03/11)).
  2. GRASS 6.4.3-1
  3. (or GRASS 6.4.2-5 for QGIS)
  4. GRASS GDAL plugin (included on the GRASS disk image (.dmg))
III. Installing GRASS locations
  1. Download this grassdata archive.
  2. Unzip this file, so you have a "grassdata" folder.
  3. Move this folder to your home directory.
  4. If you have problems using this, you may need to change access permissions to make yourself the owner of this and subsidiary directories (using File>Get Info>Sharing & Permissions>Apply to enclosed items).
IV. Setting up the software
  1. Start QGIS.
  2. Under the Plugins menu, "Manage Plugins" will give you a list of optional features you can add to QGIS. Add "GRASS" and it will appear in the Plugins menu, with GRASS icons in the menu bar.
  3. To use GRASS you will first have to choose a GRASS mapset, or create a new one. Try Plugins>GRASS>Open_Mapset and choose the grassdata folder in your home directory as your Gisdbase, NaturalEarth as your location, and NEwork1 as your mapset.
  4. You can now "Add GRASS vector layer" from any NaturalEarth mapset, or use Plugins>GRASS>Open_GRASS_Tools to access all GRASS capabilities.

That should get you up and running!

GRASS locations:

There is quite a bit of useful documentation for GRASS and I won't do more here than just touch on the way GRASS organizes spatial data. It does this using a set of "location" directories, which are kept together in a data directory usually named "grassdata." Inside each location can be various mapsets, including one called PERMANENT which defines the extent and projection of each location.

Because the agencies that make GIS data publically available in Hawai‘i use different datums, I have created a set of locations inside a grassdata directory, which you can use to begin working with data.

Location Projection Datum Data Source
CCHonolulu State Plane O‘ahu, Zone 3, feet NAD83 HARN (CCH) HoLIS
StateHI UTM 4N NAD83 State of Hawai‘i
Arboretum UTM 4N WGS84 [total stations]
NaturalEarth Latitude-Longitude WGS84 NaturalEarthData

These locations contain only a few of the available layers, but you can download more and import them into the mapsets. There are a couple of tutorials for GRASS available, which use other sample locations which you can download and add to your grassdata directory.

The biggest drawback I've found to QGIS is that it does not always police the projection of the layers you add, so it is quite possible to add shapefiles from different datums onto the same map, with the result that they will not be spatially aligned. The coordinate reference system (CRS) in QGIS can be changed in Preferences. More information can be found in the QGIS documentation. If you want to align layers from more than one location, you will have to use GRASS to transform one of them into the other's datum and projection.

Additional options:

GRASS and QGIS are not the only geographic FOSS applications; a number of others are listed at the Open Source Geospatial Foundation (OSGeo). One that seems especially useful is gvSIG, available in a distribution from OA Digital, which aside from its more powerful features provides a good free way for viewing .dxf and .dwg files on the Mac. (OpenOffice will display dxf files but without georeferencing.) uDig is another interesting GIS option. ScapeToad is an open source application for creating cartograms. There are also cartographic applications which are not open-source, but which are free, such as the excellent Flex Projector.

For open-souce map illustration, Inkscape is a vector editor similar to Adobe Illustrator, while GIMP (GNU Image Manipulation Program, available from the GIMP on OS X project) is a pixel graphic program similar to Photoshop.

There are several options for getting deeper into GIS which I haven't set up yet. KyngChaos provides distributions for PostgreSQL and GIS extras and for Mapserver; and for a number of GDAL plugins (ECW, GeoPDF, MrSID, & R-GDAL) and Python modules. The statistical package R can also be used for geostatistical analysis in conjunction with GRASS.


Finally, many thanks to all the people who have worked on creating these programs, and particularly to William Kyngesburye for putting these distributions together, and Tom Patterson and colleagues for making the Natural Earth Data available.

Late Notes:

Like FOSS in its various manifestations, all of the material I've composed on this page is available for your modification and redistribution.

As I've started working with this more I have found that the QGIS front end does not quite give complete graphic access to the full functionality of GRASS; there are at least a couple of commands that can only be done from the command line in QGIS or one of the other GUI wrappers for GRASS. More on this to come.

This page was last updated 15 August 2013

back to top

Bunchy Top at Ricky's