[GRASS-SVN] r49602 - grass/trunk/raster/r.info

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 7 06:24:29 EST 2011


Author: lucadelu
Date: 2011-12-07 03:24:29 -0800 (Wed, 07 Dec 2011)
New Revision: 49602

Modified:
   grass/trunk/raster/r.info/main.c
   grass/trunk/raster/r.info/r.info.html
Log:
add rows, cols and cells output for -g

Modified: grass/trunk/raster/r.info/main.c
===================================================================
--- grass/trunk/raster/r.info/main.c	2011-12-07 11:20:30 UTC (rev 49601)
+++ grass/trunk/raster/r.info/main.c	2011-12-07 11:24:29 UTC (rev 49602)
@@ -317,6 +317,12 @@
 	    G_format_resolution(cellhd.ew_res, tmp3, cellhd.proj);
 	    fprintf(out, "ewres=%s\n", tmp3);
 
+            fprintf(out, "rows=%d\n", cellhd.rows);
+            fprintf(out, "cols=%d\n", cellhd.cols);
+            
+            fprintf(stdout, "cells=%lld\n",
+                    (long long)cellhd.rows * cellhd.cols);
+            
 	    fprintf(out, "datatype=%s\n",
 		    (data_type == CELL_TYPE ? "CELL" :
 		     (data_type == DCELL_TYPE ? "DCELL" :

Modified: grass/trunk/raster/r.info/r.info.html
===================================================================
--- grass/trunk/raster/r.info/r.info.html	2011-12-07 11:20:30 UTC (rev 49601)
+++ grass/trunk/raster/r.info/r.info.html	2011-12-07 11:24:29 UTC (rev 49602)
@@ -84,6 +84,9 @@
 west=589980
 nsres=30
 ewres=30
+rows=477
+cols=634
+cells=302418
 datatype=FCELL
 
 GRASS> r.info -r slope



More information about the grass-commit mailing list