public static int InteriorIntersectionCount(Geometry geom)
        {
            var intCounter = NodingIntersectionFinder.CreateInteriorIntersectionCounter(new RobustLineIntersector());

            ProcessNodes(geom, intCounter);
            return(intCounter.Count);
        }
        public static bool IsSegmentNodingValid(Geometry geom)
        {
            var intFinder = NodingIntersectionFinder
                            .CreateInteriorIntersectionCounter(new RobustLineIntersector());

            ProcessNodes(geom, intFinder);
            return(0 == intFinder.Count);
        }
示例#3
0
        public static int InteriorIntersectionCount(Geometry geom)
        {
            var    intCounter = NodingIntersectionFinder.CreateIntersectionCounter(new RobustLineIntersector());
            INoder noder      = new MCIndexNoder(intCounter);

            noder.ComputeNodes(SegmentStringUtil.ExtractNodedSegmentStrings(geom));
            return(intCounter.Count);
        }
        public static Geometry FindInteriorNodes(Geometry geom)
        {
            var intFinder = NodingIntersectionFinder.CreateInteriorIntersectionsFinder(new RobustLineIntersector());

            ProcessNodes(geom, intFinder);
            var intPts = intFinder.Intersections;

            return(FunctionsUtil.GetFactoryOrDefault((Geometry)null)
                   .CreateMultiPointFromCoords(Dedup(intPts)));
        }
        private static void ProcessNodes(Geometry geom, NodingIntersectionFinder intFinder)
        {
            var noder = new MCIndexNoder(intFinder);

            noder.ComputeNodes(SegmentStringUtil.ExtractNodedSegmentStrings(geom));
        }