GRASS Changes: 1st Edition

Important changes in GRASS 5.0.0 since book submission (1st Edition)

Open Source GIS: A GRASS GIS Approach
Markus Neteler, Helena Mitasova
1. Edition 2002, 464 pages
ISBN: 1-4020-7088-8
Kluwer Academic Publishers, Boston, Dordrecht, London
Book Series: The Kluwer international series in Engineering and Computer Science: Volume 689

The book “Open Source GIS:A GRASS GIS Approach” (ISBN: 1-4020-7088-8) was submitted to the publisher in February 2002 (at the same time GRASS 5.0.0pre3 has been released). To help the readers of the book with ongoing improvements and changes in GRASS we will maintain this web page for a while.

In general please refer to the NEWS file for a list of changes between GRASS 5.0.0pre3 and the current version.
For your convenience we list some of the changes here:

    • General GRASS changes:
        • There are many places in the book where we use ‘cd $LOCATION'. To allow for parallel sessions of GRASS with different LOCATIONs this variable no longer exists. It can be composed now by joining the variables $GISDBASE, $LOCATION_NAME and $MAPSET. The GRASS command ‘eval `g.gisenv`‘ will print related variable settings. Therefore use ‘cd $GISDBASE/$LOCATION_NAME/$MAPSET‘ instead of ‘cd $LOCATION‘.
          • Related change for script programming: every script must have at beginning:
                       eval `g.gisenv`
                       : ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
                       LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET
            

            to work properly.

          • Gmakefiles contain a DEP line now (needed to support optional GRASS shared libraries)
        • Module changes (selected changes only):
        • Book Page(s)ModuleChange in GRASS
          generallyd.zoomThe mouse button functions have been changed after the book was published.
          p. 108d.barscaled.barscale was updated and also the ‘at=’ parameter order has been changed from y,x to x,y. after the book was published. The command for page 108 is now
          d.barscale at=5,90
          p. 111r.slope.aspectThe color table for curvatures was not written in GRASS 5.0.0pre3. This was fixed in pre4 so that you do not have to re-define the color table for the curvature map any longer.
          p. 123v.in.shapewas completely rewritten in GRASS5.0pre4 (should work much better now)
          p. 130v.transformreads binary files now in GRASS5.0pre4 (not ASCII any more, so v.in.ascii/v.out.ascii sequence is no longer required)
          p.128/143v.alabel/v.llabelcategory label support added in GRASS5.0pre4
          p.140v.trimthis command was disabled as it needs bugfixing
          p. 145v.cutterThe ‘-u’ flag no longer exists. Parameters were renamed: now the parameter ‘input=’ instead of ‘data=’ must be used. The ‘type=area’ (or both line and area) parameter must be used. So the command should be:
          v.cutter cutter=rstrct.areas input=soils out=soils.cut type=area
          p. 167s.surf.rstadded optional anisotropy in GRASS5.0pre4 as described in the book
          p. 170s.surf.rstcvs.surf.rstcv module with crossvalidation added (Jaro submit?)
          p. 310Wake exampleFor illustration we’ll add online figures here: URL to be added
          p. 311m.in.e00in GRASS5.0pre3 the imported file has huge negative integer number for no-data which needs to be changed to NULL (e.g. by r.null), this problem was fixed in GRASS5.0pre4 (here the import works as described in the book)
          p. 313The number 50000 is the map scale 1:50000. Always the true map scale should be given when importing SHAPE files.
          generalDo we still need to exit GRASS to change LOCATION?
          Switching between LOCATIONs is partially supported since pre4 or later, using any of:

              g.gisenv set=GISDBASE=newdbase
              g.gisenv set=LOCATION_NAME=newlocation
              g.gisenv set=MAPSET=newmapset

          Things which won’t work correctly include:

          1. Monitor state (resizing, d.save, d.redraw etc). You may as well run “d.erase” when changing LOCATION, as the stored state is no longer usable.
          2. Existing NVIZ and tcltkgrass sessions won’t recognise the change of LOCATION; they will continue to use the old LOCATION.
          3. The shell history (.bash_history) will be saved in the original mapset directory.

          • HINTS and TIPS:

          Book Page(s)ModuleRecommendation
          p. 311to see the variability in the DEM enlarge the monitor to get more detailed image
          p. 312change the color table of ned30.sl to the 0 yellow, 2 green, 4 cyan, 6 blue, 8 magenta, 10 red, 30 black to highlight the differences between the portions of DEM from different sources.
          Chapter 11Programming:

            • Since the variable $LOCATION no longer exists, every GRASS shell script must have at beginning:

            eval `g.gisenv`
            : ${GISBASE?} ${GISDBASE?} ${LOCATION_NAME?} ${MAPSET?}
            LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET

            to work properly.

              • Gmakefiles contain a DEP line now (needed to support optional GRASS shared libraries)
              • GISDBASE isn’t meant to be an “environment variable”, it’s a setting in $GISRC. Although most of the GRASS documentation is totally confused on this issue, as was some of the code as well (mostly, code written in Bourne shell, Tcl or PERL; code written in C used G_getenv(), which got it right).

              [text in red color needs to be updated here]