[GRASS-user] Deleting vertices based on a list of points

Moritz Lennert mlennert at club.worldonline.be
Wed Jun 3 04:50:53 EDT 2009


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


More information about the grass-user mailing list