[GRASS-user] r.mapcalc on RGB composite

Michael Barton michael.barton at asu.edu
Wed May 9 10:57:55 EDT 2007




On 5/9/07 7:19 AM, "Jarle Pedersen" <mybigb at gmail.com> wrote:

> Hi again folks. Next noobie question:
> 
> I'm trying to use r.mapcalc to set the sea of some landsat imagery to
> null-values in order for me to view my much nicer background. My workflow
> was as follows:
> 
> 1. r.composite -d -c red="b1" green="b4" blue="b7" levels=32 output="RGB"
> 2. r.mapcalc "RGB_water=if(dem=0,null(),RGB)"

r.mapcalc "RGB_water=if(dem==0,null(),RGB)"
                          ^__^

A single "=" sets the value of a variable
A double "==" tests the value of a variable

Michael

> 
> This does not fill the water with null, rather keeps the original values
> and distorts the colors to yellow/greenish output.
> 
> What am I missing?
> 
> 
> 
> 

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-user mailing list