[GRASS-SVN] r60989 - grass/branches/releasebranch_7_0/raster/r.tile

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 26 12:47:08 PDT 2014


Author: neteler
Date: 2014-06-26 12:47:08 -0700 (Thu, 26 Jun 2014)
New Revision: 60989

Modified:
   grass/branches/releasebranch_7_0/raster/r.tile/main.c
   grass/branches/releasebranch_7_0/raster/r.tile/r.tile.html
Log:
r.tile: msg cosmetics; example fix

Modified: grass/branches/releasebranch_7_0/raster/r.tile/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.tile/main.c	2014-06-26 19:04:11 UTC (rev 60988)
+++ grass/branches/releasebranch_7_0/raster/r.tile/main.c	2014-06-26 19:47:08 UTC (rev 60989)
@@ -31,7 +31,7 @@
 {
     struct GModule *module;
     int infile;
-    size_t xtile_size, cell_size;
+    size_t cell_size;
     int ytile, xtile, y, overlap;
     int *outfiles;
     void *inbuf;
@@ -58,14 +58,14 @@
     parm.width->type = TYPE_INTEGER;
     parm.width->required = YES;
     parm.width->multiple = NO;
-    parm.width->description = _("Width of tiles");
+    parm.width->description = _("Width of tiles (columns)");
 
     parm.height = G_define_option();
     parm.height->key = "height";
     parm.height->type = TYPE_INTEGER;
     parm.height->required = YES;
     parm.height->multiple = NO;
-    parm.height->description = _("Height of tiles");
+    parm.height->description = _("Height of tiles (rows)");
 
     parm.overlap = G_define_option();
     parm.overlap->key = "overlap";
@@ -121,8 +121,10 @@
     G_debug(1, "X: %d * %d, Y: %d * %d",
 	    xtiles, dst_w.cols, ytiles, dst_w.rows);
 
+    G_message(_("Generating %d x %d = %d tiles..."), xtiles, ytiles, xtiles * ytiles);
     for (ytile = 0; ytile < ytiles; ytile++) {
 	G_debug(1, "reading y tile: %d", ytile);
+	G_percent(ytile, ytiles, 2);
 	for (xtile = 0; xtile < xtiles; xtile++) {
 	    char name[GNAME_MAX];
 	    sprintf(name, "%s-%03d-%03d", parm.rastout->answer, ytile, xtile);

Modified: grass/branches/releasebranch_7_0/raster/r.tile/r.tile.html
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.tile/r.tile.html	2014-06-26 19:04:11 UTC (rev 60988)
+++ grass/branches/releasebranch_7_0/raster/r.tile/r.tile.html	2014-06-26 19:47:08 UTC (rev 60989)
@@ -21,11 +21,12 @@
 # rows:       1350
 # cols:       1500
 
-r.tile input=elevation output=elev_tile width=135 height=150
+# generating 2 x 2 = 4 tiles (width=1500/2, height=rows/2)
+r.tile input=elevation output=elev_tile width=750 height=675
 </pre></div>
 
-creates 108 tiles with the prefix <em>elev_tile</em> (named:
-elev_tile-000-000, elev_tile-000-001, elev_tile-000-002, ...).
+creates 4 tiles with the prefix <em>elev_tile</em> (named:
+elev_tile-000-000, elev_tile-000-001, elev_tile-001-000, ...).
 
 <h2>SEE ALSO</h2>
 



More information about the grass-commit mailing list