Spatial intersect types

147
3
Jump to solution
10-12-2017 04:24 PM
PaulHaakma
Regular Contributor

Hi all

I realise this isn't strictly an AppStudio question, maybe more a Runtime question in general....

When running a query with a spatial relationship, there doesn't appear to be a spatial relationship that returns features that not only intersect, but where the area of intersection is greater than zero.

SpatialRelationshipEnvelopeIntersects  is closest, but it also returns features that 'touch', i.e. they share a common boundary, although nothing actually overlaps.

Currently I have to find this by first running the query using the 'intersects' method, then stepping through the results one by one and checking if the intersection of each feature geometry with the query geometry is actually greater than zero.

So I can achieve it, but I can't help thinking there should be a query type that achieves it in one step.

Any ideas from anyone?

cheers,

-Paul

0 Kudos
1 Solution

Accepted Solutions
KaushikMysorekar
New Contributor III

Hi Paul,

Did you try (SpatialRelationshipEnvelopeIntersects AND  !Enums.SpatialRelationshipDisjoint)?

As per the help, Enums.SpatialRelationshipDisjoint supposed to tell if the intersection is empty or not.

Kaushik

View solution in original post

0 Kudos
3 Replies
KaushikMysorekar
New Contributor III

Hi Paul,

Did you try (SpatialRelationshipEnvelopeIntersects AND  !Enums.SpatialRelationshipDisjoint)?

As per the help, Enums.SpatialRelationshipDisjoint supposed to tell if the intersection is empty or not.

Kaushik

View solution in original post

0 Kudos
PaulHaakma
Regular Contributor

Thanks Kaushik. yes it looks like you're right.

fyi, 'disjoint' doesn't seem to be in old runtime, the equivalent seems to be:

query.spatialRelationship = Enums.SpatialRelationshipEnvelopeIntersects & !Enums.SpatialRelationshipTouches
0 Kudos
PaulHaakma
Regular Contributor

No, take that back. 'touches' doesn't achieve the same as 'disjoint'.

So it appears that using Kaushik's approach is possible in the new Runtime v100.x, but not in the old Runtime.

0 Kudos