Package org.openstreetmap.josm.tools
Class RightAndLefthandTraffic
java.lang.Object
org.openstreetmap.josm.tools.RightAndLefthandTraffic
Look up, if there is right- or left-hand traffic at a certain place.
See Left- and right-hand traffic
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static GeoPropertyIndex<Boolean> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddWayIfNotInner(Collection<Way> ways, Way w) Adds w to ways, except if it is an inner way of another lefthand driving multipolygon, as Lesotho in South Africa and Cyprus village in British Cyprus base.(package private) static voidappendLeftDrivingBoundaries(OsmPrimitive osm, Collection<Way> ways) (package private) static voidinitialize(DefaultGeoProperty geoProperty) Initializes Right and lefthand traffic data.static booleanCheck if there is right-hand traffic at a certain location.
-
Field Details
-
DRIVING_SIDE
- See Also:
-
LEFT
- See Also:
-
RIGHT
- See Also:
-
rlCache
-
-
Constructor Details
-
RightAndLefthandTraffic
private RightAndLefthandTraffic()
-
-
Method Details
-
isRightHandTraffic
Check if there is right-hand traffic at a certain location.- Parameters:
ll- the coordinates of the point- Returns:
- true if there is right-hand traffic, false if there is left-hand traffic
-
initialize
Initializes Right and lefthand traffic data.- Parameters:
geoProperty- the property containing the traffic data TODO: Synchronization can be refined inside theGeoPropertyIndexas most look-ups are read-only.
-
appendLeftDrivingBoundaries
-
addWayIfNotInner
Adds w to ways, except if it is an inner way of another lefthand driving multipolygon, as Lesotho in South Africa and Cyprus village in British Cyprus base.- Parameters:
ways- waysw- way
-