[GRASS-user] v.select: difference between overlap and crosses for atype=areas and btype=lines

Hi,

Could someone explain the difference between overlap and crosses in
v.select for the case where atype is areas and btype is lines ?

Using the same data as ain and bin, I get:

517 areas with overlap
but
3846 areas with crosses

Moritz

On 25/05/18 09:05, Moritz Lennert wrote:

Hi,

Could someone explain the difference between overlap and crosses in
v.select for the case where atype is areas and btype is lines ?

Using the same data as ain and bin, I get:

517 areas with overlap
but
3846 areas with crosses

Additional information:

using 'intersects' I also get 3846 areas.

Now I'm confused.

Any hints ?

Moritz

On Fri, May 25, 2018 at 4:43 PM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 25/05/18 09:05, Moritz Lennert wrote:

Hi,

Could someone explain the difference between overlap and crosses in
v.select for the case where atype is areas and btype is lines ?

Using the same data as ain and bin, I get:

517 areas with overlap
but
3846 areas with crosses

Additional information:

using ‘intersects’ I also get 3846 areas.

Now I’m confused.

Any hints ?

Any information from GEOS/JTS on the expected behaviour?

Markus M

Moritz


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On Fri, May 25, 2018 at 7:45 PM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Fri, May 25, 2018 at 4:43 PM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 25/05/18 09:05, Moritz Lennert wrote:

Hi,

Could someone explain the difference between overlap and crosses in
v.select for the case where atype is areas and btype is lines ?

Using the same data as ain and bin, I get:

517 areas with overlap
but
3846 areas with crosses

Additional information:

using ‘intersects’ I also get 3846 areas.

Now I’m confused.

Any hints ?

Any information from GEOS/JTS on the expected behaviour?

The theory behind these topological relations is explained in
https://en.wikipedia.org/wiki/DE-9IM

maybe that helps.

Markus M

Markus M

Moritz


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

On 26/05/18 21:51, Markus Metz wrote:

On Fri, May 25, 2018 at 7:45 PM, Markus Metz <markus.metz.giswork@gmail.com <mailto:markus.metz.giswork@gmail.com>> wrote:
>
> On Fri, May 25, 2018 at 4:43 PM, Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
> >
> > On 25/05/18 09:05, Moritz Lennert wrote:
> >>
> >> Hi,
> >>
> >> Could someone explain the difference between overlap and crosses in
> >> v.select for the case where atype is areas and btype is lines ?
> >>
> >> Using the same data as ain and bin, I get:
> >>
> >> 517 areas with overlap
> >> but
> >> 3846 areas with crosses
> >
> > Additional information:
> >
> > using 'intersects' I also get 3846 areas.
> >
> > Now I'm confused.
> >
> > Any hints ?
>
> Any information from GEOS/JTS on the expected behaviour?

The theory behind these topological relations is explained in
https://en.wikipedia.org/wiki/DE-9IM >
maybe that helps.

A bit: at least it shows that the GRASS native overlap in v.select does not seem to correspond to the predicate 'overlaps', as this is limited to situations wheren dimension A = dimension B. When I use 'overlaps' instead of 'overlap', the result is "No features found !" as would be expected from the wikipedia page. *

I also briefly looked at the JTS docs, but would have to delve deeper into them, or even into the code, to understand the exact algorithms. No time just now...

I've always understood the native GRASS overlap as equivalent to GEOS' 'intersects' and would expect it to provide similar results.

After some more tests, I do believe there is an issue with the overlap operator. I posted details and data in bug report #3567 [1].

Moritz

[1] https://trac.osgeo.org/grass/ticket/3567

* One could say that this should actually be an immediate output (not after over 30 seconds) when atype=line and btype=area, i.e. that v.select should maybe check if the types are compatible with the operator, before even calling GEOS, but that is another question.