git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39993 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -82,7 +82,7 @@ int close_maps(void)
if (min < 0) {
if (min < (-stddev - 1)) {
- clr_min = min;
+ clr_min = min - 1;
clr_max = -stddev - 1;
Rast_add_d_color_rule(&clr_min, 0, 0, 0, &clr_max, 0,
0, 0, &colors);
@@ -127,7 +127,7 @@ int close_maps(void)
if (max > 0 && max > stddev + 1) {
clr_min = stddev + 1;
- clr_max = max;
+ clr_max = max + 1;
Rast_add_d_color_rule(&clr_min, 0, 0, 0, &clr_max, 0, 0,
0, &colors);
}
@@ -110,7 +110,7 @@ int do_astar(void)
/* set flow direction */
asp[index_up] = drain[upr - r + 1][upc - c + 1];
- else if (is_in_list == 1 && is_worked == 0) {
+ else if (is_in_list && is_worked == 0) {
/* neighbour is edge in list, not yet worked */
if (asp[index_up] < 0) {
@@ -29,6 +29,7 @@ int do_cum(void)
dr = r + asp_r[ABS(aspect)];
dc = c + asp_c[ABS(aspect)];
+ /* skip user-defined depressions */
else
dr = dc = -1;
if (dr >= 0 && dr < nrows && dc >= 0 && dc < ncols) { /* if ((dr = astar_pts[killer].downr) > -1) { */
@@ -343,7 +344,7 @@ int do_cum_mfd(void)
/* start new stream */
value = ABS(value) + 0.5;
- if (!is_swale && (int)value >= threshold && stream_cells < 1 &&
+ if (!is_swale && (int)value >= threshold && stream_cells < 3 &&
swale_cells < 1) {
FLAG_SET(swale, r, c);
is_swale = 1;