[GRASS-SVN] r55581 - grass/trunk/vector/v.buffer

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 1 07:13:19 PDT 2013


Author: martinl
Date: 2013-04-01 07:13:18 -0700 (Mon, 01 Apr 2013)
New Revision: 55581

Modified:
   grass/trunk/vector/v.buffer/main.c
Log:
v.buffer: add some debug messages


Modified: grass/trunk/vector/v.buffer/main.c
===================================================================
--- grass/trunk/vector/v.buffer/main.c	2013-04-01 14:06:43 UTC (rev 55580)
+++ grass/trunk/vector/v.buffer/main.c	2013-04-01 14:13:18 UTC (rev 55581)
@@ -384,10 +384,10 @@
     CCats = Vect_new_cats_struct();
     
     /* open tmp vector for buffers, needed for cleaning */
-    if (0 > Vect_open_tmp_new(&Buf, NULL, 0)) {
+    if (0 > Vect_open_tmp_new(&Buf, NULL, WITHOUT_Z)) {
         G_fatal_error(_("Unable to create vector map"));
     }
-    Vect_build_partial(&Buf, GV_BUILD_BASE);
+    Vect_build_partial(&Buf, GV_BUILD_BASE); /* switch to level 2 */
 
     /* check and load attribute column data */
     if (bufcol_opt->answer) {
@@ -829,8 +829,10 @@
 
 		Vect_get_line_areas(&Out, line, &side[0], &side[1]);
 
-		if (!side[0] && !side[1])
+		if (!side[0] && !side[1]) {
+                    G_debug(3, " delete line %d", line);
 		    Vect_delete_line(&Out, line);
+                }
 	    }
 	}
 
@@ -855,7 +857,7 @@
 
 	ret = Vect_get_point_in_area(&Out, area, &x, &y);
 	if (ret < 0) {
-	    G_warning(_("Cannot calculate area centroid"));
+            G_warning(_("Unable to calculate centroid for area %d"), area);
 	    continue;
 	}
 



More information about the grass-commit mailing list