/// <summary> /// Computes all interior intersections in the collection of <see cref="ISegmentString" />s, /// and returns their <see cref="Coordinate" />s. /// <para/> /// Also adds the intersection nodes to the segments. /// </summary> /// <param name="segStrings"></param> /// <returns>A list of <see cref="Coordinate" />s for the intersections.</returns> private IList <Coordinate> FindInteriorIntersections(IList <ISegmentString> segStrings) { var intAdder = new SnapRoundingIntersectionAdder(_pm); var noder = new MCIndexNoder(); noder.SegmentIntersector = intAdder; noder.ComputeNodes(segStrings); return(intAdder.Intersections); }
/// <summary> /// Detects interior intersections in the collection of {@link SegmentString}s, /// and adds nodes for them to the segment strings. /// Also creates HotPixel nodes for the intersection points. /// </summary> /// <param name="segStrings">The input NodedSegmentStrings</param> private void AddIntersectionPixels(IList<ISegmentString> segStrings) { var intAdder = new SnapRoundingIntersectionAdder(_pm); var noder = new MCIndexNoder(intAdder); //noder.SegmentIntersector = intAdder; noder.ComputeNodes(segStrings); var intPts = intAdder.Intersections; _pixelIndex.AddNodes(intPts); }