2

I have a Polygon object in ArcGIS Android SDK that I'm creating on a map, I would like to calculate that polygon object to square meters.

currently I use

 double area=polygon.calculateArea2D();

But I don't know what that geometry's default unit is to convert from..

Anyone know how I can take that Geometry's area and convert to meters squared?

1 Answer 1

2

MapView.getSpatialReference().getUnit() returns the units of the MapView, which the polygon on the map inherits. You can write a switch statement to handle the conversion to meters from the various units, or perhaps the GeometryEngine.project method will help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.