geo fences - wip

This commit is contained in:
Anton Martynenko
2025-11-19 17:26:23 +01:00
parent 5974b0c589
commit d122497b50
22 changed files with 766 additions and 114 deletions
@@ -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);
}
}