Skip to main content

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

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


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


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!


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.


Reply