[GRASSLIST:8484] Re: converting raster value of 0 (black) to
null
bfdi533
bfdi533 at cbacc-security3.mccombs.utexas.edu
Tue Oct 4 10:09:27 EDT 2005
On Mon, 2005-10-03 at 15:33 -0700, Ian MacMillan wrote:
> Ed, you can try this. First, I think you need to put quotes around
> your if statement. The command line is probably choking on the
> parentheses. So instead of
>
> > radarnew=if(radar=0,null(),radar)
> try
> r.mapcalc radarnew = 'if(radar=0, null(),radar)'
>
> Or you could just use r.null (designed specifically for your purpose).
That did the trick exactly. I had no idea this one existed and it
worked perfectly.
Per another post, I also determined that the radar=0 should have been
radar==0 which is why I got the all pink result.
Thanks to all for the pointers.
--
--------------------------
Ed Davison
More information about the grass-user
mailing list