Class RightAndLefthandTraffic

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String DRIVING_SIDE  
      private static java.lang.String LEFT  
      private static java.lang.String RIGHT  
      private static GeoPropertyIndex<java.lang.Boolean> rlCache  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void addWayIfNotInner​(java.util.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 void appendLeftDrivingBoundaries​(OsmPrimitive osm, java.util.Collection<Way> ways)  
      (package private) static void initialize​(DefaultGeoProperty geoProperty)
      Initializes Right and lefthand traffic data.
      static boolean isRightHandTraffic​(LatLon ll)
      Check if there is right-hand traffic at a certain location.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isRightHandTraffic

        public static boolean isRightHandTraffic​(LatLon ll)
        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

        static void initialize​(DefaultGeoProperty geoProperty)
        Initializes Right and lefthand traffic data.
        Parameters:
        geoProperty - the property containing the traffic data TODO: Synchronization can be refined inside the GeoPropertyIndex as most look-ups are read-only.
      • addWayIfNotInner

        private static void addWayIfNotInner​(java.util.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.
        Parameters:
        ways - ways
        w - way