[GRASS-SVN] r31523 - in grass/trunk/raster/r.watershed: ram seg
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 26 02:52:09 EDT 2008
Author: hamish
Date: 2008-05-26 02:52:09 -0400 (Mon, 26 May 2008)
New Revision: 31523
Modified:
grass/trunk/raster/r.watershed/ram/close_maps2.c
grass/trunk/raster/r.watershed/seg/close_maps2.c
Log:
tweak comments (merge from dvbr6 with minor clarification)
Modified: grass/trunk/raster/r.watershed/ram/close_maps2.c
===================================================================
--- grass/trunk/raster/r.watershed/ram/close_maps2.c 2008-05-26 06:45:01 UTC (rev 31522)
+++ grass/trunk/raster/r.watershed/ram/close_maps2.c 2008-05-26 06:52:09 UTC (rev 31523)
@@ -46,7 +46,9 @@
flag = 1;
while (flag) {
G_get_color(r,&red,&green,&blue, &colors);
- if((blue*.11 + red*.30 + green*.59) < 100) {
+ /* if existing rule is too dark then append a new
+ rule to override it */
+ if((blue*.11 + red*.30 + green*.59) < 100) {
G_set_color(r, rd, gr, bl, &colors);
flag = 0;
}
@@ -69,7 +71,8 @@
}
G_percent(r-1,max,3); /* finish it */
}
- else G_debug(1, "Too many subbasins to reasonably check neighboring color spread");
+ else G_debug(1, "Too many subbasins to reasonably check for color brightness");
+ /* using the existing stack of while/for/for/for/while loops ... */
}
/* stream segments map */
Modified: grass/trunk/raster/r.watershed/seg/close_maps2.c
===================================================================
--- grass/trunk/raster/r.watershed/seg/close_maps2.c 2008-05-26 06:45:01 UTC (rev 31522)
+++ grass/trunk/raster/r.watershed/seg/close_maps2.c 2008-05-26 06:52:09 UTC (rev 31523)
@@ -38,7 +38,9 @@
flag = 1;
while (flag) {
G_get_color(r,&red,&green,&blue, &colors);
- if((blue*.11 + red*.30 + green*.59) < 100) {
+ /* if existing rule is too dark then append a new
+ rule to override it */
+ if((blue*.11 + red*.30 + green*.59) < 100) {
G_set_color(r, rd, gr, bl, &colors);
flag = 0;
}
@@ -59,7 +61,8 @@
}
G_percent(r-1,max,3); /* finish it */
}
- else G_debug(1, "Too many subbasins to reasonably check neighboring color spread");
+ else G_debug(1, "Too many subbasins to reasonably check for color brightness");
+ /* using the existing stack of while/for/for/for/while loops ... */
}
/* stream segments map */
More information about the grass-commit
mailing list