[GRASS-SVN] r71824 - grass/trunk/vector/v.voronoi
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 25 12:45:16 PST 2017
Author: mmetz
Date: 2017-11-25 12:45:16 -0800 (Sat, 25 Nov 2017)
New Revision: 71824
Modified:
grass/trunk/vector/v.voronoi/main.c
grass/trunk/vector/v.voronoi/sw_main.c
Log:
v.voronoi: improve description and error regarding current region extents
Modified: grass/trunk/vector/v.voronoi/main.c
===================================================================
--- grass/trunk/vector/v.voronoi/main.c 2017-11-25 14:48:13 UTC (rev 71823)
+++ grass/trunk/vector/v.voronoi/main.c 2017-11-25 20:45:16 UTC (rev 71824)
@@ -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/trunk/vector/v.voronoi/sw_main.c
===================================================================
--- grass/trunk/vector/v.voronoi/sw_main.c 2017-11-25 14:48:13 UTC (rev 71823)
+++ grass/trunk/vector/v.voronoi/sw_main.c 2017-11-25 20:45:16 UTC (rev 71824)
@@ -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