/// <summary> /// Converts a geofence to a list of points that makes a circle-shaped of nrOfPoints + 1 points /// </summary> /// <returns>A circle of radius around center using nrOfPoints points</returns> public static IList <GeoCoordinate> GetCirclePoints(this GeoCoordinate center, double radius, int nrOfPoints = 50) { var angle = 360.0 / nrOfPoints; var locations = new List <GeoCoordinate>(); for (var i = 0; i <= nrOfPoints; i++) { locations.Add(center.GetAtDistanceBearing(radius, angle * i)); } return(locations); }