Извините за добавление ответа на старый вопрос, но если кто-то ищет быстрый ответ:
private const double EARTH_RADIUS = 6378137;
public class LatLng
{
public double latitude { get; private set; }
public double longitude { get; private set; }
public LatLng(double latitude, double longitude)
{
this.latitude = latitude;
this.longitude = longitude;
}
}
public static double computeArea(List<LatLng> path)
{
return Math.Abs(computeSignedArea(path));
}
private static double computeSignedArea(List<LatLng> path, double radius = EARTH_RADIUS)
{
int size = path.Count;
if (size < 3) { return 0; }
double total = 0;
LatLng prev = path[size - 1];
double prevTanLat = Math.Tan((Math.PI / 2 - toRadians(prev.latitude)) / 2);
double prevLng = toRadians(prev.longitude);
// For each edge, accumulate the signed area of the triangle formed by the North Pole
// and that edge ("polar triangle").
foreach (LatLng point in path)
{
double tanLat = Math.Tan((Math.PI / 2 - toRadians(point.latitude)) / 2);
double lng = toRadians(point.longitude);
total += polarTriangleArea(tanLat, lng, prevTanLat, prevLng);
prevTanLat = tanLat;
prevLng = lng;
}
return total * (radius * radius);
}
private static double polarTriangleArea(double tan1, double lng1, double tan2, double lng2)
{
double deltaLng = lng1 - lng2;
double t = tan1 * tan2;
return 2 * Math.Atan2(t * Math.Sin(deltaLng), 1 + t * Math.Cos(deltaLng));
}
private static double toRadians(double input)
{
return input * Math.PI / 180;
}
Ссылка https://github.com/googlemaps