Class DuplicateWay

    • 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
      • removeUninterestingKeys

        public void removeUninterestingKeys​(java.util.Map<java.lang.String,​java.lang.String> wkeys)
        Remove uninteresting discardable keys to normalize the tags
        Parameters:
        wkeys - The tags of the way, obtained by Way#getKeys
      • getOrderedNodes

        public static java.util.List<LatLongetOrderedNodes​(Way w)
        Replies the ordered list of nodes of way w such as it is easier to find duplicated ways. In case of a closed way, build the list of lat/lon starting from the node with the lowest id to ensure this list will produce the same hashcode as the list obtained from another closed way with the same nodes, in the same order, but that does not start from the same node (fix #8008)
        Parameters:
        w - way
        Returns:
        the ordered list of nodes of way w such as it is easier to find duplicated ways
        Since:
        7721
      • fixError

        public Command fixError​(TestError testError)
        Fix the error by removing all but one instance of duplicate ways
        Overrides:
        fixError in class Test
        Parameters:
        testError - error to fix
        Returns:
        The command to fix the error
      • isFixable

        public boolean isFixable​(TestError testError)
        Description copied from class: Test
        Returns true if the given error can be fixed automatically
        Overrides:
        isFixable in class Test
        Parameters:
        testError - The error to check if can be fixed
        Returns:
        true if the error can be fixed