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);
        }