[GRASSLIST:4300] Re: Back to pre4

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

Soil & Water Lab. wrote:

> I have too many troubles with "r.mapcalc" in pre5 that I'd like to
> go back to pre4.

What troubles?

The new version is meant to be backwards compatible, with some minor
exceptions for behaviour which didn't seem right.

IIRC, the only intentional changes were:

1. A floating-point value may no longer be used as a boolean value
(i.e. as an operand to && or ||, or as the first argument to the "if"
function); checking whether a floating-point value is exactly equal to
zero is normally considered a bug.

2. Single precision floating-point (C "float", GRASS "FCELL") is now
supported. Computations on FCELL maps may now result in an FCELL map,
whereas the old version would always produce a DCELL map.

3. Type promotion is less aggressive; the old version would sometimes
promote CELL to DCELL unnecessarily.

Any other changes are probably unintentional.

> Do you know where I could find the sources ?

The pre5 source package should include the code for the old r.mapcalc,
in src/raster/r.mapcalc.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-user mailing list