And translated into human readable c# code :-)
Assuming that the first point of the array is the same as the last point of
the array
double area = 0;
for (int i = 0; i < points.Length; i++)
{
int next = i+1;
if (next == points.length)
next = 0;
area = (points[i].x * points[next].y) - (points[next].x *
points[i].y);
}
area = area / 2.0;
Hans...
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/Calculate-the-area-of-a-polygon-tp4514611p4520450.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users