Class OverlappingWays
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.Test
-
- org.openstreetmap.josm.data.validation.tests.OverlappingWays
-
- All Implemented Interfaces:
OsmPrimitiveVisitor
public class OverlappingWays extends Test
Tests if there are overlapping ways.- Since:
- 3669
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.validation.Test
Test.TagTest
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
DUPLICATE_WAY_SEGMENT
protected static java.util.function.Predicate<OsmPrimitive>
IGNORED
protected static ListProperty
IGNORED_KEYS
private boolean
ignoreLayer
private boolean
includeOther
private MultiMap<Pair<Node,Node>,WaySegment>
nodePairs
Bag of all way segmentsprivate boolean
onlyKnownLinear
protected static int
OVERLAPPING_HIGHWAY
protected static int
OVERLAPPING_HIGHWAY_AREA
protected static int
OVERLAPPING_HIGHWAY_LINEAR_WAY
protected static int
OVERLAPPING_RAILWAY
protected static int
OVERLAPPING_RAILWAY_AREA
protected static int
OVERLAPPING_RAILWAY_LINEAR_WAY
protected static int
OVERLAPPING_WATERWAY
protected static int
OVERLAPPING_WATERWAY_AREA
protected static int
OVERLAPPING_WATERWAY_LINEAR_WAY
protected static int
OVERLAPPING_WAY
protected static int
OVERLAPPING_WAY_AREA
-
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 Constructor Description OverlappingWays()
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
analyseOverlaps(java.util.Set<WaySegment> duplicated, java.util.Map<java.util.List<Way>,java.util.Set<WaySegment>> seenWays)
protected static java.util.Set<WaySegment>
checkDuplicateWaySegment(Way w)
void
endTest()
Notification of the end of the test.private static boolean
isOtherLinear(Way way)
private static boolean
parentMultipolygonConcernsArea(OsmPrimitive p)
void
startTest(ProgressMonitor monitor)
Start the test using a given progress monitorvoid
visit(Way w)
Visiting call for lines.-
Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, clear, deletePrimitivesIfNeeded, fixError, getErrors, getName, getSource, initialize, isBuilding, isCanceled, isFixable, isPrimitiveUsable, isResidentialArea, ok, removeIrrelevantErrors, setBeforeUpload, setPartialSelection, setShowElements, testBeforeUpload, visit, visit, visit
-
-
-
-
Field Detail
-
onlyKnownLinear
private boolean onlyKnownLinear
-
includeOther
private boolean includeOther
-
ignoreLayer
private boolean ignoreLayer
-
OVERLAPPING_HIGHWAY
protected static final int OVERLAPPING_HIGHWAY
- See Also:
- Constant Field Values
-
OVERLAPPING_RAILWAY
protected static final int OVERLAPPING_RAILWAY
- See Also:
- Constant Field Values
-
OVERLAPPING_WAY
protected static final int OVERLAPPING_WAY
- See Also:
- Constant Field Values
-
OVERLAPPING_WATERWAY
protected static final int OVERLAPPING_WATERWAY
- See Also:
- Constant Field Values
-
OVERLAPPING_HIGHWAY_AREA
protected static final int OVERLAPPING_HIGHWAY_AREA
- See Also:
- Constant Field Values
-
OVERLAPPING_RAILWAY_AREA
protected static final int OVERLAPPING_RAILWAY_AREA
- See Also:
- Constant Field Values
-
OVERLAPPING_WAY_AREA
protected static final int OVERLAPPING_WAY_AREA
- See Also:
- Constant Field Values
-
OVERLAPPING_WATERWAY_AREA
protected static final int OVERLAPPING_WATERWAY_AREA
- See Also:
- Constant Field Values
-
DUPLICATE_WAY_SEGMENT
protected static final int DUPLICATE_WAY_SEGMENT
- See Also:
- Constant Field Values
-
OVERLAPPING_HIGHWAY_LINEAR_WAY
protected static final int OVERLAPPING_HIGHWAY_LINEAR_WAY
- See Also:
- Constant Field Values
-
OVERLAPPING_RAILWAY_LINEAR_WAY
protected static final int OVERLAPPING_RAILWAY_LINEAR_WAY
- See Also:
- Constant Field Values
-
OVERLAPPING_WATERWAY_LINEAR_WAY
protected static final int OVERLAPPING_WATERWAY_LINEAR_WAY
- See Also:
- Constant Field Values
-
IGNORED_KEYS
protected static final ListProperty IGNORED_KEYS
-
IGNORED
protected static final java.util.function.Predicate<OsmPrimitive> IGNORED
-
-
Constructor Detail
-
OverlappingWays
public OverlappingWays()
Constructor
-
-
Method Detail
-
startTest
public void startTest(ProgressMonitor monitor)
Description copied from class:Test
Start the test using a given progress monitor
-
parentMultipolygonConcernsArea
private static boolean parentMultipolygonConcernsArea(OsmPrimitive p)
-
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 callsuper.endTest()
to do this).
-
analyseOverlaps
private void analyseOverlaps(java.util.Set<WaySegment> duplicated, java.util.Map<java.util.List<Way>,java.util.Set<WaySegment>> seenWays)
-
isOtherLinear
private static boolean isOtherLinear(Way way)
-
checkDuplicateWaySegment
protected static java.util.Set<WaySegment> checkDuplicateWaySegment(Way w)
-
visit
public void visit(Way w)
Description copied from interface:OsmPrimitiveVisitor
Visiting call for lines.- Specified by:
visit
in interfaceOsmPrimitiveVisitor
- Overrides:
visit
in classTest
- Parameters:
w
- The way to inspect.
-
-