[GRASS-dev] strange mapcalc result

Helena Mitasova hmitaso at ncsu.edu
Sun Jul 17 13:22:40 EDT 2011


Should this be documented on wiki for grass7 new features, 
so that there is one place people where can go to when updating 
their scripts, workflows, edu material etc. to grass7?
http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures
There is a change for r.mapcalc noted like this:
r.mapcalc: use pthreads for parsing
but it is not clear from this that every r.mapcalc expression that people have
will need to be modified to run in grass7
(if I understand the changes correctly - I haven't tried it enough yet).

Or we could just say - read the manual page for everything 
when updating to grass7, it may be easier than trying to track all the changes

Helena 


On Jul 17, 2011, at 12:47 PM, Markus Neteler wrote:

> On Mon, Jul 11, 2011 at 7:36 PM, Michael Barton <Michael.Barton at asu.edu> wrote:
>> This is from GRASS 7 compiled from svn trunk yesterday.
>> 
>> I'm simply trying to assign null values in an SRTM using r.mapcalc. I do the following statement...
>> 
>> r.mapcalc expression='SRTM_ffB03_p199r033=if(SRTM_ffB03_p199r033==-32768,null(),SRTM_ffB03_p199r033)' --o
>> 
>> 
>> The entire map turns to null.
>> 
>> Any idea what I'm doing wrong?
> 
> Try this:
> 
> r.mapcalc expression='SRTM_ffB03_p199r033 =
> if(SRTM_ffB03_p199r033==-32768,null(),SRTM_ffB03_p199r033)' --o
> 
> (note the white spaces around "=", which is required in GRASS7 - a bit
> unfortunate...)
> 
> Markus
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev



More information about the grass-dev mailing list