Skip to content

2.23.1.1

Latest
Compare
Choose a tag to compare
@Tronald Tronald released this 19 May 23:59
b04af81

Adds the ability to densify polylines to mitigate geofence spherical distortions over long distances.

nuget: https://www.nuget.org/packages/CoordinateSharp/2.23.1.1

//Create a four point GeoFence around Utah
List<GeoFence.Point> points = new List<GeoFence.Point>();

points.Add(new GeoFence.Point(41.003444, -109.045223));
points.Add(new GeoFence.Point(41.003444, -102.041524));
points.Add(new GeoFence.Point(36.993076, -102.041524));
points.Add(new GeoFence.Point(36.993076, -109.045223));
points.Add(new GeoFence.Point(41.003444, -109.045223));
      
GeoFence gf = new GeoFence(points);

// Densify the geofence to plot a coordinate every 5 kilometers using Vincenty to account for Earth's shape
gf.Densify(new Distance(5, DistanceType.Kilometers));