[GRASS-dev] [GRASS GIS] #3274: v.net: allow connecting centroids when using option=arcs
GRASS GIS
trac at osgeo.org
Mon Feb 6 06:01:08 PST 2017
#3274: v.net: allow connecting centroids when using option=arcs
-----------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.4.0
Component: Vector | Version: unspecified
Keywords: v.net centroids | CPU: Unspecified
Platform: Unspecified |
-----------------------------+-------------------------
v.net with option arcs allows to connect pairs of points with lines.
However it does not allow connecting centroids. From what I can tell the
following small change would allow this:
{{{
Index: vector/v.net/arcs.c
===================================================================
--- vector/v.net/arcs.c (révision 70027)
+++ vector/v.net/arcs.c (copie de travail)
@@ -80,7 +80,7 @@
list = Vect_new_list();
/* find start node */
- Vect_cidx_find_all(Pnts, field, GV_POINT, cat, list);
+ Vect_cidx_find_all(Pnts, field, (GV_POINT | GV_CENTROID) , cat,
list);
if (list->n_values < 1) {
G_warning(_("No point with category %d found"), cat);
return 0;
}}}
It works for me, but I'm not familiar enough with the module to be sure if
this is without negative consequences.
Any objections to committing this ?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3274>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list