Data QA Identifying Sliver Overlaps and Gaps in Polygon Coverage

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

Overlaps and gaps are problems that occur with invalid polygon coverages. A polygon coverage should be a single, continuous surface. However, this is not always the case.

An overlap occurs where two or more polygons intersect each other, creating an area covered by multiple polygons. For example, here the red feature extends over the orange feature:

A gap occurs when two or more polygons fail to meet along their boundary, creating a hole in the coverage. For example, here the red and green features fail to meet, creating a white gap in the coverage:

In general, these overlaps and gaps are very small. If they were larger, they would be easily detected without special data validation techniques. This common shape and size is why they are sometimes called "sliver."

Overlaps can be located using the Small Polygon method, but it will not identify gaps, and neither issue can be fixed with the same method. To handle both slivers and gaps, FME has a transformer called the AreaGapAndOverlapCleaner.

The dataset for this example is a set of polygon features (in a MapInfo TAB dataset) representing planning zones in the city of Vancouver.

The dataset looks like this in Data Preview:

Logically, a piece of land cannot fall into two zones (the zones should not overlap), but equally, a piece of land cannot be unzoned (there should not be any gaps in the zoning coverage). The scenario here is to locate, count, and fix any overlaps or gaps in the coverage.

The template workspace and source data can be downloaded from the files section.

Step-by-Step Instructions

Part 1: Locating Overlaps and Gaps

The AreaGapAndOverlapCleaner transformer, although designed for handling gaps and overlaps, will only fix them — it will not highlight or locate them for review elsewhere. To locate such features, this section uses the AreaOnAreaOverlayer transformer, in combination with the Dissolver and DonutHoleExtractor transformers.

Follow these steps to identify overlaps and gaps.

1. Open FME Workbench and Start a New Workspace

Open FME Workbench and start a new workspace. On the top menu, click Add Reader. In the Add Reader dialog:

Click OK to add the reader.

2. Create a Single Surface

To locate gaps and overlaps, first create a single surface that covers the area of interest, then compare it against the source data using an AreaOnAreaOverlayer transformer. Add a Dissolver transformer and connect it to the Zones data. This creates a single surface feature. 

The surface produced by the Dissolver transformer may be a donut feature, which is not needed for this workflow. Add a DonutHoleExtractor transformer and connect the Dissolver Area output port to it. The default parameters are correct for this exercise.

3. Add an AreaOnAreaOverlayer Transformer

Add an AreaOnAreaOverlayer transformer. Connect both the DonutHoleExtractor Outershell port and the Zones data to its input port.

The default parameters are correct for this exercise.

4. Enable Feature Caching and Review the Results in Visual Preview

Enable Feature Caching on the AreaOnAreaOverlayer Area output port. Run the workspace. Once the run is complete, click the green cache icon on the feature type to open the data cache in Data Preview. 

Where the number of overlaps is equal to 1, these are gaps, because the surface created by the Dissolver transformer is not overlapped by the Zones data.

Where the number of overlaps is greater than 2, these are overlaps, because the surface created by the Dissolver transformer overlaps at least two other polygons in the Zones data.

Only where the number of overlaps equals 2 is the data correct.

To confirm the issues, add the original source Zones data as a backdrop and zoom into one of the problem features. For this example, we are using a feature with a value of 1:

The green line here is a gap between two polygons. It is only 0.0022 meters (2 mm, or 1/12th of an inch), so you will need to zoom in very close to see it.

At this point, very small and very narrow polygons representing gaps and overlaps in the polygon coverage have been isolated.

Part 2: Counting Overlaps and Gaps

Counting the number of bad features is simple, because they have already been filtered out. A count can be created using the StatisticsCalculator transformer.

Follow these steps to count overlap and gap features.

5. Add a StatisticsCalculator Transformer

Add a StatisticsCalculator transformer between the AreaOnAreaOverlayer transformer and the Inspector transformer. Open the StatisticsCalculator parameters and set:

  • Group Processing: Enabled
    • Group By: _overlaps
  • Statistics to Calculate:
    • Attribute: _overlaps
    • Total Count: Enabled

6. Review the Summary Preview

Click on the green cache icon on the Summary output of the StatisticsCalculator. The output will now show a count of features for each overlap number, indicating how many features fall into each category:

In this example, there are 6 gaps, 6 overlaps, and 430 correct features.

Only a single cached feature will appear per group on the StatisticsCalculator Summary output port. To view all output features, enable Feature Caching on the Complete port instead. 

Part 3: Fixing Overlaps and Gaps

Fixing overlaps and gaps is simple with the AreaGapAndOverlapCleaner transformer. To confirm that it worked, the location process above can simply be repeated.

Follow these steps to fix overlaps and gaps using the AreaGapAndOverlapCleaner transformer.

7. Add a GeometryValidator Transformer

The AreaGapAndOverlapCleaner transformer requires clean, valid data — self-intersecting or degenerate polygons will not be repaired. To first clean the data of these issues, add a GeometryValidator transformer and connect it to a new output from the Zones feature type.
 

Open the GeometryValidator parameters and set:

  • Issues to Detect
    • Degenerate or Corrupt Geometries
    • Self-Intersection in 2D
  • Attempt Repair: Yes

Leave the remaining parameters as default.

Optionally, add a GeometryFilter transformer after the GeometryValidator transformer to remove any line features from the data, since the AreaGapAndOverlapCleaner transformer does not accept line features. 

8. Add an AreaGapAndOverlapCleaner Transformer

Add an AreaGapAndOverlapCleaner transformer and connect it to the Passed and Repaired ports on the GeometryValidator transformer.

Open the AreaGapAndOverlapCleaner parameters.

  • Tolerance: Automatic
  • Outside Tolerance Parameters:
    • Repair Method: Longest Boundary

9. Enable Feature Caching on the Repaired Port and Run the Translation

Enable Feature Caching on the repaired port of AreaGapAndOverlapCleaner and run the translation. The output will be the polygons with all gaps and overlaps repaired to create a single, continuous surface. This will be difficult to confirm without close inspection of the data, so the prior verification process should be recreated. 

10. Duplicate and Reconnect the Verification Transformers

Select the existing Dissolver, DonutHoleExtractor, and AreaOnAreaOverlayer transformers, then press Ctrl+D to create duplicate copies. Connect these duplicates to the AreaGapAndOverlapCleaner transformer in the same configuration as before — one output goes to the Dissolver transformer, and another goes to the AreaOnAreaOverlayer transformer.

11. Enable Feature Caching to Confirm the Repair

Enable Feature Caching on the new AreaOnAreaOverlayer output port and run the translation. Open Data Preview to confirm that there are no overlapping features and no gaps. The overlaps and gaps should have been distributed to other features depending on the method chosen in the AreaGapAndOverlapCleaner transformer.

The AreaOnAreaOverlayer transformer renders attributes invalid, since all output uses attributes from a single feature. 

For this reason, use only the AreaGapAndOverlapCleaner-repaired output for further work. Never use the AreaOnAreaOverlayer output except for verification of the polygon coverage.

Additional Resources

Small Polygon method [Article]

Data Attribution

The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.