[GRASS-user] Extracting non-overlapping lines

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?

I am using William Kyngesburye's 6.4.0RC3 on MacOS 10.5.7.

Thanks,

-Dwight

Hi all,

Does anybody have a suggestion for subtracting the elements in one line vector from another line vector?

-D

On Jul 21, 2009, at 7:06 PM, 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?

I am using William Kyngesburye's 6.4.0RC3 on MacOS 10.5.7.

Thanks,

-Dwight
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Wed, Jul 22, 2009 at 1:06 AM, Dwight Needels<needels@translucida.com> 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?

I am using William Kyngesburye's 6.4.0RC3 on MacOS 10.5.7.

Since GRASS 6.5 there is GEOS support with more functionality available
in v.select, see also
http://lists.osgeo.org/pipermail/grass-user/2009-June/051142.html

This may be a way.

Markus

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