Skip to main content

I have data for various sites and some sites have been digitised more than once and have overlapping polygons. However, these are not virtually identical polygons. They only partially overlap. I want to find the sites that have overlapping polygons. I tried using SpatialRelator with "Intersect", using the same data as both Requestor and Supplier but it picked up instances where one polygon was actually adjacent to another but probably just overlaps a tiny bit. This resulted in 3700 out of 3900 having more than 1 related candidate which doesn't really shortcut the process. "Contains" wouldn't work because not all overlapping polygons are completely contained.

Hi @tim_wood

you might want to try Matcher. In Matching Options please set Lenient Geometry Matching to Yes and low enough vertex tolerances.


Hi @tim_wood,

I have run into this problem before, and my solution was to use the AreaOnAreaOverlayer on the polygons. Use an AreaCalculator on the output, then a Tester to test for _overlaps > 1 and _area greater that your desired minimum area.

If the polygons have shapes that may result in an overlap being split into several pieces by the overlay, you can refine the process. Use a Counter on the input polygons to give them all a unique id, then create a list of the ids in the overlayer, using the Generate List setting. Between the overlayer and the AreaCalculator, sort the list by the id number with a ListSorter, then use a ListConcatenator to create a single attribute from the list. You now have a consistent id for each part of the polygon overlap. Aggregate these, grouping by the id, into a single multi-area before measuring the area and testing the overlaps.


Depending on your requirements, another possibility could be to use a Bufferer (or GeographicBufferer) with a tiny negative buffer size so as to shrink the polygons slightly before using the SpatialFilter. If the polygons still intersect, you know that they intersect over at least buffer size * 2 units, distance-wise (as opposed to overlapping a certain area, as in the solution suggested by @DaveAtSafe).


Depending on your requirements, another possibility could be to use a Bufferer (or GeographicBufferer) with a tiny negative buffer size so as to shrink the polygons slightly before using the SpatialFilter. If the polygons still intersect, you know that they intersect over at least buffer size * 2 units, distance-wise (as opposed to overlapping a certain area, as in the solution suggested by @DaveAtSafe).

Thanks for this suggestion. I tried it, but some polygons are so small, I have to set a buffer of -0.001 to avoid rejected features and that means I still end up with too many results.

 

 


Hi @tim_wood,

I have run into this problem before, and my solution was to use the AreaOnAreaOverlayer on the polygons. Use an AreaCalculator on the output, then a Tester to test for _overlaps > 1 and _area greater that your desired minimum area.

If the polygons have shapes that may result in an overlap being split into several pieces by the overlay, you can refine the process. Use a Counter on the input polygons to give them all a unique id, then create a list of the ids in the overlayer, using the Generate List setting. Between the overlayer and the AreaCalculator, sort the list by the id number with a ListSorter, then use a ListConcatenator to create a single attribute from the list. You now have a consistent id for each part of the polygon overlap. Aggregate these, grouping by the id, into a single multi-area before measuring the area and testing the overlaps.

Thanks. I haven't tried this yet as it's more convoluted than the other suggestions and I need to move on to another part of the work I'm doing. I'll come back to the overlaps issue later.

 

 


Thanks for this suggestion. I tried it, but some polygons are so small, I have to set a buffer of -0.001 to avoid rejected features and that means I still end up with too many results.

 

 

Just remember that the regular Bufferer uses ground units, so if your polygons are in LongLat, then the buffer size is also in degrees.

 

Use the GeographicBufferer to specify the units for the buffer size, if needed.

Hi @tim_wood

you might want to try Matcher. In Matching Options please set Lenient Geometry Matching to Yes and low enough vertex tolerances.

Thanks. I've looked at your sample FMW and tried this but I don't get some of the overlapping polygons I know exist.

 


Just remember that the regular Bufferer uses ground units, so if your polygons are in LongLat, then the buffer size is also in degrees.

 

Use the GeographicBufferer to specify the units for the buffer size, if needed.
Yup. Mine are Ordnance Survey British National Grid so I believe Bufferer is the correct one to use.

 

 


@david_r, @LenaAtSafe, @DaveAtSafe

 

I've attached an example of the data I'm working with. These are different types of ground at the site such as grass, hard surface, etc. The issue is that some sites have been digitised twice, but not in the same way. I've removed all the attributes so I can upload the data, but they are not really relevant to this requirement anyway because the main thing is to identify the sites that need to be manually checked and edited by my client. There are some instances where an overlap is permitted, for example if there is a planter on a hard surface there might be a polygon for the planter on top of the hard surface.

 

example-overlaps.zip

Hi @tim_wood,

I have run into this problem before, and my solution was to use the AreaOnAreaOverlayer on the polygons. Use an AreaCalculator on the output, then a Tester to test for _overlaps > 1 and _area greater that your desired minimum area.

If the polygons have shapes that may result in an overlap being split into several pieces by the overlay, you can refine the process. Use a Counter on the input polygons to give them all a unique id, then create a list of the ids in the overlayer, using the Generate List setting. Between the overlayer and the AreaCalculator, sort the list by the id number with a ListSorter, then use a ListConcatenator to create a single attribute from the list. You now have a consistent id for each part of the polygon overlap. Aggregate these, grouping by the id, into a single multi-area before measuring the area and testing the overlaps.

This is the method I've used in the past for identifying overlaps above a certain area across 2.4 million polygons

 

 

e.g. you could do something like this if you only wanted to identify features that overlap by more than 80% of their area

 

 

calculate-overlap-example.fmwt

 


Thanks. I haven't tried this yet as it's more convoluted than the other suggestions and I need to move on to another part of the work I'm doing. I'll come back to the overlaps issue later.

 

 

Hi @tim_wood,

 

I am attaching an example workspace for you, with both methods implemented. The more complex method could be extended to test for permitted overlaps. If you add the polygon category to the list created by the overlayer, you could test for allowed combinations like planter/hard surface, and remove these form the output.

 

findoverlaps.fmw

 


Hi @tim_wood,

I have run into this problem before, and my solution was to use the AreaOnAreaOverlayer on the polygons. Use an AreaCalculator on the output, then a Tester to test for _overlaps > 1 and _area greater that your desired minimum area.

If the polygons have shapes that may result in an overlap being split into several pieces by the overlay, you can refine the process. Use a Counter on the input polygons to give them all a unique id, then create a list of the ids in the overlayer, using the Generate List setting. Between the overlayer and the AreaCalculator, sort the list by the id number with a ListSorter, then use a ListConcatenator to create a single attribute from the list. You now have a consistent id for each part of the polygon overlap. Aggregate these, grouping by the id, into a single multi-area before measuring the area and testing the overlaps.

Both @egomm and @DaveAtSafe 's FMWs give me the sort of answer I'm looking for: a short list of 300-600 records for manual inspection. I'm not sure which is better, both are pretty similar. I'll likely go with Dave's one just because it produces 600 results which I can aggregate by site to give a workable list of 126 sites to inspect. I'm sure the percentage in egomm's could be tweaked to produce a similar result. Thanks all for your help 🙂

Depending on your requirements, another possibility could be to use a Bufferer (or GeographicBufferer) with a tiny negative buffer size so as to shrink the polygons slightly before using the SpatialFilter. If the polygons still intersect, you know that they intersect over at least buffer size * 2 units, distance-wise (as opposed to overlapping a certain area, as in the solution suggested by @DaveAtSafe).

This was exactly what I needed. Thankyou.


Thanks. I haven't tried this yet as it's more convoluted than the other suggestions and I need to move on to another part of the work I'm doing. I'll come back to the overlaps issue later.

 

 

Hello there, is there any way that I may be able to dowload your file: findoverlaps.fmw? It is because I have the same issue right now. I just got so many tiny polygons by using the spatial relator transformer. Thank you.


Thanks. I haven't tried this yet as it's more convoluted than the other suggestions and I need to move on to another part of the work I'm doing. I'll come back to the overlaps issue later.

 

 

Hello @zacharylee1204​ , I have re-attached Dave's workspace! You should be able to download findoverlaps.fmw now! Kailin.


Thanks. I haven't tried this yet as it's more convoluted than the other suggestions and I need to move on to another part of the work I'm doing. I'll come back to the overlaps issue later.

 

 

thank you so much kallinatsafe! :)


Reply