HOW TO
Assessing polygon complexities is crucial for performance optimization in the ArcGIS Enterprise portal and ArcGIS Online. High vertex density in polygons affects map rendering and analytical processes. By identifying complex polygons, geometry can be simplified and analytical workflows adjusted to enhance efficiency.
This article describes the workflow to determine the polygon complexities in the ArcGIS Enterprise portal and ArcGIS Online using Arcade.
var polyFeat = $feature;
var featArea = Area(polyFeat);
var perimeter = Length(polyFeat);
var expectedPerimeter = 2 * 3.1416 * Sqrt(featArea / 3.1416);
var complexity = perimeter / expectedPerimeter;
var complexityCategory = ""; if (complexity < 1.1) { complexityCategory = "Compact"; // More regular shape, close to a circle } else if (complexity >= 1.1 && complexity <= 1.3) { complexityCategory = "Moderately Complex"; // Slightly irregular shape } else { complexityCategory = "Highly Irregular"; // Very complex shape with a higher perimeter }
return complexityCategory;
The code block below shows the example of the full working script:
var polyFeat = $feature; var featArea = Area(polyFeat); var perimeter = Length(polyFeat); var expectedPerimeter = 2 * 3.1416 * Sqrt(area / 3.1416); var complexity = perimeter / expectedPerimeter; var complexityCategory = ""; if (complexity < 1.1) { complexityCategory = "Compact"; // More regular shape, close to a circle } else if (complexity >= 1.1 && complexity <= 1.3) { complexityCategory = "Moderately Complex"; // Slightly irregular shape } else { complexityCategory = "Highly Irregular"; // Very complex shape with a higher perimeter } return complexityCategory;
The polygon complexity categories are added to the Description field in the attribute table as shown below.
Article ID: 000034220
Get help from ArcGIS experts
Download the Esri Support App