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?


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, privacy policy and cookie policy

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