Class DuplicateNode
java.lang.Object
org.openstreetmap.josm.data.validation.Test
org.openstreetmap.josm.data.validation.tests.DuplicateNode
- All Implemented Interfaces:
OsmPrimitiveVisitor
Tests if there are duplicate nodes
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.openstreetmap.josm.data.validation.Test
Test.TagTest -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intThe map of potential duplicates.private static final String[]Fields inherited from class org.openstreetmap.josm.data.validation.Test
checkBeforeUpload, checkEnabled, description, enabled, errors, IN_DOWNLOADED_AREA, IN_DOWNLOADED_AREA_STRICT, isBeforeUpload, name, partialSelection, progressMonitor, stopwatch, testBeforeUpload -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildTestErrors(Test parentTest, List<Node> nodes) Returns the list of "duplicate nodes" errors for the given selection of node and parent testvoidendTest()Notification of the end of the test.Merge the nodes into one.booleanReturns true if the given error can be fixed automaticallyvoidstartTest(ProgressMonitor monitor) Start the test using a given progress monitorvoidVisiting call for points.Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, clear, deletePrimitivesIfNeeded, getErrors, getName, getSource, initialize, isBuilding, isCanceled, isPrimitiveUsable, isResidentialArea, ok, removeIrrelevantErrors, setBeforeUpload, setPartialSelection, setShowElements, testBeforeUpload, visit, visit, visit
-
Field Details
-
DUPLICATE_NODE
- See Also:
-
DUPLICATE_NODE_MIXED
- See Also:
-
DUPLICATE_NODE_OTHER
- See Also:
-
DUPLICATE_NODE_BUILDING
- See Also:
-
DUPLICATE_NODE_BOUNDARY
- See Also:
-
DUPLICATE_NODE_HIGHWAY
- See Also:
-
DUPLICATE_NODE_LANDUSE
- See Also:
-
DUPLICATE_NODE_NATURAL
- See Also:
-
DUPLICATE_NODE_POWER
- See Also:
-
DUPLICATE_NODE_RAILWAY
- See Also:
-
DUPLICATE_NODE_WATERWAY
- See Also:
-
TYPES
-
potentialDuplicates
The map of potential duplicates. If there is exactly one node for a given pos, the map includes a pair <pos, Node>. If there are multiple nodes for a given pos, the map includes a pair <pos, List<Node>>
-
-
Constructor Details
-
DuplicateNode
public DuplicateNode()Constructor
-
-
Method Details
-
startTest
Description copied from class:TestStart the test using a given progress monitor -
endTest
Description copied from class:TestNotification 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 callsuper.endTest()to do this). -
buildTestErrors
Returns the list of "duplicate nodes" errors for the given selection of node and parent test- Parameters:
parentTest- The parent test of returned errorsnodes- The nodes selection to look into- Returns:
- the list of "duplicate nodes" errors
-
visit
Description copied from interface:OsmPrimitiveVisitorVisiting call for points.- Specified by:
visitin interfaceOsmPrimitiveVisitor- Overrides:
visitin classTest- Parameters:
n- The node to inspect.
-
fixError
Merge the nodes into one. Copied from UtilsPlugin.MergePointsAction -
isFixable
Description copied from class:TestReturns true if the given error can be fixed automatically
-