[GRASS-dev] strange mapcalc result
Michael Barton
Michael.Barton at asu.edu
Sun Jul 17 15:42:27 EDT 2011
I just ran this again and it works fine, with and without the spaces--and even copying over the original file. That is, it all works as originally expected it to work. I don't know why this did not work the other day. I tried it several times. The command I sent to the list was copied from my terminal produced all nulls. Now it produces the expected values.
Weird
Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
On Jul 17, 2011, at 9:47 AM, 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
More information about the grass-dev
mailing list