Browse Source

r3.info: output also rows, cols and depths

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60615 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 years ago
parent
commit
0c99f7de35
2 changed files with 6 additions and 0 deletions
  1. 2 0
      lib/python/script/raster3d.py
  2. 4 0
      raster3d/r3.info/r3.info.main.c

+ 2 - 0
lib/python/script/raster3d.py

@@ -62,6 +62,8 @@ def raster3d_info(map):
         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']:

+ 4 - 0
raster3d/r3.info/r3.info.main.c

@@ -418,6 +418,10 @@ int main(int argc, char *argv[])
 
 	    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" :