[GRASS-SVN] r69356 - grass/trunk/raster/r.what

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 3 07:16:26 PDT 2016


Author: mmetz
Date: 2016-09-03 07:16:26 -0700 (Sat, 03 Sep 2016)
New Revision: 69356

Modified:
   grass/trunk/raster/r.what/main.c
Log:
r.what: print labels also for FCELL/DCELL maps

Modified: grass/trunk/raster/r.what/main.c
===================================================================
--- grass/trunk/raster/r.what/main.c	2016-09-03 14:11:48 UTC (rev 69355)
+++ grass/trunk/raster/r.what/main.c	2016-09-03 14:16:26 UTC (rev 69356)
@@ -453,6 +453,7 @@
 			continue;
 		    }
 		    fprintf(stdout, "%s%ld", fs, (long)cache[point].value[i]);
+		    cache[point].dvalue[i] = cache[point].value[i];
 		}
 		else {		/* FCELL or DCELL */
 
@@ -473,7 +474,7 @@
 		}
 		if (flg.label->answer)
 		    fprintf(stdout, "%s%s", fs,
-			    Rast_get_c_cat(&(cache[point].value[i]), &cats[i]));
+			    Rast_get_d_cat(&(cache[point].dvalue[i]), &cats[i]));
 		if (flg.color->answer)
 		    fprintf(stdout, "%s%s", fs, cache[point].clr_buf[i]);
 	    }



More information about the grass-commit mailing list