Skip to main content
Solved

Spatial Filter - disjoint unexpected result

  • September 12, 2024
  • 4 replies
  • 124 views

so_much_more
Supporter
Forum|alt.badge.img+6

I need to find lines which are completely outside polygons

I am using the Spatialfilter with “Filter is OGC-Disjoint From Candidate”. All of them pass and I dont understand why?

Current workflow

 

This is my dummy data i am using. As you can see, the line highlighted with the red box is clearly the only line disjointed from the polygon. 
So why does all candidate pass, it make no sense to me? What form of transformer should i use if what I do is wrong?

 

Its obvious to me that it qualifies os OGC disjoint?
https://docs.safe.com/fme/2023.2/html/FME-Form-Documentation/FME-Transformers/Transformers/spatialrelations.htm

Best answer by bwn

In a reverse Intersect mode, which is what Disjoint virtually is, then you need to test this against All Filter Features, and not just check if it passes against One Filter Feature.  So, probably setting Pass Criteria = All Filters will fix.  Can see from the data that indeed, the lines are disjointed from one of the filter features…...just not all of the features!

 

Personally I find Disjoint trips up too many people, and instead usually just recommend to use Intersects and the Disjointed features (the inverse of Intersects) will be those that come out of the Failed port.  Usually much more consistent!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

s.jager
Influencer
Forum|alt.badge.img+22
  • Influencer
  • September 12, 2024

Do the buildings and the lines have the same coordinate system?


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • September 12, 2024

I would also check to make sure that disjointed line is not part of an aggregation.


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • Best Answer
  • September 12, 2024

In a reverse Intersect mode, which is what Disjoint virtually is, then you need to test this against All Filter Features, and not just check if it passes against One Filter Feature.  So, probably setting Pass Criteria = All Filters will fix.  Can see from the data that indeed, the lines are disjointed from one of the filter features…...just not all of the features!

 

Personally I find Disjoint trips up too many people, and instead usually just recommend to use Intersects and the Disjointed features (the inverse of Intersects) will be those that come out of the Failed port.  Usually much more consistent!


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • September 12, 2024

In a reverse Intersect mode, which is what Disjoint virtually is, then you to test this against All Filter Features, and not just check if it passes against One Filter Feature. 

 

Very good, @bwn - a feature would only ever fail if it intersected every polygon. Well spotted.