Ver código fonte

v.voronoi: improve description and error regarding current region extents

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@71824 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 7 anos atrás
pai
commit
cbec9fd9db
2 arquivos alterados com 7 adições e 5 exclusões
  1. 3 3
      vector/v.voronoi/main.c
  2. 4 2
      vector/v.voronoi/sw_main.c

+ 3 - 3
vector/v.voronoi/main.c

@@ -54,7 +54,7 @@ typedef struct
 
 
 
-int cmp(void *a, void *b)
+int cmp(const void *a, const void *b)
 {
     COOR *ca = (COOR *) a;
     COOR *cb = (COOR *) b;
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
     G_add_keyword(_("geometry"));
     G_add_keyword(_("triangulation"));
     G_add_keyword(_("skeleton"));
-    module->description = _("Creates a Voronoi diagram in current region from "
+    module->description = _("Creates a Voronoi diagram constrained to the extents of the current region from "
 			    "an input vector map containing points or centroids.");
 
     opt.in = G_define_standard_option(G_OPT_V_INPUT);
@@ -279,7 +279,7 @@ int main(int argc, char **argv)
 	ncoor++;
 
 	/* Sort */
-	qsort(coor, ncoor, sizeof(COOR), (void *)cmp);
+	qsort(coor, ncoor, sizeof(COOR), cmp);
 
 	/* add last (first corner) */
 	coor[ncoor].x = Box.W;

+ 4 - 2
vector/v.voronoi/sw_main.c

@@ -185,8 +185,10 @@ int readsites(void)
     if (nsites < 2) {
 	const char *name = Vect_get_full_name(&In);
 	Vect_close(&In);
-	G_fatal_error(n_("Found %d point/centroid in <%s>, but at least 2 are needed",
-                         "Found %d points/centroids in <%s>, but at least 2 are needed",
+	G_fatal_error(n_("Found %d point/centroid in <%s>, but at least 2 are needed. "
+	                 "Are the current region extents covering at least parts of the input map?",
+                         "Found %d points/centroids in <%s>, but at least 2 are needed. "
+			 "Are the current region extents covering at least parts of the input map?",
                          nsites),
 	              nsites, name);
     }