/// <summary>
        /// Given 2 points defining an arc on the circle, interpolates the circle into a collection of
        /// points that provide connected chords that approximate the arc based on the tolerance value.
        /// The tolerance value specifies the maximum distance between a chord and the circle.
        /// </summary>
        /// <param name="p1"></param>
        /// <param name="p2"></param>
        /// <param name="p3"></param>
        /// <param name="tolerance"></param>
        /// <returns></returns>
        public static System.Collections.Generic.IEnumerable <NetTopologySuite.Geometries.Coordinate> LinearizeCircle(
            NetTopologySuite.Geometries.Coordinate p1, NetTopologySuite.Geometries.Coordinate p2, NetTopologySuite.Geometries.Coordinate p3, double tolerance)
        {
            Circle c = new Circle(p1, p2, p3);

            return(c.LinearizeArc(p1, p2, p1, tolerance));
        }
        private NetTopologySuite.Geometries.Point ConvertToPoint(LocationModel location)
        {
            _ = location ?? throw new ArgumentNullException(nameof(location));


            var geometryFactory = NtsGeometryServices.Instance.CreateGeometryFactory(srid: 4326);
            var coordinates     = new NetTopologySuite.Geometries.Coordinate(location.Longitude, location.Latitude);
            var point           = geometryFactory.CreatePoint(coordinates);

            return(point);
        }
Beispiel #3
0
 internal Point(NTSCoordinate point)
 {
     X = point.X;
     Y = point.Y;
 }