[GRASS-SVN] r59363 - grass-addons/grass7/raster/r.stream.basins

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 26 07:50:32 PDT 2014


Author: hellik
Date: 2014-03-26 07:50:30 -0700 (Wed, 26 Mar 2014)
New Revision: 59363

Modified:
   grass-addons/grass7/raster/r.stream.basins/basins_fill.c
   grass-addons/grass7/raster/r.stream.basins/basins_inputs.c
   grass-addons/grass7/raster/r.stream.basins/io.c
   grass-addons/grass7/raster/r.stream.basins/io.h
   grass-addons/grass7/raster/r.stream.basins/main.c
   grass-addons/grass7/raster/r.stream.basins/r.stream.basins.html
Log:
cosmetics

Modified: grass-addons/grass7/raster/r.stream.basins/basins_fill.c
===================================================================
--- grass-addons/grass7/raster/r.stream.basins/basins_fill.c	2014-03-26 14:31:42 UTC (rev 59362)
+++ grass-addons/grass7/raster/r.stream.basins/basins_fill.c	2014-03-26 14:50:30 UTC (rev 59363)
@@ -1,6 +1,6 @@
 /* 
    Link: a channel between junction
-   Ooutlet: is final cell of every segment
+   Outlet: is final cell of every segment
    Segment: a channel which order remains unchanged in spite it pass through junction or not
    Number of outlets shall be equal the number of segments
    Number of junction shall be less than number of links
@@ -8,9 +8,9 @@
 
 /*
    find outlets create table of outlets point, with r, c and value. depending of flag:
-   if flag -l is as anly last points of segment is added to table and uses the value is the category as value for whole basins
-   if flag -l = flase (default) last points of every link is added to table and uses the value is the category as value for subbasin
-   In both cases if flag -c is used it add out_num+1 value as value of point. That structure is next used in reset_catchments and fill_catchments fuctions
+   if flag -l is as only last points of segment is added to table and uses the value is the category as value for whole basins
+   if flag -l = false (default) last points of every link is added to table and uses the value is the category as value for subbasin
+   In both cases if flag -c is used it add out_num+1 value as value of point. That structure is next used in reset_catchments and fill_catchments functions
  */
 
 /* fifo functions */
@@ -55,9 +55,9 @@
    if (catchments[NR(i)][NR(i)]>0)
    continue; 
 
-   It is simple trick but allow gives module its real funcionality
+   It is simple trick but allow gives module its real functionality
 
-   Buffer is an correction wchich allow to delinate basins even if vector point 
+   Buffer is an correction which allow to delineate basins even if vector point 
    or coordinates do not lie exactly on stream. In that case a small one pixel buffer
    is created. This is little risk functionality and must be used carefully.
  */
@@ -115,7 +115,7 @@
 		continue;
 	    j = DIAG(i);
 
-	    /* countributing cell, not yet assigned to a basin */
+	    /* contributing cell, not yet assigned to a basin */
 	    if (dirs[next_r][next_c] == j && basins[next_r][next_c] == 0) {
 		basins[next_r][next_c] = val;
 		n_cell.r = next_r;
@@ -158,7 +158,7 @@
 		continue;
 	    j = DIAG(i);
 
-	    /* countributing cell, not yet assigned to a basin */
+	    /* contributing cell, not yet assigned to a basin */
 	    segment_get(basins, &basins_cell, next_r, next_c);
 	    segment_get(dirs, &dirs_cell, next_r, next_c);
 

Modified: grass-addons/grass7/raster/r.stream.basins/basins_inputs.c
===================================================================
--- grass-addons/grass7/raster/r.stream.basins/basins_inputs.c	2014-03-26 14:31:42 UTC (rev 59362)
+++ grass-addons/grass7/raster/r.stream.basins/basins_inputs.c	2014-03-26 14:50:30 UTC (rev 59363)
@@ -12,7 +12,7 @@
     struct Cell_head window;
 
     if (!answers)
-	G_fatal_error(_("At least one pair of coordinates must pe send"));
+	G_fatal_error(_("At least one pair of coordinates must be send"));
 
     G_get_window(&window);
 

Modified: grass-addons/grass7/raster/r.stream.basins/io.c
===================================================================
--- grass-addons/grass7/raster/r.stream.basins/io.c	2014-03-26 14:31:42 UTC (rev 59362)
+++ grass-addons/grass7/raster/r.stream.basins/io.c	2014-03-26 14:50:30 UTC (rev 59363)
@@ -47,10 +47,10 @@
 		 RASTER_MAP_TYPE check_data_type)
 {
     /*
-     * Funciton read external map and put it in MAP structure (created with create_map)
-     * map: map to be read can be of any data type, read map is converted to target map if neccesary.
+     * Function read external map and put it in MAP structure (created with create_map)
+     * map: map to be read can be of any data type, read map is converted to target map if necessary.
      * input_map_name: name of the map to be read;
-     * map pointer to map stucture (created with create_map);
+     * map pointer to map structure (created with create_map);
      * check_res: [1]: check res correspondence between region and map [0 no check];
      * check_data_type [CELL, FCELL, DCELL] check if reading map is of particular type, [-1] no check;
      */
@@ -329,10 +329,10 @@
 {
 
     /*
-     * Funciton read external map and put it in SEG structure (created with seg_create_map)
-     * map to be read can be of any data type, read map is converted if neccesary.
+     * Function read external map and put it in SEG structure (created with seg_create_map)
+     * map to be read can be of any data type, read map is converted if necessary.
      * input_map_name: name of the map to be read;
-     * seg: pointer to map stucture (created with create_map);
+     * seg: pointer to map structure (created with create_map);
      * check_res: [1]: check res correspondence between region and map [0 no check];
      * check_data_type [CELL, FCELL, DCELL] check if reading map is of particular type, [-1] no check;
      */
@@ -359,7 +359,7 @@
     G_get_window(&this_window);
     Rast_get_cellhd(input_map_name, mapset, &cellhd);
 
-    /* check resolution equal anyinteger check;  equal 0 no check */
+    /* check resolution equal any integer check;  equal 0 no check */
     if (check_res)
 	if (this_window.ew_res != cellhd.ew_res ||
 	    this_window.ns_res != cellhd.ns_res)

Modified: grass-addons/grass7/raster/r.stream.basins/io.h
===================================================================
--- grass-addons/grass7/raster/r.stream.basins/io.h	2014-03-26 14:31:42 UTC (rev 59362)
+++ grass-addons/grass7/raster/r.stream.basins/io.h	2014-03-26 14:50:30 UTC (rev 59363)
@@ -22,7 +22,7 @@
 
 typedef struct {
 	void **map; /* matrix of data */
-	double min, max; /* data range : may requre casting */
+	double min, max; /* data range : may require casting */
 	int nrows, ncols;
 	char *map_name; /* map name, unused */
 	RASTER_MAP_TYPE data_type; /* type of data */

Modified: grass-addons/grass7/raster/r.stream.basins/main.c
===================================================================
--- grass-addons/grass7/raster/r.stream.basins/main.c	2014-03-26 14:31:42 UTC (rev 59362)
+++ grass-addons/grass7/raster/r.stream.basins/main.c	2014-03-26 14:50:30 UTC (rev 59363)
@@ -36,7 +36,7 @@
 
     struct Flag *flag_zerofill, *flag_cats, *flag_lasts, *flag_segmentation;
 
-    int b_test = 0;		/* test which option have been choosed: like chmod */
+    int b_test = 0;		/* test which option has been choosed: like chmod */
     int segmentation, zerofill, lasts, cats;
     int i, outlets_num = 0;
     int max_number_of_streams;
@@ -50,11 +50,11 @@
     G_add_keyword(_("hydrology"));
     G_add_keyword("basins creation");
 
-    in_dir_opt = G_define_standard_option(G_OPT_R_INPUT);	/* input directon file */
+    in_dir_opt = G_define_standard_option(G_OPT_R_INPUT);	/* input direction file */
     in_dir_opt->key = "dirs";
     in_dir_opt->description = _("Name of flow direction input map");
 
-    in_coor_opt = G_define_option();	/* input coordinates de outlet */
+    in_coor_opt = G_define_option();	/* input coordinates of outlet */
     in_coor_opt->key = "coors";
     in_coor_opt->type = TYPE_STRING;
     in_coor_opt->key_desc = "x,y";

Modified: grass-addons/grass7/raster/r.stream.basins/r.stream.basins.html
===================================================================
--- grass-addons/grass7/raster/r.stream.basins/r.stream.basins.html	2014-03-26 14:31:42 UTC (rev 59362)
+++ grass-addons/grass7/raster/r.stream.basins/r.stream.basins.html	2014-03-26 14:50:30 UTC (rev 59363)
@@ -22,21 +22,21 @@
 values in places where streams occur. NULL (nodata) cells are ignored, zero and
 negative values are valid direction data if they vary from -8 to 8 (CCW from
 East in steps of 45 degrees). Direction map shall be of type CELL values. Region
-resolution and map resoultion must be the same. 
+resolution and map resolution must be the same. 
 Also <em>stream</em> network map (if used) and direction map must have the same
 resolution. It is checked by default. If resolutions differ the module informs
 about it and stops. Region boundary and maps boundary may be differ but it may
 lead to unexpected results.</dd>
 
 <dt><b>coors</b></dt>
-<dd>East and north coordinates for basin outlet. It can delinate only one basin
-using that option. This option simply copies funcionality of <a
+<dd>East and north coordinates for basin outlet. It can delineate only one basin
+using that option. This option simply copies functionality of <a
 href="r.water.outlet.html">r.water.outlet</a>.
 </dd>
 <dt><b>streams</b></dt>
 <dd>Stream network: name of input stream map on which ordering will be performed
 produced by r.watershed or r.stream.extract. Because streams network produced by
-r.watershed and r.stream.extract may slighty differ in detail it is required to
+r.watershed and r.stream.extract may slightly differ in detail, it is required to
 use both stream and direction map produced by the same module. Stream background
 shall have NULL value or zero value. Background values of NULL are by default
 produced by r.watershed and r.stream.extract. If not 0 or NULL use <a
@@ -54,7 +54,7 @@
 
 <dt><b>points</b></dt>
 <dd>Vector file containing basins outlet as vector points. Only point's
-categories are used to prepare basins. Table attached to it is ignored. Every
+categories are used to prepare basins. Attached table attached is ignored. Every
 point shall have his own unique category. In that mode flags -l and -c are
 ignored
 </dd>
@@ -62,32 +62,32 @@
 
 
 <h2>OUTPUTS</h2>
-<p>The module produces one raster map with basins acording user's rules</p>
+<p>The module produces one raster map with basins according user's rules</p>
 
 
 <h2>DESCRIPTION</h2>
 
-Module r.stream.basins is prepared to delineate basins and subasins with
+Module r.stream.basins is prepared to delineate basins and subbasins with
 different input data. Module is prepared to delineate unrestricted number of
 basins in one step. It can delineate basins with three methods:
 <ul>
-<li>Using coordinates: his option simply copies funcionality of <a
+<li>Using coordinates: this option simply copies functionality of <a
 href="r.water.outlet.html">r.water.outlet</a>.
-<li>Using vector points: it allow to mannually point outlets with any method
+<li>Using vector points: it allow to manually point outlets with any method
 <li>Using streams (most advanced) it allow on lots of modifications. See
 examples for more details.
 </ul>
 Only one method can be used at once. Methods cannot be mixed.
 <p>
-The most recommended method require two maps: direction and streams. In spite of
-in stream map we can store information required to proper delineation, we can
-also enumarate stream categories for which basins are to be created (cats
+The most recommended method requires two maps: direction and streams. In spite of
+stream map we can store information required to proper delineation, we can
+also enumerate stream categories for which basins are to be created (cats
 option). Module is prepared to work with output data of <em>r.watershed,
 r.stream.extract, r.stream.order</em> also with modification done by
-<em>r.recalss</em> and <em>r.mapcalc</em>. r.stream.basin can delineate basins
+<em>r.reclass</em> and <em>r.mapcalc</em>. r.stream.basin can delineate basins
 according outlets marked by raster streams, and polygons, vector points and
 numerical coordinates. If outlets are marked by points or coordinates it
-delineate basins which cells contribute to that points, if outlets are marked by
+delineates basins which cells contribute to that points, if outlets are marked by
 streams it delineate cells which contribute to the last (downstream) cell of the
 every stream. If outlets are marked by polygon it delineate cells contributing
 to most downstream cell of the polygon. If polygon covers more outlets than of
@@ -104,10 +104,10 @@
 Module can work only if direction map, stream map and region map has same
 settings. It is also required that stream map and direction map come from the
 same source. For lots of reason this limitation probably cannot be omitted.  
-this means if stream map comes from r.stream.extract also direction map from
-r.stream.extract must be used. If stream network was generated with MFD method
-also MFD direction map must be used. Nowadays f direction map comes from
-r.stream.extract  must be patched by direction map from r.watershed. (with
+This means, if stream map comes from r.stream.extract, also direction map from
+r.stream.extract must be used. If stream network was generated with MFD method,
+also MFD direction map must be used. Nowadays, if direction map comes from
+r.stream.extract, it must be patched by direction map from r.watershed. (with
 r.patch). 
 
 <h2>EXAMPLES</h2>
@@ -116,7 +116,7 @@
 <p>
 <code>r.stream.basins dir=dirs stream=streams basins=bas_basins_elem</code>
 <p>
-To determine major and minor basins in area, definied by outlets, ignoring
+To determine major and minor basins in area, defined by outlets, ignoring
 subbasins use  - l flag. That flag ignores all nodes and uses only real outlets
 (in most cases that on map border):
 <p>
@@ -142,7 +142,7 @@
 
 <p>
 The usage of polygons as outlets markers is very useful when exact stream course
-cannot be cleary determined before running analysis, but the area of its
+cannot be clearly determined before running analysis, but the area of its
 occurrence can be determined (mostly in iterative simulations) Example uses
 r.circle but can be substituted by any polygon created for example  with
 v.digit:



More information about the grass-commit mailing list