Skip to main content

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!

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.

 


@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 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.


Yes, it works with deaggreate. Thx


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


@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.


@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 


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).


Reply