[GRASS-SVN] r69543 - grass-addons/grass7/raster/r.stream.order

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 21 05:29:16 PDT 2016


Author: mmetz
Date: 2016-09-21 05:29:15 -0700 (Wed, 21 Sep 2016)
New Revision: 69543

Modified:
   grass-addons/grass7/raster/r.stream.order/stream_topology.c
Log:
r.stream.order: fix stream length calculation

Modified: grass-addons/grass7/raster/r.stream.order/stream_topology.c
===================================================================
--- grass-addons/grass7/raster/r.stream.order/stream_topology.c	2016-09-21 09:02:49 UTC (rev 69542)
+++ grass-addons/grass7/raster/r.stream.order/stream_topology.c	2016-09-21 12:29:15 UTC (rev 69543)
@@ -147,9 +147,6 @@
 	    next_c = NC(d);
 
 	    if (d < 1 || NOT_IN_REGION(d) || !streams[next_r][next_c]) {
-		cur_length = (window.ns_res + window.ew_res) / 2;
-		SA[cur_stream].accum_length += cur_length;
-		SA[cur_stream].length += cur_length;
 		SA[cur_stream].stright =
 		    G_distance(cur_easting, cur_northing, init_easting,
 			       init_northing);
@@ -377,9 +374,6 @@
 		Segment_get(streams, &next_stream, next_r, next_c);
 
 	    if (d < 1 || NOT_IN_REGION(d) || !next_stream) {
-		cur_length = (window.ns_res + window.ew_res) / 2;
-		SA[cur_stream].accum_length += cur_length;
-		SA[cur_stream].length += cur_length;
 		SA[cur_stream].stright =
 		    G_distance(cur_easting, cur_northing, init_easting,
 			       init_northing);



More information about the grass-commit mailing list