/// <summary> /// /// </summary> /// <param name="p"></param> /// <param name="ring"></param> /// <returns></returns> private Locations LocateInPolygonRing(ICoordinate p, ILinearRing ring) { // can this test be folded into IsPointInRing? if (CGAlgorithms.IsOnLine(p, ring.Coordinates)) { return(Locations.Boundary); } if (CGAlgorithms.IsPointInRing(p, ring.Coordinates)) { return(Locations.Interior); } return(Locations.Exterior); }
/// <summary> /// /// </summary> /// <param name="p"></param> /// <param name="l"></param> /// <returns></returns> private Locations Locate(ICoordinate p, ILineString l) { ICoordinate[] pt = l.Coordinates; if (!l.IsClosed) { if (p.Equals(pt[0]) || p.Equals(pt[pt.Length - 1])) { return(Locations.Boundary); } } if (CGAlgorithms.IsOnLine(p, pt)) { return(Locations.Interior); } return(Locations.Exterior); }