[GRASS-user] Extracting non-overlapping lines

Moritz Lennert mlennert at club.worldonline.be
Mon Jul 27 09:22:02 EDT 2009


On 22/07/09 01:06, Dwight Needels wrote:
> Hi all,
> 
> I have two nearly identical line vectors, and I would like to extract 
> the lines that differ between the two vectors into a third vector. 
> Specifically, I want to isolate the connecting lines that were generated 
> by v.net operation=connect. Something like:
> 
> [map_C = map_A   NOT   map_B]  for line features.
> 
> I thought I would be able to use v.overlay with operator=not, but it it 
> appears to require that btype=area. It also appears that v.select allows 
> only operator=overlap.
> 
> Can someone point me in the right direction?

Unless you can try the new GEOS support Markus suggested, you can also 
try via a raster approach (untested):

v.to.rast A and B
r.mapcalc C=(if(A && isnull(B)), 1, null())
r.to.vect C

You will have to adjust your region settings (g.region) in order to make 
this work.

Moritz


More information about the grass-user mailing list