[GRASS-SVN] r60615 - in grass/trunk: lib/python/script raster3d/r3.info

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 30 10:34:06 PDT 2014


Author: annakrat
Date: 2014-05-30 10:34:06 -0700 (Fri, 30 May 2014)
New Revision: 60615

Modified:
   grass/trunk/lib/python/script/raster3d.py
   grass/trunk/raster3d/r3.info/r3.info.main.c
Log:
r3.info: output also rows, cols and depths

Modified: grass/trunk/lib/python/script/raster3d.py
===================================================================
--- grass/trunk/lib/python/script/raster3d.py	2014-05-30 16:05:08 UTC (rev 60614)
+++ grass/trunk/lib/python/script/raster3d.py	2014-05-30 17:34:06 UTC (rev 60615)
@@ -62,6 +62,8 @@
         kv[k] = float(kv[k])
     for k in ['nsres', 'ewres', 'tbres']:
         kv[k] = float_or_dms(kv[k])
+    for k in ['rows', 'cols', 'depths']:
+        kv[k] = int(kv[k])
     for k in ['tilenumx', 'tilenumy', 'tilenumz']:
         kv[k] = int(kv[k])
     for k in ['tiledimx', 'tiledimy', 'tiledimz']:

Modified: grass/trunk/raster3d/r3.info/r3.info.main.c
===================================================================
--- grass/trunk/raster3d/r3.info/r3.info.main.c	2014-05-30 16:05:08 UTC (rev 60614)
+++ grass/trunk/raster3d/r3.info/r3.info.main.c	2014-05-30 17:34:06 UTC (rev 60615)
@@ -418,6 +418,10 @@
 
 	    fprintf(out, "tbres=%g\n", cellhd.tb_res);
 
+	    fprintf(out, "rows=%d\n", cellhd.rows);
+	    fprintf(out, "cols=%d\n", cellhd.cols);
+	    fprintf(out, "depths=%d\n", cellhd.depths);
+
 	    fprintf(out, "datatype=\"%s\"\n",
 		    data_type == FCELL_TYPE ? "FCELL" :
 		    data_type == DCELL_TYPE ? "DCELL" :



More information about the grass-commit mailing list