public class DuplicateWay extends Test
Modifier and Type | Class and Description |
---|---|
private static class |
DuplicateWay.WayPair
Class to store a way reduced to coordinates and keys.
|
private static class |
DuplicateWay.WayPairNoTags
Class to store a way reduced to coordinates.
|
Test.TagTest
Modifier and Type | Field and Description |
---|---|
protected static int |
DUPLICATE_WAY
Test identification for exactly identical ways (coordinates and tags).
|
private java.util.Set<java.lang.Integer> |
knownHashCodes
Set of known hashcodes for list of coordinates
|
protected static int |
SAME_WAY
Test identification for identical ways (coordinates only).
|
private MultiMap<DuplicateWay.WayPair,OsmPrimitive> |
ways
Bag of all ways
|
private MultiMap<DuplicateWay.WayPairNoTags,OsmPrimitive> |
waysNoTags
Bag of all ways, regardless of tags
|
checkBeforeUpload, checkEnabled, description, enabled, errors, isBeforeUpload, name, partialSelection, progressMonitor, startTime, testBeforeUpload
Constructor and Description |
---|
DuplicateWay()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
endTest()
Notification of the end of the test.
|
Command |
fixError(TestError testError)
Fix the error by removing all but one instance of duplicate ways
|
boolean |
isFixable(TestError testError)
Returns true if the given error can be fixed automatically
|
void |
removeUninterestingKeys(java.util.Map<java.lang.String,java.lang.String> wkeys)
Remove uninteresting discardable keys to normalize the tags
|
void |
startTest(ProgressMonitor monitor)
Start the test using a given progress monitor
|
void |
visit(Way w)
Visiting call for lines.
|
addGui, deletePrimitivesIfNeeded, equals, getErrors, getName, hashCode, initialize, isBuilding, isCanceled, isPrimitiveUsable, ok, setBeforeUpload, setPartialSelection, testBeforeUpload, visit, visit, visit
visit
protected static final int DUPLICATE_WAY
protected static final int SAME_WAY
private MultiMap<DuplicateWay.WayPair,OsmPrimitive> ways
private MultiMap<DuplicateWay.WayPairNoTags,OsmPrimitive> waysNoTags
private java.util.Set<java.lang.Integer> knownHashCodes
public DuplicateWay()
public void startTest(ProgressMonitor monitor)
Test
public void endTest()
Test
If you override this method, don't forget to cleanup progressMonitor
(most overrides call super.endTest()
to do this).
public void removeUninterestingKeys(java.util.Map<java.lang.String,java.lang.String> wkeys)
wkeys
- The tags of the way, obtained by Way#getKeys
public Command fixError(TestError testError)