[GRASS-SVN] r46345 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 22 02:58:23 EDT 2011


Author: mmetz
Date: 2011-05-21 23:58:23 -0700 (Sat, 21 May 2011)
New Revision: 46345

Modified:
   grass/branches/develbranch_6/lib/gis/get_row.c
Log:
get null value row: backport r46323

Modified: grass/branches/develbranch_6/lib/gis/get_row.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/get_row.c	2011-05-21 15:33:59 UTC (rev 46344)
+++ grass/branches/develbranch_6/lib/gis/get_row.c	2011-05-22 06:58:23 UTC (rev 46345)
@@ -1242,7 +1242,20 @@
  */
 int G_get_null_value_row(int fd, char *flags, int row)
 {
-    get_null_value_row(fd, flags, row, 1);
+    struct fileinfo *fcb = &G__.fileinfo[fd];
 
+    if (!fcb->reclass_flag)
+	get_null_value_row(fd, flags, row, 1);
+    else {
+	CELL *buf = G_allocate_c_raster_buf();
+	int i;
+
+	G_get_c_raster_row(fd, buf, row);
+	for (i = 0; i < G__.window.cols; i++)
+	    flags[i] = G_is_c_null_value(&buf[i]) ? 1 : 0;
+
+	G_free(buf);
+    }
+
     return 1;
 }



More information about the grass-commit mailing list