In the even that this might be the case, I also tried creating a new map

r.mapcalc 
expression='SRTM_ffB03_p199r033_2=if(SRTM_ffB03_p199r033==-32768,null(),SRTM_ffB03_p199r033)'

...and got the same result with the new map. 

r.null does work of course.

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 11, 2011, at 8:54 PM, Glynn Clements wrote:

> 
> Michael Barton 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?
> 
> Using the same map for input and output results in undefined
> behaviour. If you want to change a value to null "in place", use
> r.null.
> 
> -- 
> Glynn Clements <[email protected]>

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to