예제 #1
0
 /// <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);
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
        /// <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);
        }
예제 #4
0
        /// <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);
        }
예제 #5
0
 /// <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;
 }