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?

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

Ad

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

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

European Global Position System Failure Points to the Importance of Location Technology

What is being called a “major outage” by the European Global Navigation Satellite System (GNSS) Agency, or GSA, highlights the…

6 days ago

How to Change the Projection of a Shapefile Using QGIS

If you know the starting coordinate system or projection of your shapefile, you can quickly export the data into another…

1 week ago

How Refugees are Using GIS to Map Their Geographies and Experiences

Story maps are a powerful tool that tell events and what has happened to those who are displaced.

2 weeks ago

Analyzing the Benefits of Green Space on Mental Health Using GIS

A recent large-scale study in Denmark combined historical Landsat satellite data and a survey that recorded mental health benefits to…

2 weeks ago
Ad

NASA is Expanding its Worldwide Landslide Data Catalog Using Volunteers

NASA has developed Landslide Reporter as a way to collect as much information as possible about landslides from citizen scientists from around…

2 weeks ago

Using Remote Sensing to Detect Structural Changes in Bridges

Researchers are using synthetic aperture radar (SAR) collected from satellites to detect structural changes in bridges.

2 weeks ago