[GRASS-SVN] r55270 - grass/trunk/vector/v.clean

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 28 11:00:55 PST 2013


Author: mmetz
Date: 2013-02-28 11:00:55 -0800 (Thu, 28 Feb 2013)
New Revision: 55270

Modified:
   grass/trunk/vector/v.clean/main.c
   grass/trunk/vector/v.clean/split.c
Log:
v.clean cosmetics

Modified: grass/trunk/vector/v.clean/main.c
===================================================================
--- grass/trunk/vector/v.clean/main.c	2013-02-28 18:57:45 UTC (rev 55269)
+++ grass/trunk/vector/v.clean/main.c	2013-02-28 19:00:55 UTC (rev 55270)
@@ -219,47 +219,47 @@
     for (i = 0; i < ntools; i++) {
 	switch (tools[i]) {
 	case (TOOL_BREAK):
-	    G_message("%s: %13e", _("Break"), threshs[i]);
+	    G_message("%s: %.15g", _("Break"), threshs[i]);
 	    break;
 	case (TOOL_RMDUPL):
-	    G_message("%s: %13e", _("Remove duplicates"), threshs[i]);
+	    G_message("%s: %.15g", _("Remove duplicates"), threshs[i]);
 	    break;
 	case (TOOL_RMDANGLE):
-	    G_message("%s: %13e", _("Remove dangles"), threshs[i]);
+	    G_message("%s: %.15g", _("Remove dangles"), threshs[i]);
 	    break;
 	case (TOOL_CHDANGLE):
-	    G_message("%s: %13e", _("Change type of boundary dangles"),
+	    G_message("%s: %.15g", _("Change type of boundary dangles"),
 		      threshs[i]);
 	    break;
 	case (TOOL_RMBRIDGE):
-	    G_message("%s: %13e", _("Remove bridges"), threshs[i]);
+	    G_message("%s: %.15g", _("Remove bridges"), threshs[i]);
 	    break;
 	case (TOOL_CHBRIDGE):
-	    G_message("%s: %13e", _("Change type of boundary bridges"),
+	    G_message("%s: %.15g", _("Change type of boundary bridges"),
 		      threshs[i]);
 	    break;
 	case (TOOL_SNAP):
-	    G_message("%s: %13e", _("Snap vertices"), threshs[i]);
+	    G_message("%s: %.15g", _("Snap vertices"), threshs[i]);
 	    break;
 	case (TOOL_RMDAC):
-	    G_message("%s: %13e", _("Remove duplicate area centroids"),
+	    G_message("%s: %.15g", _("Remove duplicate area centroids"),
 		      threshs[i]);
 	    break;
 	case (TOOL_BPOL):
-	    G_message("%s: %13e", _("Break polygons"), threshs[i]);
+	    G_message("%s: %.15g", _("Break polygons"), threshs[i]);
 	    break;
 	case (TOOL_PRUNE):
-	    G_message("%s: %13e", _("Prune"), threshs[i]);
+	    G_message("%s: %.15g", _("Prune"), threshs[i]);
 	    break;
 	case (TOOL_RMAREA):
-	    G_message("%s: %13e", _("Remove small areas"), threshs[i]);
+	    G_message("%s: %.15g", _("Remove small areas"), threshs[i]);
 	    break;
 	case (TOOL_RMSA):
-	    G_message("%s: %13e", _("Remove small angles at nodes"),
+	    G_message("%s: %.15g", _("Remove small angles at nodes"),
 		      threshs[i]);
 	    break;
 	case (TOOL_RMLINE):
-	    G_message("%s: %13e",
+	    G_message("%s: %.15g",
 		      _("Remove all lines or boundaries of zero length"),
 		      threshs[i]);
 	    break;

Modified: grass/trunk/vector/v.clean/split.c
===================================================================
--- grass/trunk/vector/v.clean/split.c	2013-02-28 18:57:45 UTC (rev 55269)
+++ grass/trunk/vector/v.clean/split.c	2013-02-28 19:00:55 UTC (rev 55270)
@@ -49,8 +49,9 @@
     area_size = sqrt((box.E - box.W) * (box.N - box.S));
 
     split_distance = area_size / log(n_split_lines);
-    /* divisor is the handle: increase divisor to decrease split_distance */
-    split_distance = split_distance / 10.;
+    /* divisor is the handle: increase divisor to decrease split_distance
+     * see also v.in.ogr */
+    split_distance = split_distance / 16.;
     G_debug(1, "area size: %f", area_size);
     G_debug(1, "split distance: %f", split_distance);
 
@@ -102,7 +103,7 @@
 
     /* can't split boundaries with only 2 vertices */
     if (Points->n_points == 2) {
-	Vect_write_line(Map, otype, Points, Cats);
+	/* Vect_write_line(Map, otype, Points, Cats); */
 	return 0;
     }
 



More information about the grass-commit mailing list