[GRASSLIST:4901] Re: converting null values, is this a bug

Eric G. Miller egm2 at jps.net
Thu Nov 7 10:28:30 EST 2002


On Thu, Nov 07, 2002 at 01:15:17PM -0000, Thomas Dewez wrote:
> Dear all,
> 
> I am trying to convert null values to 0 with r.mapcalc. Did I bump into a bug?
> 
> rast is a raster containing 1 and null() data, with
> 
> r.mapcalc rast.nonull = "if(rast==null(),0,1)"

Use isnull(). You can't compare null to anything.  But, why not use
r.null ?

-- 
static const char signature[] = 
	"Copyright (c) 2002 Eric G. Miller <egm2 at jps.net>";





More information about the grass-user mailing list