Circularity Calculations with the CircularityCalculator

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2020.0

Circularity Calculations

The circularity of an area feature indicates how compact or elongated the feature is. A value of 1 indicates that the feature is a perfect circle (compact), and 0 indicates that it is a line (elongated).

In FME circularity is measured with the CircularityCalculator transformer using the formula:

(4 * ? * area) / (perimeter2)

In this tutorial we will use this transformer to calculate the circularity of polygons representing political boundaries. The theory is that citizens are better represented when they live in a political riding that is more compact than elongated. That's because they have more equal access to their elected representative, plus the representative has equal access to any area of the riding.

Source Data

The source data for these examples is a vector polygon dataset in GML (geography markup language) format. In the FME Data Inspector it looks like this:


Step-By-Step Instructions

1. Start FME Workbench and begin with an empty canvas. Select Readers > Add Reader from the menubar.

Set the data format to GML (Geography Markup Lanaguage). Select the attached data as the source dataset. When prompted select only the VotingDivisions layer, not the VotingPlaces layer.

2. Add a CircularityCalculator transformer to the workspace and connect it to the reader feature type:


Open the parameters dialog and change the Calculation Geometry from Convex Hull to Feature Boundary. By doing this the circularity of the actual feature shape is being calculated.

3. Now let's add a step to the workspace to filter polygons that are more elongated than circular.

Add a Tester transformer connected to the CircularityCalculator:Output port.

Open the parameters dialog and set up a test for where _circularity is equal to or greater than 0.5:


4. Attach an Inspector transformer to each of the Tester output ports and run the workspace.

Twelve (12) features will fail the test as being more elongated than circular. You can pass these results on to the elections officer to consider adjusting the boundaries.



Source Dataset

Completed Workspace as a Template

Was this article helpful?



Please sign in to leave a comment.