[GRASS-SVN] r73499 - grass/branches/releasebranch_7_6/raster/r.info

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 8 09:22:10 PDT 2018


Author: mmetz
Date: 2018-10-08 09:22:10 -0700 (Mon, 08 Oct 2018)
New Revision: 73499

Modified:
   grass/branches/releasebranch_7_6/raster/r.info/main.c
Log:
r.info -s: always report total number of cells (backport trunk r73497)

Modified: grass/branches/releasebranch_7_6/raster/r.info/main.c
===================================================================
--- grass/branches/releasebranch_7_6/raster/r.info/main.c	2018-10-08 16:20:41 UTC (rev 73498)
+++ grass/branches/releasebranch_7_6/raster/r.info/main.c	2018-10-08 16:22:10 UTC (rev 73499)
@@ -424,6 +424,12 @@
 		G_free(dbuf);
 	    }
 
+	    if (!gflag->answer) {
+		/* always report total number of cells */
+		fprintf(out, "cells=%jd\n",
+			(grass_int64)cellhd.rows * cellhd.cols);
+	    }
+
 	    if (rstats.count > 0) {
 		double mean, sd;
 		



More information about the grass-commit mailing list