Class CrossingWays

    • Constructor Detail

      • CrossingWays

        protected CrossingWays​(java.lang.String title,
                               int code)
        Constructs a new CrossingWays test.
        Parameters:
        title - The test title
        code - The test code
        Since:
        12958
    • Method Detail

      • startTest

        public void startTest​(ProgressMonitor monitor)
        Description copied from class: Test
        Start the test using a given progress monitor
        Overrides:
        startTest in class Test
        Parameters:
        monitor - the progress monitor
      • endTest

        public void endTest()
        Description copied from class: Test
        Notification of the end of the test. The tester may perform additional actions and destroy the used structures.

        If you override this method, don't forget to cleanup progressMonitor (most overrides call super.endTest() to do this).

        Overrides:
        endTest in class Test
      • runTest

        protected void runTest()
      • getSegments

        public static java.util.List<java.util.List<WaySegment>> getSegments​(java.util.Map<java.awt.geom.Point2D,​java.util.List<WaySegment>> cellSegments,
                                                                             EastNorth n1,
                                                                             EastNorth n2)
        Returns all the cells this segment crosses. Each cell contains the list of segments already processed
        Parameters:
        cellSegments - map with already collected way segments
        n1 - The first EastNorth
        n2 - The second EastNorth
        Returns:
        A list with all the cells the segment crosses
      • getSegments

        public static java.util.List<java.util.List<WaySegment>> getSegments​(java.util.Map<java.awt.geom.Point2D,​java.util.List<WaySegment>> cellSegments,
                                                                             ILatLon n1,
                                                                             ILatLon n2)
        Returns all the cells this segment crosses. Each cell contains the list of segments already processed
        Parameters:
        cellSegments - map with already collected way segments
        n1 - The first EastNorth
        n2 - The second EastNorth
        Returns:
        A list with all the cells the segment crosses
        Since:
        18553
      • findIntersectingWay

        public static void findIntersectingWay​(Way w,
                                               java.util.Map<java.awt.geom.Point2D,​java.util.List<WaySegment>> cellSegments,
                                               java.util.Map<java.util.List<Way>,​java.util.List<WaySegment>> crossingWays,
                                               boolean findSharedWaySegments)
        Find ways which are crossing without sharing a node.
        Parameters:
        w - way that is to be checked
        cellSegments - map with already collected way segments
        crossingWays - map to collect crossing ways and related segments
        findSharedWaySegments - true: find shared way segments instead of crossings
      • isSelfCrossing

        public static boolean isSelfCrossing​(Way way)
        Check if the given way is self crossing
        Parameters:
        way - the way to check
        Returns:
        true if one or more segments of the way are crossing
        Since:
        17393
        See Also:
        SelfIntersectingWay