Fighting sliver polygons in ArcGIS: thinness ratio

For anyone who has ever worked with a polygon feature class representing some geographical features such as postal codes, water bodies, or landuse zones, it is common to use some generalization workflows simplifying, merging, or splitting features. Depending on the data source and the operations involved, some irregularly shaped geometries might be introduced due to those operations.

The most common core geoprocessing tools to run to inspect geometry of features are:
Check Geometry which will run some basic checks on the geometry to find any potential errors that could cause unexpected behavior when drawing or analyzing the dataset;
Repair Geometry which will repair the geometry of inspected features in case there are some issues.

One of the notoriously famous type of polygons is sliver polygons which is defined by Esri GIS dictionary as

“A small, narrow, polygon feature that appears along the borders of polygons following the overlay of two or more geographic datasets. Sliver polygons may indicate topology problems with the source polygon features, or they may be a legitimate result of the overlay.”

Those are naughty and really hard to find features which are hard to identify just by visual inspection. If you google on “sliver polygons arcgis” you will see that there are many users forced to deal with them. There is a good Help page from Esri here too.

In case you need to process the polygon feature class just once and get this rather quickly, the fastest way would be perhaps to use the Integrate GP tool that works really well on making polygon edges and vertices coincident. However, keep in mind that this tool doesn’t create an output; it modifies the input data and you want to create a copy of your dataset first. Be careful though since when using an inappropriate cluster tolerance you can collapse, merge, or drastically modify the geometry of your features.

Using topology with the Must Not Overlap and Must Not Have Gaps rules will let you find polygons that may either overlap each other or have some tiny gaps between them. Another alternative is to take a look at Must Be Larger Than Cluster Tolerance type of error; this can help you list the polygons that are so small that they will collapse during the process of validating the topology.

In case you’ve started worrying about having any sliver polygons and just want to find out whether you have any, I recommend taking a look at the ArcGIS Data Reviewer extension check. I’ve started using it recently because I became involved in massive data maintenance project and I just love it. Almost all automated data checks I’ve written in Python can be accomplished with Data Reviewer (even in batch mode with ArcPy functions).

The check you need to use is Polygon Sliver Check. This check will basically calculate a thinness ratio (a simple shape factor) for your polygons and highlight those with outstanding values. Those of you who don’t have access to the Data Reviewer extension at the moment (or if you are on ArcGIS Desktop Basic and don’t have access to the topology), can actually emulate this check manually. You have to add a new float field to your feature class and calculate the thinness index in this field for each feature.

Today I have accidentally found a really good book, Microscope Image Processing (written by AvQiang Wu,Fatima Merchant,Kenneth Castleman). Excerpt:

Thinness is typically used to define the regularity of an object. Having computed the area (A) and perimeter (P) of an object, we can define the thinness ratio as T = 4pi(A/P2)
This measure takes a maximum value of 1 for a circle. Objects of regular shape have a higher thinness ratio than similar irregular ones.

So, you can calculate your new field in Field Calculator to be:
4 * 3.14 * [Shape_Area] / ([Shape_Length] * [Shape_Length])

Most sliver polygons would have the ratio really close to 0, but from what I’ve seen whatever that is lower than 0.3 might be a good candidate, too. However, consider the features areas first before running into any hasty conclusions. Large and/or multipart features with irregular shape might have a really low thinness ratio yet they are not even close to be sliver polygons. You would probably want to set a definition query on your feature class excluding most of the polygons with large area.

Good luck fighting with sliver polygons and May the Force be with you ©!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s