Categories: GIS Software

GRASS How To: Acquisition/Compilation of GRASS Source Code

The GRASS binaries for Linux tend to work. Why would anyone want to mess with the source code?

Ad

Let’s try to answer this with another question: “Why can’t I get the source code to my GIS, so I can see how it works, and maybe fix some things to work the way I like them?” (You probably know the answers to this question, at least for many commercial software packages.)

If you want to

Add any of the numerous existing alpha and contributed GRASS functions,


Ad:


Understand how a function works (did any programming shortcuts or performance enhancements affect the accuracy of a function? Can I improve the performance of a function?)

Revise or enhance the code (if you do this, please see Appendix D!),

Try compiling several tens of megabytes of source code, this appendix is for you. Also check Appendix E.

First, you need to acquire the source code, and the GRASS Installation Guide. You may also want to get the GRASS Programmer’s Manual and User’s Reference Manual. To do this:

ftp moon.cecer.army.mil
login: anonymous
password: your email address
cd pub/grass/grass4.1/release/source
get README.4
get README.5
image
mget s4* (or s5*, your choice)
cd ../../documents
get installGuide.ps.Z
cd /manuals/programmer/postscript
get progman.ps.Z
cd ../../user/postscript
get refman.ps.Z
bye

Don’t forget this site. There are several tutorials on some of GRASS’ more advanced programs in the pub/grass/grass4.1/document directory. There are two options for source code (I’m only discussing GRASS version 4.14 here, though version 4.15 is also available) The pub/grass/outgoing directory contains many contributed functions (and many other candidates for enhancing your system).

Follow the README.4 file for installing GRASS version 4.14 (which is sometimes called version 4.1.4) source code. Follow the README.5 file for installing GRASS version 4.15 (which is sometimes called version 4.1.5) source code.

After installing the source code, uncompress and print installGuide.ps.Z (or the troff version, if you prefer that and got it from a neighboring directory). You might also want to uncompress and print refman.ps.Z and progman.ps.Z at the same time. Note that progman.ps.Z is called the programmer’s manual, but also contains valuable information about data formats and directory structures. Advanced users may also want to know the GRASS system utilities, even if they won’t be calling them in code.

Now, use the GRASS Installation Guide (from installGuide.ps.Z) to guide yourself through the installation. The thickness of this document may at first be intimidating. However, if you installed Linux yourself, you should be ready to tackle a GRASS installation. Don’t be surprised if a function or two does not compile on your system. I have a couple of uncompiled functions on my own Linux system. Fortunately, these are functions that I don’t use… Some day I’ll get back to them, fix them, and compile them!?

Here is a late-breaking addition, on how to install the newly released GRASS 4.2 from Baylor University This text is as provided by Baylor, unedited by myself due to its release only a few days ago. Please note the similarity with other installations..

Previous: Acquisition/Installation of GRASS Binaries | Next: GRASS 4.2 Quick Start

By: David A. Hastings – The Geographic Information Systems: GRASS How To

Ad:
Share
Published by

Recent Posts

Report Ranks Participating GIS Public Sector Programs in Canada and the US

The consulting firm, PSD, has issued its second annual report in which it look at the Geospatial Maturity Index (GMI)…

November 14, 2019

DNA Science and GIS

In recent years, spatial analysis has supplemented our understanding of genetic variation and DNA studies.

November 14, 2019

GIS and Map Contests Roundup

Current map and GIS related competitions listed in order of the competition deadline.

November 13, 2019

The Critical Role of GIS in NG9-1-1

Drew Fioranelli, GISP, Public Safety GIS Market Maker, and Annie Cahill, Public Safety GIS Technical Manager with DATAMARK, discuss the…

November 11, 2019

GIS Day and PostGIS Day Coming Up

This year marks the 20th anniversary of GIS Day on November 13, 2019. The following day is PostGIS Day.

November 11, 2019

Mapping the Subsea Forests of the Mediterranean

Inge van den Meiracker writes about her research internship in Greece where she modeled and mapped the seagrass distribution in…

November 9, 2019