[GRASSLIST:4299] Re: Grass5.0.0pre5 : bugs or new features ?

Glynn Clements glynn.clements at virgin.net
Fri Aug 16 10:56:41 EDT 2002


Soil & Water Lab. wrote:

> I eventually managed to compile Grass5.0.0pre5 on a SuSE7.1.
> Everything's fine so far, but I'm a bit surprised with some results:
> 
> * What happened to the inner variable $LOCATION ? It doesn't seem to be 
> defined any longer.
> * "r.mapcalc" used to send the range of the map to stdout, and some messages 
> to stderr. That was pretty nice to have a first check of some calculations, 
> especially in scripts. Now, I only see the title of the map being created to 
> stderr, and nothing in stdout...
> 
> Are these bugs, or new features ? In other terms, do I have to change all the 
> scripts I have developped :-( , or should I just wait till the next release 

New features.

r.mapcalc has been completely re-written (the "r.mapcalc" binary is
compiled from the code in src/raster/r.mapcalc3; the code in
src/raster/r.mapcalc is no longer used). The new r.mapcalc could
probably be made to output the range without too much effort.

Also, you should be able to get the old r.mapcalc by by using "gmake5
src/raster/r.mapcalc", or by editing src/CMD/list/GRASS then
re-compiling.

The same isn't the case for $LOCATION (also, GISDBASE, LOCATION_NAME
and MAPSET are no longer environment variables). The idea is that it
should be possible to change these settings on the fly. This precludes
the possibility of storing these settings in environment variables, as
a program can't change the environment of its parent.

You could implement equivalent functionality locally, e.g. by adding
something like:

	eval `g.gisenv`
	LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET
	export LOCATION

to ~/.grass.bashrc (a similar feature exists for csh).

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list