[GRASS-dev] strange mapcalc behavior again
Michael Barton
Michael.Barton at asu.edu
Tue Jul 26 21:14:22 EDT 2011
I wrote about this a week or two ago. I thought it was a fluke. But now it is happening again.
I've attached an output graphic of a couple maps. The base map is of the Mediterranean Sea, called "oceans". The colored areas have a value of 1, the white have a value of null. Over this is a map called 'clipper'. The red areas of clipper have a value of 1, the rest are null. I've also use r.null to make alternate versions of the oceans map and clipper where the null values are replaced by -99.
The following mapcalc statement creates a complete null map.
r.mapcalc 'oceans_clipped=if(clipper==1, null(), oceans)'
The following mapcalc statement creates a map of all -99 values (using the alternate versions of the maps with null values replaced by -99).
r.mapcalc 'oceans_clipped2=if(clipper2==1, -99, oceans2)'
Somehow, the 2nd part of the if clause is being ignored. I've done this in GRASS 6.5 and 7 with the same results (with the changed of syntax needed for GRASS 7). Am I missing something here?
Michael
[cid:B6FA1F29-0B6E-495D-B7BB-F1532D163749 at domain.actdsltmp]
____________________
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlaymaps.png
Type: image/png
Size: 9079 bytes
Desc: overlaymaps.png
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20110726/e194252f/overlaymaps.png
More information about the grass-dev
mailing list