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

Thomas Dewez thomas.dewez at brunel.ac.uk
Thu Nov 7 08:15:17 EST 2002

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)"

rast.nonull has 0 categories and:
Range of data:    min =  -2147483648 max = -2147483648  

If I use instead:
r.mapcalc rast.nonull = "if(isnull(rast),0,1)"
the values are then correctly converted from null() to 0.

Why is this?



More information about the grass-user mailing list