Moskovitz, Bob wrote:
> Based on what I read from that link I tried:
> r.mapcalc "q50_eh_nonan = if(q50_eh != q50_eh,null(),q50_eh)"
>
> It assigned nan to 0. It would be great if r.null can use such a simple
> trick.
Can you try the following patch (committed to SVN trunk as r31470):
Index: raster/r.null/mask.c
===================================================================
--- raster/r.null/mask.c (revision 31458)
+++ raster/r.null/mask.c (working copy)
@@ -65,5 +65,8 @@
if (I->inf > 0)
return x >= I->high;
+ if (I->low != I->low && I->high != I->high)
+ return x != x;
+
return x >= I->low && x <= I->high;
}
It should allow you to use e.g. "r.null ... setnull=nan".
It appears to work, but has only been minimally tested.
--
Glynn Clements <[EMAIL PROTECTED]>
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user