Class TurnrestrictionTest
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.Test
-
- org.openstreetmap.josm.data.validation.tests.TurnrestrictionTest
-
- All Implemented Interfaces:
OsmPrimitiveVisitor
public class TurnrestrictionTest extends Test
Checks if turn restrictions are valid- 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
FROM_CLOSED_WAY
protected static int
FROM_EQUALS_TO
protected static int
FROM_VIA_NODE
protected static int
FROM_VIA_WAY
protected static int
MIX_VIA
protected static int
MORE_FROM
protected static int
MORE_TO
protected static int
MORE_VIA
protected static int
NO_FROM
protected static int
NO_TO
protected static int
NO_VIA
protected static int
SUPERFLUOUS
private static java.util.List<java.lang.String>
SUPPORTED_RESTRICTIONS
protected static int
TO_CLOSED_WAY
protected static int
TO_VIA_NODE
protected static int
TO_VIA_WAY
protected static int
UNCONNECTED_VIA
protected static int
UNEXPECTED_ROLE
protected static int
UNEXPECTED_TYPE
protected static int
UNKNOWN_RESTRICTION
-
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 TurnrestrictionTest()
Constructs a newTurnrestrictionTest
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkIfConnected(Relation r, Way previous, Way current, java.lang.String msg, int code)
private static boolean
hasSupportedRestrictionTag(Relation r)
private static boolean
isFullOneway(Way w)
void
visit(Relation r)
Visiting call for relations.-
Methods inherited from class org.openstreetmap.josm.data.validation.Test
addGui, clear, deletePrimitivesIfNeeded, endTest, fixError, getErrors, getName, getSource, initialize, isBuilding, isCanceled, isFixable, isPrimitiveUsable, isResidentialArea, ok, removeIrrelevantErrors, setBeforeUpload, setPartialSelection, setShowElements, startTest, testBeforeUpload, visit, visit, visit
-
-
-
-
Field Detail
-
NO_VIA
protected static final int NO_VIA
- See Also:
- Constant Field Values
-
NO_FROM
protected static final int NO_FROM
- See Also:
- Constant Field Values
-
NO_TO
protected static final int NO_TO
- See Also:
- Constant Field Values
-
MORE_VIA
protected static final int MORE_VIA
- See Also:
- Constant Field Values
-
MORE_FROM
protected static final int MORE_FROM
- See Also:
- Constant Field Values
-
MORE_TO
protected static final int MORE_TO
- See Also:
- Constant Field Values
-
UNEXPECTED_ROLE
protected static final int UNEXPECTED_ROLE
- See Also:
- Constant Field Values
-
UNEXPECTED_TYPE
protected static final int UNEXPECTED_TYPE
- See Also:
- Constant Field Values
-
FROM_VIA_NODE
protected static final int FROM_VIA_NODE
- See Also:
- Constant Field Values
-
TO_VIA_NODE
protected static final int TO_VIA_NODE
- See Also:
- Constant Field Values
-
FROM_VIA_WAY
protected static final int FROM_VIA_WAY
- See Also:
- Constant Field Values
-
TO_VIA_WAY
protected static final int TO_VIA_WAY
- See Also:
- Constant Field Values
-
MIX_VIA
protected static final int MIX_VIA
- See Also:
- Constant Field Values
-
UNCONNECTED_VIA
protected static final int UNCONNECTED_VIA
- See Also:
- Constant Field Values
-
SUPERFLUOUS
protected static final int SUPERFLUOUS
- See Also:
- Constant Field Values
-
FROM_EQUALS_TO
protected static final int FROM_EQUALS_TO
- See Also:
- Constant Field Values
-
UNKNOWN_RESTRICTION
protected static final int UNKNOWN_RESTRICTION
- See Also:
- Constant Field Values
-
TO_CLOSED_WAY
protected static final int TO_CLOSED_WAY
- See Also:
- Constant Field Values
-
FROM_CLOSED_WAY
protected static final int FROM_CLOSED_WAY
- See Also:
- Constant Field Values
-
SUPPORTED_RESTRICTIONS
private static final java.util.List<java.lang.String> SUPPORTED_RESTRICTIONS
-
-
Constructor Detail
-
TurnrestrictionTest
public TurnrestrictionTest()
Constructs a newTurnrestrictionTest
.
-
-
Method Detail
-
hasSupportedRestrictionTag
private static boolean hasSupportedRestrictionTag(Relation r)
-
visit
public void visit(Relation r)
Description copied from interface:OsmPrimitiveVisitor
Visiting call for relations.- Specified by:
visit
in interfaceOsmPrimitiveVisitor
- Overrides:
visit
in classTest
- Parameters:
r
- The relation to inspect.
-
isFullOneway
private static boolean isFullOneway(Way w)
-
checkIfConnected
private void checkIfConnected(Relation r, Way previous, Way current, java.lang.String msg, int code)
-
-