Esempio n. 1
0
        private static Location LocateOnLineString(Coordinate p, ILineString l)
        {
            // bounding-box check
            if (!l.EnvelopeInternal.Intersects(p))
            {
                return(Location.Exterior);
            }

            var pt = l.Coordinates;

            if (!l.IsClosed)
            {
                if (p.Equals(pt[0]) || p.Equals(pt[pt.Length - 1]))
                {
                    return(Location.Boundary);
                }
            }
            if (PointLocation.IsOnLine(p, pt))
            {
                return(Location.Interior);
            }
            return(Location.Exterior);
        }
Esempio n. 2
0
 public static bool IsOnLine(Coordinate p, Coordinate[] pt)
 {
     return(PointLocation.IsOnLine(p, pt));
 }