[GRASS-SVN] r42081 -
grass/branches/develbranch_6/raster/r.watershed/seg
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 3 06:29:08 EDT 2010
Author: mmetz
Date: 2010-05-03 06:29:08 -0400 (Mon, 03 May 2010)
New Revision: 42081
Modified:
grass/branches/develbranch_6/raster/r.watershed/seg/do_astar.c
Log:
sync segmented mode to ram mode
Modified: grass/branches/develbranch_6/raster/r.watershed/seg/do_astar.c
===================================================================
--- grass/branches/develbranch_6/raster/r.watershed/seg/do_astar.c 2010-05-03 10:28:24 UTC (rev 42080)
+++ grass/branches/develbranch_6/raster/r.watershed/seg/do_astar.c 2010-05-03 10:29:08 UTC (rev 42081)
@@ -57,6 +57,8 @@
seg_get(&astar_pts, (char *)&point, 0, doer);
+ alt_val = heap_pos.ele;
+
/* drop astar_pts[doer] from heap */
drop_pt();
@@ -71,8 +73,6 @@
c = point.c;
bseg_put(&worked, &one, r, c);
- /* cseg_get(&alt, &alt_val, r, c); */
- alt_val = heap_pos.ele;
/* check all neighbours, breadth first search */
for (ct_dir = 0; ct_dir < sides; ct_dir++) {
@@ -97,14 +97,14 @@
if (ct_dir > 3 && slope[ct_dir] > 0) {
if (slope[nbr_ew[ct_dir]] > 0) {
/* slope to ew nbr > slope to center */
- if (slope[ct_dir] <=
+ if (slope[ct_dir] <
get_slope2(alt_nbr[nbr_ew[ct_dir]],
alt_nbr[ct_dir], ew_res))
skip_diag = 1;
}
if (!skip_diag && slope[nbr_ns[ct_dir]] > 0) {
/* slope to ns nbr > slope to center */
- if (slope[ct_dir] <=
+ if (slope[ct_dir] <
get_slope2(alt_nbr[nbr_ns[ct_dir]],
alt_nbr[ct_dir], ns_res))
skip_diag = 1;
More information about the grass-commit
mailing list