Skip to main content
Solved

Checking if Polygons from Dataset A Overlap with Polygons from Dataset B

  • September 12, 2024
  • 8 replies
  • 411 views

jugoslaviaa
Enthusiast
Forum|alt.badge.img+6

Hi everyone,

I'm trying to check if polygons from Dataset A overlap with polygons from Dataset B in FME. I’ve attempted to use the SpatialFilter, but it only offers options like "intersects" or "touches." However, I specifically need to determine if the polygons are overlapping.

Has anyone encountered this issue or found a way to achieve this in FME? Any suggestions would be appreciated!

Thanks in advance!

Best answer by dustin

Depending on the version of FME you are using, you should be able to change the Support Mode to ‘Support All Predicates’, and the Overlaps option will appear.

 

View original
Did this help you find an answer to your question?

8 replies

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

Depending on the version of FME you are using, you should be able to change the Support Mode to ‘Support All Predicates’, and the Overlaps option will appear.

 


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • September 12, 2024

@dustin Perfect thank you. However I know get INVALID_CANDIDATE_GEOMETRY_TYPE. How can i make that transformer does not stopped by invalid geom and contunies to the next feature? 


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

@dustin Perfect thank you. However I know get INVALID_CANDIDATE_GEOMETRY_TYPE. How can i make that transformer does not stopped by invalid geom and contunies to the next feature? 

It’s possible you have aggregates within the data, which are not supported by the Overlaps predicate. Try using a Deaggregator prior to the SpatialFilter.


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • September 12, 2024

Yes, it works with deaggreate. Thx


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • September 12, 2024

@dustin It catches the minimal overlaps, even the ones I can’t see with my eyes. Is there any way to set a threshold?


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

@jugoslaviaa Not directly in the SpatialFilter. You could use a Snapper with a very small tolerance before the SpatialFilter. I suspect you would need the Segment snapping method, but can't say for certain without seeing the data.

Another transformer to consider is the AreaonAreaOverlayer. You can choose to create a list of overlapping areas, which may be helpful to you.


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • September 12, 2024

@dustin I was thinking of using the AreaOnAreaOverlayer. However, what always confuses me about this tool is that it has only one input port, while I have two different datasets. I dont know how i can run the tool for the polygon from dataset a against polygon from dataset b 


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

It does require some post processing to analyze the results. What I normally do is create a list of an attribute which identifies Dataset A and Dataset B. This can either be the fme_feature_type format attribute, or you can create a ‘dataset identifier’ using a couple AttributeCreators prior to the AreaOnAreaOverlayer.

Once I have the list on the results, I use a ListConcatenator and test if that concatenation contains both ‘dataset identifiers’.

It’s a bit more complicated than a simple SpatialFilter, but I’ve found it is faster comparison when you are dealing with millions of features (which may not be your case).


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings