/// <summary> /// Find a point from the list of testCoords /// that is NOT a node in the edge for the list of searchCoords /// </summary> /// <param name="testCoords"></param> /// <param name="searchRing"></param> /// <param name="graph"></param> /// <returns>return the point found, or null if none found</returns> public static Coordinate FindPtNotNode( Coordinates testCoords, LinearRing searchRing, GeometryGraph graph) { // find edge corresponding to searchRing. Edge searchEdge = graph.FindEdge(searchRing ); // find a point in the testCoords which is not a node of the searchRing EdgeIntersectionList eiList = searchEdge.EdgeIntersectionList; // somewhat inefficient - is there a better way? (Use a node map, for instance?) for (int i = 0 ; i < testCoords.Count; i++) { Coordinate pt = testCoords[i]; if (! eiList.IsIntersection(pt)) { return pt; } } return null; }