I'm Using wiki mapia api to get the geo information. Wiki Mapia
this api returning, location name lat,lng,min lat lng, max lat lng , polygon. Like that i need polygon area. anyone used this api kindly suggest me how to get the area parameter .
I'm Using wiki mapia api to get the geo information. Wiki Mapia
this api returning, location name lat,lng,min lat lng, max lat lng , polygon. Like that i need polygon area. anyone used this api kindly suggest me how to get the area parameter .
Without using the api, and only using the points returned by the api you may apply the following algorithm (specified here in pseudocode):
function polygonArea(X, Y, numPoints)
{
area = 0; // Accumulates area
j = numPoints-1; // The last vertex is the previous one to first
for (i=0; i<numPoints; i++)
{
area = area + (X[j]+X[i]) * (Y[j]-Y[i]);
j = i; //j is previous vertex to i
}
return area/2;
}