Select to view content in your preferred language

Calculate polygon area squared meters

1495
3
10-30-2011 04:56 AM
MauroDegiorgi
Emerging Contributor
Hi all,
I'm new to ArcGis.
I have to add a function for calculate the area, in squared meters, of an irregular geographic surface, to an application.
The application use Google Map.

I'm trying to use AGSGeometryEngine.areaOfGeometry method in this way:

AGSSpatialReference *ref = [AGSSpatialReference wgs84SpatialReference];
AGSMutablePolygon *polygon = [[AGSMutablePolygon alloc] initWithSpatialReference:ref];
[polygon addRingToPolygon];
[polygon addPointToRing: p1];
[polygon addPointToRing: p2];
[polygon addPointToRing: p3];
AGSGeometryEngine *engine = [[AGSGeometryEngine alloc] init];
area = [engine areaOfGeometry:geom];

I think that this code is wrong because the result is in "squared degrees", is true?
What's the best way to get a correct area in squared meters with my points?
I'm testing my application with this points.

P1 = 44.50167,11.34982
P2 = 44.499035,11.34454
P3 = 44.5026,11.348104

Thanks
0 Kudos
3 Replies
DiveshGoyal
Esri Regular Contributor
You will need to project your polygon to an Equal Area Projected Coordinate System, such as Cylindrical Equal Area (WKID : 53034). This coordinate system uses Meters as the unit and will preserve the area of the original geometry.

Thus, you will need to use the Geometry Engine to first project, and then compute area.

PS: I noticed that your polygon is not topologically complete. You need to close the ring by adding P1 vertex also at the end.
0 Kudos
MauroDegiorgi
Emerging Contributor
Thank you very much for your response.
0 Kudos
MauroDegiorgi
Emerging Contributor
Great Divesh!!! Great!! Great!!!

It work!!

thank you very much
0 Kudos