88
2
3 weeks ago
Labels (1)
New Contributor

After noticing some calculated areas using the Area function didn't look correct,  I did some testing. I calculated acreage in three ways with arcade, using the 'Shape_Area/43560' method, The Area function, and the AreaGeodetic function. I also included pre-processed acreage for comparison.

Does anyone why the "Area" function returns a value so far from the others?

I appreciate any insight.  Expressions and screenshot below.

Thank you

Chris

//Acreage (Shape Area/43560) (Pop-up)
\$feature["Shape_Area"]/43560

Area(\$feature, 'acres')

//Acreage (AreaGeodetic Function) (Pop-up)
AreaGeodetic(\$feature, 'acre')

//MHPA Acres (AreaFunction) (Pop-up)

var mhpas = Intersects(FeatureSetByName(\$map,"Multi Habitat Planning Area"), \$feature);
var cnt = Count(mhpas);

var intersectArea = 0;
if (cnt > 0) {
for (var mhpa in mhpas) {
intersectArea += Area(Intersection(\$feature, mhpa),"acres")
}
}

return Round(intersectArea, 2);

//MHPA Acres (AreaGeodetic function) (Pop-up)

var mhpas = Intersects(FeatureSetByName(\$map,"Multi Habitat Planning Area"), \$feature);
var cnt = Count(mhpas);

var intersectArea = 0;
if (cnt > 0) {
for (var mhpa in mhpas) {
intersectArea += AreaGeodetic(Intersection(\$feature, mhpa),"acres")
}
}

return Round(intersectArea, 2);

Tags (3)
2 Replies
MVP Notable Contributor

What is the coordinate system?  If it is Web Mercator, don't use it...it is notorious for poor area and length calculations.

Do all the functions project to a planar coordinate system prior to doing calculations?  If not they may be calculated in native units

... sort of retired...
Esri Esteemed Contributor

If you look at the Arcade help for Area: https://developers.arcgis.com/arcade/function-reference/geometry_functions/#area and AreaGeodetic https://developers.arcgis.com/arcade/function-reference/geometry_functions/#areageodetic you will notice that the AreaGeodetic function is more precise than the Area function.

Returns the geodetic area of the input geometry or FeatureSet in the given units. This is more reliable measurement of area than Area() because it takes into account the Earth's curvature.

I will be better to use the AreaGeodetic function. However, there is another important note in the help:

Be aware that using \$feature as input to this function will yield results only as precise as the view's scale resolution. Therefore values returned from expressions using this function may change after zooming between scales.

Since in your example you mention that you have access to the "Shape_Area", this would be the prefered source of truth. Use Area and AreGeodetic in case you intersect o merge (union) features or when you don't have access to the system maintained area (Shape_Area).