mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-04-22 09:06:38 +00:00
geo fences - wip
This commit is contained in:
@@ -118,4 +118,16 @@ public static class GeoUtils
|
||||
{
|
||||
return p1.DirectionTo(p2).Distance;
|
||||
}
|
||||
|
||||
public static GeoPoint CalculateCenter(GeoPoint northWest, GeoPoint southEast)
|
||||
{
|
||||
var centerLat = (northWest.Lat + southEast.Lat) / 2.0;
|
||||
var centerLon = (northWest.Lon + southEast.Lon) / 2.0;
|
||||
return new GeoPoint(centerLat, centerLon);
|
||||
}
|
||||
|
||||
public static double CalculatePolygonDiagonalDistance(GeoPoint northWest, GeoPoint southEast)
|
||||
{
|
||||
return CalculateDistance(northWest, southEast);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user