Calculates the circularity of an area feature, which indicates how elongated the feature is. A value of 1 indicates that the feature is a perfect circle, and 0 indicates that it is a line. This will help you find elongated features.
If the calculation geometry used is specified as CONVEX_HULL, then the convex hull of the feature is used for the calculation; otherwise, the geometry of the feature is used.
The value returned is:
(4 * π * area) / (perimeter2)
Keep in mind that long, thin polygons may still have a fairly high circularity value if they curve around in a U-shape.
The attached workspace (See attachment: CircularityCalculatorExample.fmw) calculates the circularity of political boundaries within Canada. The theory is that citizens are better represented when they live in a more circular political riding. That's because they have more equal access to their elected representative, plus the representative has equal access to any area of the riding.
The source data is a set of federal riding boundaries for Canada. It is not included here but can be obtained from Natural Resources Canada's GeoGratis web site.
The workspace to carry out this process is very simple:
Above: The workspace
Area features are read from the Shape dataset and simply routed into the CircularityCalculator transformer.
The custom transformer merely formats and sorts the data so we can write it out to a text file in order of circularity.
The output (as shown in the FME Universal Viewer) looks like this.....
But the important part is the circularity attribute.
Above: The most circular riding is that of Thunder Bay--Superior North (0.93669049) and it shows.
Above: The least circular riding looks like it ought to be Peace River (0.00000132) - but that (and a couple of others) are just caused by bad source data. The least circular is actually Chicoutimi--Le Fjord (0.48365449).
The above was calculated using the convex hull of each feature to calculate circularity. If you use the actual polygon shape then the most and least circular are Langley and Labrador.
Above: Langley (left, 0.74115499) and Labrador (right, 0.12660422). And no, these maps are nowhere near the same scale.
No one has followed this yet.