LWN.net Logo

The GRASS Geographical Information System

February 9, 2005

This article was contributed by Frank Pohlmann

GRASS GIS is one of the most under-hyped open-source applications currently in existence. GRASS stands for "Geographic Resources Analysis Support System"; it represents the most complete Geographical Information System available under the GPL.

The history of GRASS

GRASS has been in existence since 1982, according to the history document. It started life as a so-called environmental planning and land management system, its function was to enable the US Army Corps of Engineers' Construction Engineering Research Laboratory (USA-CERL) to manage the Pentagon's considerable landholdings.

GRASS originated on a VAX Unix environment and was ported to various Unix flavors during the 1980s. The project leader Bill Goran and the software architect L. Van Warren initially assumed that other commercial GIS systems would be easily accessible, and that they would be able to adapt such systems to the Pentagon's needs. After some analysis, they realized that no existing GIS system would meet the Pentagon's standards; they decided to create GRASS mostly from scratch, although existing Unix libraries were used wherever possible. GRASS was released as public domain software in 1985. The project received feedback from other development groups working at federal and institutions and universities.

In 1996, version 5 was in the making, but USA-CERL decided to withdraw support from the public domain version of GRASS, and collaborated with several commercial entities to create the non-free GRASSLANDS and other derivatives. In 1999 GRASS was released under the GPL while under the leadership of the University of Baylor and Markus Neteler, then at the University of Hanover. Various ports to a number of Linux flavors and non-Intel architectures have come into existence since.

These days the stable 5.4 version is available for Linux, Mac OS X, and Windows NT/2000/XP under Cygwin. It is possible to run GRASS on a number of Unix systems, but one would be well advised to compile from source, since, despite assurances to the contrary, binaries are not always available. The same advice applies to version 6.0.0, so far there are only beta and development versions available.

The GRASS Architecture

GRASS is currently undergoing a major version change, from 5.4 to 6.0.0. GRASS consists of more than 350 programs and scripts and most can be accessed from the command line. The project is almost completely GUI-accessible now. It has been running with a Tcl/Tk interface since version 5.4, that was initially coded by Jacques Bouchard. The Tcl/Tk version of GRASS is known as tcltkgrass, although from version 6.0.0 and forward, the interface has been changed considerably. The reliance on Tcl/Tk is set to grow less and less pronounced. All modules included in the GRASS tool chain that require user interaction use a new display manager to create GUIs every time they are instantiated.

The internationalization framework for GRASS is has been fully implemented, and character sets which are part of the Unicode standard can be used to implement new localization projects. The display routines now support the multi-byte character sets used in East Asian languages.

GRASS is huge, there are currently more than 1 million lines of C code. Binary versions weigh in between 30 and 150 MB, depending on the options enabled at compile time and the operating system target. C++ support is being added, although it is not clear to what extent future modules should be written in C++.

All GIS tool chains rely on databases to handle their spatial data. Internally, GRASS relies on dBase, although interfaces to external databases engines like MySQL, PostgreSQL and ODBC-based database engines exist, and are well supported. Anyone writing new modules for GRASS database access will not have to pay attention to the specifics of the database engine. For users and programmers, a basic Unix-type sub-directory structure with pre-configured directory names has to be created first, since it is hard coded into the GRASS installation and configuration files.

Multiple GRASS sessions can now be started from the same installation. This is particularly useful for instances where users might want to work on different versions of the same dataset. It is even possible to start 5.4 sessions and 6.0 sessions concurrently without having to worry about version conflicts.

GRASS supports both raster-based and vector-based data management; but unlike many other GIS systems, it supports a large variety of image processing modules, the creation of maps using the PROJ.4 cartographic projections library, and data visualization. Grass can process 2D and 3D raster data in 40 different formats including the bmp and jpeg formats as well as the less common JDEM format. The GDAL library supports many formats, although many of the more obscure formats can only be read, not created. 3D raster (voxel) volumes have been folded into GRASS quite recently with the 5.7 development version. Routines from the scriptable NVIZ package make it easy to visualize the same 3D raster data, since it includes new 3D display routines.

Vector data handling has been the subject of a complete rewrite. GRASS 6.0.0 is now able to handle topological vector data fully, and the vector geometry engine uses a data format that can live on 32 and 64-bit processors. Internal data structures have been rewritten in such a way that vector data can be accessed much more quickly. Vector data include non-spatial attributes that are best processed by traditional SQL-driven database management systems, a factor in the decision to include external database support.

GRASS can also handle PostGIS geographical objects stored on PostgreSQL. PostGIS objects are accessed as a vector file format. They are made available through the OGR Simple Features Library, which is a part of the GDAL package.

GRASS Applications

GRASS has been used in many contexts, from academic environments to soil erosion modeling and social science simulations. Vector network analysis is a well-established technique that adds another data modeling layer to the range of information evaluation tools already available. Statistical routines are accessible via the R interface, this makes it possible to produce geostatistics.

The number of interfaces, scripting routines, visualization packages as well as its stability and scalability make GRASS a truly unique addition to the stable of Linux applications. GRASS has also become the focus around which several Linux distributions have been built, including GIS Knoppix and Quantian. Enjoy!


(Log in to post comments)

corrections: tcltkgrass since 1998 and own internal dataformat

Posted Feb 10, 2005 17:51 UTC (Thu) by ber (subscriber, #2142) [Link]

  • The sentence about the Tcl/Tk interface is a bit missleading as GRASS has a GUI accessible interface since at least about 1998 and version 4.2.* or so. See GRASS History and a grass screenshot from 1999 showing tcltkgrass 2.5 and vectors.
  • To my best knowledge GRASS has its own dataformat and does not rely on dBase files internally. It can import dbf files and also connect to various external database systems.

The GRASS Geographical Information System

Posted Feb 11, 2005 9:37 UTC (Fri) by Klavs (subscriber, #10563) [Link]

I am glad that the Americans have had such a good "mind for sharing", so the state's development projects, more than once, has been done under the GPL license. I wish that european countries (incl. my own, Denmark) would learn from that. Afterall, when it's paid for by us all, it should be accessible by us all. And putting it under GPL, also ensures that developing countries could make use of it, and thus help their own infrastructure, which would be a very good way of making contributions to developing countries, without it costing a dime more.

The GRASS Geographical Information System

Posted Feb 18, 2005 18:42 UTC (Fri) by ber (subscriber, #2142) [Link]

I am glad that the Americans have had such a good "mind for sharing", so the state's development projects, more than once, has been done under the GPL license.

Originally they did not use the GNU GPL. The U.S.A. have a long standing tradition to have information that were aquired with federal money to be put in the public domain. Public domain is only possible in some part of the world and means: Nobody is the author and there is no copyright protection.

US CERL published GRASS as public domain, later the development team (under the lead of Markus Neteler, Hannover, Germany as that time) used their contributions to claim copyright again and license the GRASS version under the GNU GPL clearing up a long standing license confusion making GRASS clearly Free Software.

The GRASS -- What is it?

Posted Feb 19, 2005 4:18 UTC (Sat) by dmag (subscriber, #17775) [Link]

Um, I'm not trying to be a troll, but this article wasn't very useful. First, it didn't explain what GRASS is or what I could use it for. Second, it uses a *lot* of GIS jargon that us mortals can't always parse. (For example: "They are made available through the OGR Simple Features Library, which is a part of the GDAL package.")

The GRASS -- What is it?

Posted Feb 21, 2005 1:13 UTC (Mon) by ukfrank05 (guest, #27797) [Link]

GRASS stands for "Geographic Resources Analysis Support System"; it represents the most complete Geographical Information System available under the GPL. This, perhaps, has to suffice as a bare-bones explanation for GRASS. Admittedly, it could be longer...Your comment about gdal is valid, though.

Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds