On Jun 3, 2009, at 4:50 AM, Moritz Lennert wrote:
On 02/06/09 20:50, Dwight Needels wrote:
Hi all,
I have two vectors: Vector A has lines and Vector B has points that
share the same coordinates as a subset of the vertices in the
lines. I would like to delete all of the vertices/nodes in Vector A
that lie directly underneath the points in Vector B (or perhaps lie
within a threshold).
I suspect that v.edit tool=vertexdel can do this, but I cannot
figure out how to pass the coordinates of a set of points from
Vector B to v.edit to be used to select vertices in Vector A for
deletion. Could somebody give me a hand with this (or tell me it is
not possible)?
Feed the output of v.to.db -p option=coor on Vector B into the
coords= parameter of v.edit on Vector A, i.e. something like this:
v.edit A tool=vertexdel coords=`v.to.db -p B option=coor --quiet |
awk -F";" '{printf"%f,%f,",$2,$3} END{printf"\n"}'`
Moritz
Thanks! This worked great with two small changes... using "|" instead
of ";" for the field terminator and specifying layer=2 because the
points were generated by v.to.points, which puts the point data on
layer 2.
-Dwight
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user