[GRASS-SVN] r45216 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 27 08:01:41 EST 2011


Author: mmetz
Date: 2011-01-27 05:01:41 -0800 (Thu, 27 Jan 2011)
New Revision: 45216

Modified:
   grass/trunk/lib/vector/Vlib/buffer2.c
Log:
fix for second bug in #699, remove cpp style

Modified: grass/trunk/lib/vector/Vlib/buffer2.c
===================================================================
--- grass/trunk/lib/vector/Vlib/buffer2.c	2011-01-27 10:31:27 UTC (rev 45215)
+++ grass/trunk/lib/vector/Vlib/buffer2.c	2011-01-27 13:01:41 UTC (rev 45216)
@@ -563,7 +563,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) {
@@ -769,7 +772,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;
 	    }
 	}
@@ -969,7 +972,13 @@
     int isles_allocated = 0;
 
     G_debug(2, "Vect_line_buffer()");
+    
+    Vect_line_prune((struct line_pnts *)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