[GRASS-SVN] r45218 - grass/branches/releasebranch_6_4/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 27 08:02:35 EST 2011


Author: mmetz
Date: 2011-01-27 05:02:35 -0800 (Thu, 27 Jan 2011)
New Revision: 45218

Modified:
   grass/branches/releasebranch_6_4/lib/vector/Vlib/buffer2.c
Log:
fix for second bug in #699, remove cpp style (backport from trunk r45216)

Modified: grass/branches/releasebranch_6_4/lib/vector/Vlib/buffer2.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/vector/Vlib/buffer2.c	2011-01-27 13:02:22 UTC (rev 45217)
+++ grass/branches/releasebranch_6_4/lib/vector/Vlib/buffer2.c	2011-01-27 13:02:35 UTC (rev 45218)
@@ -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