Field Maps calculate acres of new feature

606
3
08-04-2022 10:19 AM
MacLeanR
New Contributor II

Is it possible to return the area of a new feature in acres to a field as the feature is being created?  I've been trying to accomplish this with:

return round(AreaGeodetic($feature, 'acres'),2)

It doesn't return anything on feature creation or editing of an existing feature.  Thanks for any help!

-Rich

0 Kudos
3 Replies
JohannesLindner
MVP Frequent Contributor

Is your data in the right coordinate system? From AreaGeodetic:

Support is limited to geometries with a Web Mercator (wkid 3857) or a WGS 84 (wkid 4326) spatial reference.

Does it work if you use Area instead?


Have a great day!
Johannes
0 Kudos
MacLeanR
New Contributor II

The data is in WGS 84.  Using Area had the same results.

0 Kudos
RhettZufelt
MVP Frequent Contributor

Interesting.  Tried to test with round(Area($feature, 'acres'),2) and is working, BUT, only if I add the vertices correctly.  If I create a polygon in a counter clockwise direction, the area reports as negative, if I add points in clockwise direction, they are positive units.  ??????

 

R_

0 Kudos