[GRASS-SVN] r58723 - grass/trunk/lib/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 14 05:26:07 PST 2014


Author: glynn
Date: 2014-01-14 05:26:07 -0800 (Tue, 14 Jan 2014)
New Revision: 58723

Modified:
   grass/trunk/lib/raster/get_row.c
Log:
Fix for applying MASK to reclass maps (issue #1999)


Modified: grass/trunk/lib/raster/get_row.c
===================================================================
--- grass/trunk/lib/raster/get_row.c	2014-01-14 12:26:59 UTC (rev 58722)
+++ grass/trunk/lib/raster/get_row.c	2014-01-14 13:26:07 UTC (rev 58723)
@@ -919,11 +919,13 @@
 	return;
     }
 
-    if (R__.fileinfo[R__.mask_fd].reclass_flag)
+    if (R__.fileinfo[R__.mask_fd].reclass_flag) {
+	embed_nulls(R__.mask_fd, mask_buf, row, CELL_TYPE, 0, 0);
 	do_reclass_int(R__.mask_fd, mask_buf, 1);
+    }
 
     for (i = 0; i < R__.rd_window.cols; i++)
-	if (mask_buf[i] == 0)
+	if (mask_buf[i] == 0 || Rast_is_c_null_value(&mask_buf[i]))
 	    flags[i] = 1;
 
     G__freea(mask_buf);



More information about the grass-commit mailing list