瀏覽代碼

r.fill.dir: be less verbose
update manual


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54547 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 12 年之前
父節點
當前提交
ae58041923
共有 4 個文件被更改,包括 26 次插入17 次删除
  1. 4 2
      raster/r.fill.dir/main.c
  2. 19 12
      raster/r.fill.dir/r.fill.dir.html
  3. 2 2
      raster/r.fill.dir/resolve.c
  4. 1 1
      raster/r.fill.dir/wtrshed.c

+ 4 - 2
raster/r.fill.dir/main.c

@@ -244,7 +244,9 @@ int main(int argc, char **argv)
 	close(fm);
 	close(fm);
     }
     }
 
 
+    G_important_message(_("Writing output raster maps..."));
     for (i = 0; i < nrows; i++) {
     for (i = 0; i < nrows; i++) {
+        G_percent(i, nrows, 5);
 	read(fe, in_buf, bnd.sz);
 	read(fe, in_buf, bnd.sz);
 	put_row(new_id, in_buf);
 	put_row(new_id, in_buf);
 
 
@@ -254,9 +256,9 @@ int main(int argc, char **argv)
 	    out_buf[j] = dir_type(type, out_buf[j]);
 	    out_buf[j] = dir_type(type, out_buf[j]);
 
 
 	Rast_put_row(dir_id, out_buf, CELL_TYPE);
 	Rast_put_row(dir_id, out_buf, CELL_TYPE);
-
     }
     }
-
+    G_percent(1, 1, 1);
+    
     Rast_close(new_id);
     Rast_close(new_id);
     close(fe);
     close(fe);
 
 

+ 19 - 12
raster/r.fill.dir/r.fill.dir.html

@@ -58,7 +58,7 @@ the program can be used to generate a flow direction map for any
 sub-area within the full map layer. Also, <em>r.fill.dir</em> is
 sub-area within the full map layer. Also, <em>r.fill.dir</em> is
 sensitive to any <em>mask</em> in effect.
 sensitive to any <em>mask</em> in effect.
 <p>
 <p>
-In some cases it may be necessary to run r.fill.dir repeatedly (using output
+In some cases it may be necessary to run <em>r.fill.dir</em> repeatedly (using output
 from one run as input to the next run) before all of problem areas are
 from one run as input to the next run) before all of problem areas are
 filled.
 filled.
 
 
@@ -68,26 +68,33 @@ filled.
 r.fill.dir input=ansi.elev elevation=ansi.fill.elev direction=ansi.asp
 r.fill.dir input=ansi.elev elevation=ansi.fill.elev direction=ansi.asp
 </pre></div>
 </pre></div>
 
 
-<p>will create a depressionless (sinkless) elevation map ansi.fill.elev and a flow
-direction map ansi.asp for the type "grass".
+Will create a depressionless (sinkless) elevation
+map <i>ansi.fill.elev</i> and a flow direction map <i>ansi.asp</i> for the
+type &quot;grass&quot;.
+
+<h2>REFERENCES</h2>
+
+<ul>
+<li>Beasley, D.B. and L.F. Huggins. 1982. ANSWERS (areal nonpoint source watershed environmental response simulation): User's manual. U.S. EPA-905/9-82-001, Chicago, IL, 54 p.
+<li>Jenson, S.K., and J.O. Domingue. 1988. Extracting topographic structure from
+digital elevation model data for geographic information system analysis. Photogram. Engr. and Remote Sens. 54: 1593-1600.
+<li>Young, R.A., C.A. Onstad, D.D. Bosch and W.P. Anderson. 1985. Agricultural nonpoint surface pollution models (AGNPS) I and II model documentation. St. Paul: Minn. Pollution control Agency and Washington D.C., USDA-Agricultural Research
+Service.
+</ul>
 
 
 <h2>SEE ALSO</h2>
 <h2>SEE ALSO</h2>
 
 
 <em>
 <em>
 <a href="r.fillnulls.html">r.fillnulls</a>,
 <a href="r.fillnulls.html">r.fillnulls</a>,
-<a href="r.slope.aspect.html">r.slope.aspect</a></em>
+<a href="r.slope.aspect.html">r.slope.aspect</a>
+</em>
 
 
-<p>Beasley, D.B. and L.F. Huggins. 1982. ANSWERS (areal nonpoint source watershed environmental response simulation): User's manual. U.S. EPA-905/9-82-001, Chicago, IL, 54 p.
-<p>Jenson, S.K., and J.O. Domingue. 1988. Extracting topographic structure from
-digital elevation model data for geographic information system analysis. Photogram. Engr. and Remote Sens. 54: 1593-1600.
-<p>Young, R.A., C.A. Onstad, D.D. Bosch and W.P. Anderson. 1985. Agricultural nonpoint surface pollution models (AGNPS) I and II model documentation. St. Paul: Minn. Pollution control Agency and Washington D.C., USDA-Agricultural Research
-Service.
-<p>
-<h2>AUTHOR</h2>
+<h2>AUTHORS</h2>
 Fortran version:
 Fortran version:
 Raghavan Srinivasan, Agricultural Engineering Department, Purdue
 Raghavan Srinivasan, Agricultural Engineering Department, Purdue
 University<br>
 University<br>
 Rewrite to C with enhancements:
 Rewrite to C with enhancements:
 Roger S. Miller
 Roger S. Miller
 
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

+ 2 - 2
raster/r.fill.dir/resolve.c

@@ -133,7 +133,7 @@ void resolve(int fd, int nl, struct band3 *bnd)
 	pass += 1;
 	pass += 1;
 
 
 	activity = 0;
 	activity = 0;
-	G_message(_("Downward pass %d"), pass);
+	G_verbose_message(_("Downward pass %d"), pass);
 
 
 	lseek(fd, 0, SEEK_SET);
 	lseek(fd, 0, SEEK_SET);
 	advance_band3(fd, bnd);
 	advance_band3(fd, bnd);
@@ -170,7 +170,7 @@ void resolve(int fd, int nl, struct band3 *bnd)
 	}
 	}
 
 
 	activity = 0;
 	activity = 0;
-	G_message(_("Upward pass %d"), pass);
+	G_verbose_message(_("Upward pass %d"), pass);
 
 
 	lseek(fd, (off_t) (nl - 1) * bnd->sz, SEEK_SET);
 	lseek(fd, (off_t) (nl - 1) * bnd->sz, SEEK_SET);
 	retreat_band3(fd, bnd);
 	retreat_band3(fd, bnd);

+ 1 - 1
raster/r.fill.dir/wtrshed.c

@@ -92,7 +92,7 @@ void wtrshed(int fm, int fd, int nl, int ns, int mxbuf)
 
 
     /* complete a downward pass */
     /* complete a downward pass */
     do {
     do {
-	G_message(_("wtrshed pass %d"), ++pass);
+	G_verbose_message(_("Watershed pass %d"), ++pass);
 	repeat = 0;
 	repeat = 0;
 
 
 	/* fill the buffer */
 	/* fill the buffer */