Class Highways
java.lang.Object
org.openstreetmap.josm.data.validation.Test
org.openstreetmap.josm.data.validation.tests.Highways
- All Implemented Interfaces:
OsmPrimitiveVisitor
Test that performs semantic checks on highways.
- Since:
- 5902
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.validation.Test
Test.TagTest -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intClassified highways in order of importanceprivate intprotected static final intprivate booleanprivate booleanprivate booleanprotected static final intprivate intprotected static final Stringprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intFields 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 TypeMethodDescriptionprivate static booleancheckLayer(Node connection, List<Way> ways) Check if there are at least two neighbouring nodes on the given ways.private voidhandleCarWay(Node n, Way w) private voidhandleCyclistWay(Node n, Way w) private voidhandlePedestrianWay(Node n, Way w) static booleanisHighwayLinkOkay(Way way) Determines if the given link road is correct, see https://wiki.openstreetmap.org/wiki/Highway_link.private static booleanisSpecialArea(Way w) Check if way is an area on a layer above or below 0.private voidtestDifferentLayers(Node connection) See #9304: Find Highways connected to bridges or tunnels at the wrong place.private voidtestHighwayLink(Way way) private voidprivate voidtestSourceMaxspeed(OsmPrimitive p, boolean testContextHighway) private voidvoidVisiting call for points.voidVisiting call for lines.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
-
Field Details
-
WRONG_ROUNDABOUT_HIGHWAY
- See Also:
-
MISSING_PEDESTRIAN_CROSSING
- See Also:
-
SOURCE_MAXSPEED_UNKNOWN_COUNTRY_CODE
- See Also:
-
SOURCE_MAXSPEED_UNKNOWN_CONTEXT
- See Also:
-
SOURCE_MAXSPEED_CONTEXT_MISMATCH_VS_MAXSPEED
- See Also:
-
SOURCE_MAXSPEED_CONTEXT_MISMATCH_VS_HIGHWAY
- See Also:
-
SOURCE_WRONG_LINK
- See Also:
-
DIFFERENT_LAYERS
- See Also:
-
SOURCE_MAXSPEED
- See Also:
-
CLASSIFIED_HIGHWAYS
Classified highways in order of importance -
KNOWN_SOURCE_MAXSPEED_CONTEXTS
-
ISO_COUNTRIES
-
leftByPedestrians
-
leftByCyclists
-
leftByCars
-
pedestrianWays
-
cyclistWays
-
carsWays
-
-
Constructor Details
-
Highways
public Highways()Constructs a newHighwaystest.
-
-
Method Details
-
visit
Description copied from interface:OsmPrimitiveVisitorVisiting call for points.- Specified by:
visitin interfaceOsmPrimitiveVisitor- Overrides:
visitin classTest- Parameters:
n- The node to inspect.
-
visit
Description copied from interface:OsmPrimitiveVisitorVisiting call for lines.- Specified by:
visitin interfaceOsmPrimitiveVisitor- Overrides:
visitin classTest- Parameters:
w- The way to inspect.
-
testWrongRoundabout
-
isHighwayLinkOkay
Determines if the given link road is correct, see https://wiki.openstreetmap.org/wiki/Highway_link.- Parameters:
way- link road- Returns:
trueif the link road is correct or if the check cannot be performed due to missing data
-
testHighwayLink
-
testMissingPedestrianCrossing
-
handleCarWay
-
handleCyclistWay
-
handlePedestrianWay
-
testSourceMaxspeed
-
testDifferentLayers
See #9304: Find Highways connected to bridges or tunnels at the wrong place.- Parameters:
connection- the connection node of two or more different ways
-
isSpecialArea
Check if way is an area on a layer above or below 0.- Parameters:
w- the way- Returns:
- true if way is an area on a layer above or below 0
-
checkLayer
Check if there are at least two neighbouring nodes on the given ways. If so, the connection node can be considered to be at a specific layer, else it marks the end of such a layer- Parameters:
connection- the connection nodeways- the ways with the same layer attribute connected to that node- Returns:
- true if the node can be considered to be at a specific layer
-