Prechádzať zdrojové kódy

v.clean messages adjusted to cleaning functions

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36496 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 16 rokov pred
rodič
commit
d13c9b1053
3 zmenil súbory, kde vykonal 3 pridanie a 11 odobranie
  1. 0 3
      vector/v.clean/main.c
  2. 1 8
      vector/v.clean/rmdac.c
  3. 2 0
      vector/v.clean/rmline.c

+ 0 - 3
vector/v.clean/main.c

@@ -349,18 +349,15 @@ int main(int argc, char *argv[])
 	    G_message(_("Tool: Remove small areas"));
 	    count =
 		Vect_remove_small_areas(&Out, threshs[i], pErr, &size);
-	    G_message(_("%d areas of total size %g removed"), count, size);
 	    break;
 	case TOOL_RMSA:
 	    G_message(_("Tool: Remove small angles at nodes"));
 	    count =
 		Vect_clean_small_angles_at_nodes(&Out, otype, pErr);
-	    G_message(_("%d modifications done"), count);
 	    break;
 	case TOOL_RMLINE:
 	    G_message(_("Tool: Remove all lines and boundaries of zero length"));
 	    count = remove_zero_line(&Out, otype, pErr);
-	    G_message(_("%d lines / boundaries removed"), count);
 	    break;
 	}
 

+ 1 - 8
vector/v.clean/rmdac.c

@@ -34,8 +34,6 @@ int rmdac(struct Map_info *Out, struct Map_info *Err)
     G_debug(1, "nlines =  %d", nlines);
 
     ndupl = 0;
-    if (G_verbose() > G_verbose_min())
-	fprintf(stderr, _("Duplicate area centroids: %5d"), ndupl);
 
     for (i = 1; i <= nlines; i++) {
 	G_percent(i, nlines, 2);
@@ -53,18 +51,13 @@ int rmdac(struct Map_info *Out, struct Map_info *Err)
 	    Vect_delete_line(Out, i);
 	    ndupl++;
 
-	    if (G_verbose() > G_verbose_min())
-		fprintf(stderr, "\r%s: %5d", _("Duplicate area centroids"),
-			ndupl);
-
 	    if (Err) {
 		Vect_write_line(Err, type, Points, Cats);
 	    }
 	}
     }
 
-    if (G_verbose() > G_verbose_min())
-	fprintf(stderr, "\n");
+    G_verbose_message(_("Duplicate area centroids: %d"), ndupl);
 
     Vect_destroy_line_struct(Points);
     Vect_destroy_cats_struct(Cats);

+ 2 - 0
vector/v.clean/rmline.c

@@ -61,6 +61,8 @@ int remove_zero_line(struct Map_info *Map, int otype, struct Map_info *Err)
     Vect_destroy_line_struct(Points);
     Vect_destroy_cats_struct(Cats);
 
+    G_verbose_message(_("Lines / boundaries removed: %d"), count);
+
     return count;
 
 }