## Is This Content Helpful?

We're glad to know this article was helpful.

How can we make this better? Please provide as much detail as possible.

Contact our Support Team

What algorithm is used by ArcGIS to determine a polygon's area?

The algorithm used by ArcGIS to calculate area is called the shoelace formula or Gauss's area formula. Esri uses a normalized form of this formula to preserve numeric precision.

The algorithm calculates the area for each ring (part) in a polygon. If the ring is clockwise (outer ring) the area is positive, and if the ring is counterclockwise (inner ring) the value is negative.

A partial sum of a trapezoid's area is used where:

partialSums[0] - Array of double

cPoints - Number of points in the ring

points - Array of point structure, the structure as X and Y as attributes

yOrigin - Double equal to the Y value of the last point (cpoints-1)

cPoints - Number of points in the ring

points - Array of point structure, the structure as X and Y as attributes

yOrigin - Double equal to the Y value of the last point (cpoints-1)

The first trapezoid's area is:

partialSums[0] = (points[1].x - points[cPoints-1].x) * (points[0].y - yOrigin)

For each point starting at index 1:

for j = 1 to j < cPoints-1

partialSums[j] = (points[j+1].x - points[j-1].x) * (points[j].y - yOrigin)

partialSums[j] = (points[j+1].x - points[j-1].x) * (points[j].y - yOrigin)

If the ring contains nonlinear segments, such as Circular Arc, Elliptic Arc, and Bezier Curve, a correction of the area is applied for each trapezoid.

The final area of the ring is:

SUM(PartialSums)/2

The final area of the polygon is:

SUM(Area of each ring)

Here is an example with the following points (one square ring) zz:

X0 = 0 ; Y0 = 0

X1 = 0 ; Y1 = 10

X2 = 10 ; Y2 = 10

X3 = 10 ; Y3 = 0

X4 = 0 ; Y4 = 0

partialSums(0) = (X0 - X4) * (Y0 - Y4) = (0 - 0) * (0 - 0) = 0

partialSums(1) = (X2 - X0) * (Y1 - Y4) = (10 - 0) * (10 - 0) = 100

partialSums(2) = (X3 - X1) * (Y2 - Y4) = (10 - 0) * (10 - 0) = 100

partialSums(3) = (X4 - X2) * (Y3 - Y4) = (0 - 10) * (0 - 0) = 0

There is no correction to apply in this case because only lines are used.

sum (partialSums)/2 = 200/2 = 100

Note:

For ArcObjects developers, area is defined as IArea::Area.

Last Published: 5/5/2016

Article ID: 000006109

Software: ArcGIS for Desktop Advanced 10.1 ArcGIS for Desktop Basic 10.1 ArcGIS for Desktop Standard 10.1 ArcGIS-ArcEditor 9.3.1, 9.3, 9.2, 9.1, 9.0, 8.3, 8.2, 8.1.2, 8.1, 10 ArcGIS-ArcInfo 9.3.1, 9.3, 9.2, 9.1, 9.0, 8.3, 8.2, 8.1.2, 8.1, 10 ArcGIS-ArcView 9.3.1, 9.3, 9.2, 9.1, 9.0, 8.3, 8.2, 8.1.2, 8.1, 10