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 intDUPLICATE_WAY_SEGMENTprotected static java.util.function.Predicate<OsmPrimitive>IGNOREDprotected static ListPropertyIGNORED_KEYSprivate booleanignoreLayerprivate booleanincludeOtherprivate MultiMap<Pair<Node,Node>,WaySegment>nodePairsBag of all way segmentsprivate booleanonlyKnownLinearprotected static intOVERLAPPING_HIGHWAYprotected static intOVERLAPPING_HIGHWAY_AREAprotected static intOVERLAPPING_HIGHWAY_LINEAR_WAYprotected static intOVERLAPPING_RAILWAYprotected static intOVERLAPPING_RAILWAY_AREAprotected static intOVERLAPPING_RAILWAY_LINEAR_WAYprotected static intOVERLAPPING_WATERWAYprotected static intOVERLAPPING_WATERWAY_AREAprotected static intOVERLAPPING_WATERWAY_LINEAR_WAYprotected static intOVERLAPPING_WAYprotected static intOVERLAPPING_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 voidanalyseOverlaps(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)voidendTest()Notification of the end of the test.private static booleanisOtherLinear(Way way)private static booleanparentMultipolygonConcernsArea(OsmPrimitive p)voidstartTest(ProgressMonitor monitor)Start the test using a given progress monitorvoidvisit(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:TestStart the test using a given progress monitor
-
parentMultipolygonConcernsArea
private static boolean parentMultipolygonConcernsArea(OsmPrimitive p)
-
endTest
public void 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).
-
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:OsmPrimitiveVisitorVisiting call for lines.- Specified by:
visitin interfaceOsmPrimitiveVisitor- Overrides:
visitin classTest- Parameters:
w- The way to inspect.
-
-