/// <summary> /// Computes the noding for a collection of <see cref="SegmentString" />s. /// Some Noders may add all these nodes to the input <see cref="SegmentString" />s; /// others may only add some or none at all. /// </summary> /// <param name="inputSegmentStrings"></param> public void ComputeNodes(IList inputSegmentStrings) { _nodedSegStrings = inputSegmentStrings; _noder = new McIndexNoder(); _pointSnapper = new McIndexPointSnapper(_noder.Index); SnapRound(inputSegmentStrings, _li); }
/// <summary> /// Computes all interior intersections in the collection of <see cref="SegmentString" />s, /// and returns their <see cref="Coordinate" />s. /// Does NOT node the segStrings. /// </summary> /// <param name="segStrings"></param> /// <param name="li"></param> /// <returns>A list of <see cref="Coordinate" />s for the intersections.</returns> private static IList FindInteriorIntersections(IList segStrings, LineIntersector li) { IntersectionFinderAdder intFinderAdder = new IntersectionFinderAdder(li); SinglePassNoder noder = new McIndexNoder(intFinderAdder); noder.ComputeNodes(segStrings); return(intFinderAdder.InteriorIntersections); }
/// <summary> /// /// </summary> /// <param name="precisionModel"></param> /// <returns></returns> private static INoder GetNoder(PrecisionModel precisionModel) { // otherwise use a fast (but non-robust) noder LineIntersector li = new RobustLineIntersector(); li.PrecisionModel = precisionModel; McIndexNoder noder = new McIndexNoder(new IntersectionAdder(li)); return(noder); }
/// <summary> /// Computes all interior intersections in the collection of <see cref="SegmentString" />s, /// and returns their <see cref="Coordinate" />s. /// Does NOT node the segStrings. /// </summary> /// <param name="segStrings"></param> /// <param name="li"></param> /// <returns>A list of <see cref="Coordinate" />s for the intersections.</returns> private static IList FindInteriorIntersections(IList segStrings, LineIntersector li) { IntersectionFinderAdder intFinderAdder = new IntersectionFinderAdder(li); SinglePassNoder noder = new McIndexNoder(intFinderAdder); noder.ComputeNodes(segStrings); return intFinderAdder.InteriorIntersections; }