[GRASS-SVN] r45217 - grass/branches/develbranch_6/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 27 08:02:22 EST 2011
Author: mmetz
Date: 2011-01-27 05:02:22 -0800 (Thu, 27 Jan 2011)
New Revision: 45217
Modified:
grass/branches/develbranch_6/lib/vector/Vlib/buffer2.c
Log:
fix for second bug in #699, remove cpp style (backport from trunk r45216)
Modified: grass/branches/develbranch_6/lib/vector/Vlib/buffer2.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/buffer2.c 2011-01-27 13:01:41 UTC (rev 45216)
+++ grass/branches/develbranch_6/lib/vector/Vlib/buffer2.c 2011-01-27 13:02:22 UTC (rev 45217)
@@ -568,7 +568,10 @@
}
}
- // G_debug(4, "ec: opt: side=%d opt_flag=%d opt_angle=%.18f opt_j=%d opt_step=%d", side, opt_flag, opt_angle, opt_j, opt_step);
+ /*
+ G_debug(4, "ec: opt: side=%d opt_flag=%d opt_angle=%.18f opt_j=%d opt_step=%d",
+ side, opt_flag, opt_angle, opt_j, opt_step);
+ */
/* if line end is reached (no other edges at curr vertex) */
if (opt_flag) {
@@ -774,7 +777,7 @@
/* G_debug(4, "sqrt(d)*da = %g, len' = %g, olen = %g", sqrt(d)*da, da*LENGTH(tx,ty), LENGTH((px-nx),(py-ny))); */
if (d <= 1) {
- //G_debug(1, "d=%g", d);
+ /* G_debug(1, "d=%g", d); */
return 1;
}
}
@@ -975,6 +978,12 @@
G_debug(2, "Vect_line_buffer()");
+ Vect_line_prune(Points);
+
+ if (Points->n_points == 1)
+ return Vect_point_buffer2(Points->x[0], Points->y[0], da, db,
+ dalpha, round, tol, oPoints);
+
/* initializations */
tPoints = Vect_new_line_struct();
isles = NULL;
More information about the grass-commit
mailing list