[GRASS-SVN] r71874 - grass/branches/releasebranch_7_4/vector/v.voronoi

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 29 13:35:25 PST 2017


Author: neteler
Date: 2017-11-29 13:35:25 -0800 (Wed, 29 Nov 2017)
New Revision: 71874

Modified:
   grass/branches/releasebranch_7_4/vector/v.voronoi/main.c
   grass/branches/releasebranch_7_4/vector/v.voronoi/sw_main.c
Log:
v.voronoi: improve description and error regarding current region extents (trunk, r71824)

Modified: grass/branches/releasebranch_7_4/vector/v.voronoi/main.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.voronoi/main.c	2017-11-29 21:20:50 UTC (rev 71873)
+++ grass/branches/releasebranch_7_4/vector/v.voronoi/main.c	2017-11-29 21:35:25 UTC (rev 71874)
@@ -54,7 +54,7 @@
 
 
 
-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 @@
     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 @@
 	ncoor++;
 
 	/* Sort */
-	qsort(coor, ncoor, sizeof(COOR), (void *)cmp);
+	qsort(coor, ncoor, sizeof(COOR), cmp);
 
 	/* add last (first corner) */
 	coor[ncoor].x = Box.W;

Modified: grass/branches/releasebranch_7_4/vector/v.voronoi/sw_main.c
===================================================================
--- grass/branches/releasebranch_7_4/vector/v.voronoi/sw_main.c	2017-11-29 21:20:50 UTC (rev 71873)
+++ grass/branches/releasebranch_7_4/vector/v.voronoi/sw_main.c	2017-11-29 21:35:25 UTC (rev 71874)
@@ -185,8 +185,10 @@
     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);
     }



More information about the grass-commit mailing list