[GRASS-SVN] r49186 - grass/trunk/lib/lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 11 14:29:34 EST 2011


Author: mmetz
Date: 2011-11-11 11:29:34 -0800 (Fri, 11 Nov 2011)
New Revision: 49186

Modified:
   grass/trunk/lib/lidar/zones.c
Log:
lidarlib: fix spline adjustment

Modified: grass/trunk/lib/lidar/zones.c
===================================================================
--- grass/trunk/lib/lidar/zones.c	2011-11-11 18:00:50 UTC (rev 49185)
+++ grass/trunk/lib/lidar/zones.c	2011-11-11 19:29:34 UTC (rev 49186)
@@ -142,7 +142,7 @@
     if (n_windows > 0) {
 	/* min size of the last overlap window = half of current overlap window */
 	/* max size of the last overlap window = elaboration - 3 * edge - overlap */
-	lastsplines_min = ceil((dim->ew_size / 2.0 - 2 * (dim->edge_v + dim->overlap)) / pe);
+	lastsplines_min = ceil((dim->ew_size / 2.0 - (dim->edge_v + dim->overlap)) / pe);
 	lastsplines_max = ceil((dim->ew_size - 3 * dim->edge_v - dim->overlap) / pe);
 	lastsplines = total_splines - edge_splines * n_windows;
 	while (lastsplines > lastsplines_max || lastsplines < lastsplines_min) {
@@ -164,7 +164,7 @@
     if (n_windows > 0) {
 	/* min size of the last overlap window = half of current overlap window */
 	/* max size of the last overlap window = elaboration - 3 * edge - overlap */
-	lastsplines_min = ceil((dim->sn_size / 2.0 - 2 * (dim->edge_h - dim->overlap)) / pn);
+	lastsplines_min = ceil((dim->sn_size / 2.0 - (dim->edge_h + dim->overlap)) / pn);
 	lastsplines_max = ceil((dim->sn_size - 3 * dim->edge_h - dim->overlap) / pn);
 	lastsplines = total_splines - edge_splines * n_windows;
 	while (lastsplines > lastsplines_max || lastsplines < lastsplines_min) {



More information about the grass-commit mailing list