Exemple #1
0
        private int Locate(Coordinate p, LinearRing ring)
        {
            // can this test be folded into IsPointInRing ?
            if (CGAlgorithms.IsOnLine(p, ring.Coordinates))
            {
                return(LocationType.Boundary);
            }

            if (CGAlgorithms.IsPointInRing(p, ring.Coordinates))
            {
                return(LocationType.Interior);
            }

            return(LocationType.Exterior);
        }
Exemple #2
0
        private int Locate(Coordinate p, LineString l)
        {
            ICoordinateList pt = l.Coordinates;

            if (!l.IsClosed)
            {
                if (p.Equals(pt[0]) || p.Equals(pt[pt.Count - 1]))
                {
                    return(LocationType.Boundary);
                }
            }

            if (CGAlgorithms.IsOnLine(p, pt))
            {
                return(LocationType.Interior);
            }

            return(LocationType.Exterior);
        }