Class RoadNetworkConstants


  • public final class RoadNetworkConstants
    extends Object
    Constants for the road network API.
    Since:
    14.0
    Version:
    17.0 2020-01-04 14:41:55
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.gis
    Maven Artifact Id:
    gisroad
    • Field Detail

      • ENABLE_GRAPH_ITERATION_CYCLES

        public static final boolean ENABLE_GRAPH_ITERATION_CYCLES
        By default the road network API disallows cycles during graph iterations.
        See Also:
        Constant Field Values
      • ENABLE_ORIENTED_SEGMENTS

        public static final boolean ENABLE_ORIENTED_SEGMENTS
        By default the road network API supports oriented graph segments.
        See Also:
        Constant Field Values
      • DEFAULT_ATTR_ROAD_WIDTH

        public static final String DEFAULT_ATTR_ROAD_WIDTH
        This is the name of the attribute describing the width of a road.
        See Also:
        Constant Field Values
      • DEFAULT_ATTR_LANE_COUNT

        public static final String DEFAULT_ATTR_LANE_COUNT
        This is the name of the attribute describing the count of lanes of a road.
        See Also:
        Constant Field Values
      • DEFAULT_ATTR_TRAFFIC_DIRECTION

        public static final String DEFAULT_ATTR_TRAFFIC_DIRECTION
        This is the name of the attribute describing the description of the traffic direction.
        See Also:
        Constant Field Values
      • DEFAULT_ATTR_ROAD_TYPE

        public static final String DEFAULT_ATTR_ROAD_TYPE
        This is the name of the attribute describing the type of the road.
        See Also:
        Constant Field Values
      • DEFAULT_ATTR_ROAD_NAME

        public static final String DEFAULT_ATTR_ROAD_NAME
        This is the name of the attribute describing the name of the road.
        See Also:
        Constant Field Values
      • DEFAULT_ATTR_ROAD_NUMBER

        public static final String DEFAULT_ATTR_ROAD_NUMBER
        This is the name of the attribute describing the number of the road.
        See Also:
        Constant Field Values
      • DEFAULT_LANE_COUNT

        public static final int DEFAULT_LANE_COUNT
        Default lane count in a road segment.
        See Also:
        Constant Field Values
      • DEFAULT_LANE_WIDTH

        public static final double DEFAULT_LANE_WIDTH
        Default lane width (in meters).
        See Also:
        Constant Field Values
      • DEFAULT_ROAD_INTERN_COLOR

        public static final int DEFAULT_ROAD_INTERN_COLOR
        Color of the internal data structures of the road networks when they are drawn on the displayers.
        See Also:
        Constant Field Values
      • DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION_0

        public static final String DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION_0
        Balue for the double-way road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION_1

        public static final String DEFAULT_DOUBLE_WAY_TRAFFIC_DIRECTION_1
        Value for the double-way road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_NO_ENTRY_TRAFFIC_DIRECTION_0

        public static final String DEFAULT_NO_ENTRY_TRAFFIC_DIRECTION_0
        Value for the no-entry road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_NO_ENTRY_TRAFFIC_DIRECTION_1

        public static final String DEFAULT_NO_ENTRY_TRAFFIC_DIRECTION_1
        Value for the no-entry road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_NO_WAY_TRAFFIC_DIRECTION_0

        public static final String DEFAULT_NO_WAY_TRAFFIC_DIRECTION_0
        Value for the no-way road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_NO_WAY_TRAFFIC_DIRECTION_1

        public static final String DEFAULT_NO_WAY_TRAFFIC_DIRECTION_1
        Value for the no-way road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_ONE_WAY_TRAFFIC_DIRECTION_0

        public static final String DEFAULT_ONE_WAY_TRAFFIC_DIRECTION_0
        Value for the one-way road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_ONE_WAY_TRAFFIC_DIRECTION_1

        public static final String DEFAULT_ONE_WAY_TRAFFIC_DIRECTION_1
        Value for the one-way road (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_OTHER_ROAD_TYPE

        public static final String DEFAULT_OTHER_ROAD_TYPE
        Value for the pedestrian/other roads (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_TRACK_ROAD_TYPE

        public static final String DEFAULT_TRACK_ROAD_TYPE
        Value for the track roads (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_PRIVACY_ROAD_TYPE

        public static final String DEFAULT_PRIVACY_ROAD_TYPE
        Value for the privacy paths or roads (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_BIKEWAY_ROAD_TYPE

        public static final String DEFAULT_BIKEWAY_ROAD_TYPE
        Value for the bikeways (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_LOCAL_ROAD_ROAD_TYPE

        public static final String DEFAULT_LOCAL_ROAD_ROAD_TYPE
        Value for the local roads (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_INTERCHANGE_RAMP_ROAD_TYPE

        public static final String DEFAULT_INTERCHANGE_RAMP_ROAD_TYPE
        Value for the interchange ramps (from the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_MAJOR_URBAN_ROAD_TYPE

        public static final String DEFAULT_MAJOR_URBAN_ROAD_TYPE
        Value for the major urban roads (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_SECONDARY_ROAD_TYPE

        public static final String DEFAULT_SECONDARY_ROAD_TYPE
        Value for the secondary roads (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_MAJOR_ROAD_TYPE

        public static final String DEFAULT_MAJOR_ROAD_TYPE
        Value for the major roads (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_FREEWAY_ROAD_TYPE

        public static final String DEFAULT_FREEWAY_ROAD_TYPE
        Value for the freeways (undefined in the French DBCarto standards).
        See Also:
        Constant Field Values
      • DEFAULT_ROAD_CONNECTION_DISTANCE

        public static final double DEFAULT_ROAD_CONNECTION_DISTANCE
        This is the hard-coded distance below which roads may be connected (in meters).
        See Also:
        Constant Field Values
    • Method Detail

      • getPreferences

        @Pure
        public static Preferences getPreferences()
        Replies the preferences for the road network.
        Returns:
        the preferences.
      • getPreferredAttributeNameForRoadWidth

        @Pure
        public static String getPreferredAttributeNameForRoadWidth()
        Replies the preferred name for the width of the roads.
        Returns:
        the preferred name for the width of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_WIDTH
      • setPreferredAttributeNameForRoadWidth

        public static void setPreferredAttributeNameForRoadWidth​(String name)
        Set the preferred name for the width of the roads.
        Parameters:
        name - is the preferred name for the width of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_WIDTH
      • getPreferredAttributeNameForLaneCount

        @Pure
        public static String getPreferredAttributeNameForLaneCount()
        Replies the preferred name for the number of lanes of the roads.
        Returns:
        the preferred name for the number of lanes of the roads.
        See Also:
        DEFAULT_ATTR_LANE_COUNT
      • setPreferredAttributeNameForLaneCount

        public static void setPreferredAttributeNameForLaneCount​(String name)
        Set the preferred name for the number of lanes of the roads.
        Parameters:
        name - is the preferred name for the number of lanes of the roads.
        See Also:
        DEFAULT_ATTR_LANE_COUNT
      • getPreferredLaneCount

        @Pure
        public static int getPreferredLaneCount()
        Replies the preferred number of lanes for a road segment.
        Returns:
        the preferred number of lanes for a road segment.
        See Also:
        DEFAULT_LANE_COUNT
      • setPreferredLaneCount

        public static void setPreferredLaneCount​(int count)
        Set the preferred number of lanes for a road segment.
        Parameters:
        count - is the preferred number of lanes for a road segment.
        See Also:
        DEFAULT_LANE_COUNT
      • getPreferredLaneWidth

        @Pure
        public static double getPreferredLaneWidth()
        Replies the preferred width of a lane for a road segment.
        Returns:
        the preferred width of a lane for a road segment, in meters.
        See Also:
        DEFAULT_LANE_WIDTH
      • setPreferredLaneWidth

        public static void setPreferredLaneWidth​(double width)
        Set the preferred width of a lane for a road segment.
        Parameters:
        width - is the preferred width of a lane for a road segment, in meters.
        See Also:
        DEFAULT_LANE_WIDTH
      • getPreferredLegalTrafficSide

        @Pure
        public static LegalTrafficSide getPreferredLegalTrafficSide()
        Replies the preferred side of traffic for vehicles on road segments.
        Returns:
        the preferred side of traffic for vehicles on road segments.
      • setPreferredLegalTrafficSide

        public static void setPreferredLegalTrafficSide​(LegalTrafficSide side)
        Set the preferred side of traffic for vehicles on road segments.
        Parameters:
        side - is the preferred side of traffic for vehicles on road segments.
      • getPreferredAttributeNameForTrafficDirection

        @Pure
        public static String getPreferredAttributeNameForTrafficDirection()
        Replies the preferred name for the traffic direction on the roads.
        Returns:
        the preferred name for the traffic direction on the roads.
        See Also:
        DEFAULT_ATTR_TRAFFIC_DIRECTION
      • setPreferredAttributeNameForTrafficDirection

        public static void setPreferredAttributeNameForTrafficDirection​(String name)
        Set the preferred name for the traffic direction on the roads.
        Parameters:
        name - is the preferred name for the traffic direction on the roads.
        See Also:
        DEFAULT_ATTR_TRAFFIC_DIRECTION
      • getPreferredAttributeValueForTrafficDirection

        @Pure
        public static String getPreferredAttributeValueForTrafficDirection​(TrafficDirection direction,
                                                                           int index)
        Replies the preferred value of traffic direction used in the attributes for the traffic direction on the roads.
        Parameters:
        direction - a direction.
        index - is the index of the supported string to reply
        Returns:
        the preferred name for the traffic direction on the roads, or null if there is no string value for the given index.
      • getPreferredAttributeValuesForTrafficDirection

        @Pure
        public static List<String> getPreferredAttributeValuesForTrafficDirection​(TrafficDirection direction)
        Replies the preferred values of traffic direction used in the attributes for the traffic direction on the roads.
        Parameters:
        direction - aa direction
        Returns:
        the preferred names for the traffic direction on the roads, never null.
      • getSystemDefault

        @Pure
        public static String getSystemDefault​(TrafficDirection direction,
                                              int valueIndex)
        Replies the system default string-value for the traffic direction, at the given index in the list of system default values.
        Parameters:
        direction - is the direction for which the string value should be replied
        valueIndex - is the position of the string-value.
        Returns:
        the string-value at the given position, never null
        Throws:
        IndexOutOfBoundsException - is the given index is wrong.
        IllegalArgumentException - is the given direction is wrong.
      • getSystemDefault

        @Pure
        public static String getSystemDefault​(RoadType type)
        Replies the system-default value for the type of road.
        Parameters:
        type - a type
        Returns:
        the system-default value.
        Throws:
        IllegalArgumentException - if bad type.
      • getSystemDefaults

        @Pure
        public static List<String> getSystemDefaults​(TrafficDirection direction)
        Replies the system default string-values for the traffic direction.
        Parameters:
        direction - is the direction for which the string values should be replied
        Returns:
        the string-values, never null
      • setPreferredAttributeValueForTrafficDirection

        public static void setPreferredAttributeValueForTrafficDirection​(TrafficDirection direction,
                                                                         int index,
                                                                         String value)
        Set the preferred value of traffic direction used in the attributes for the traffic direction on the roads.
        Parameters:
        direction - a direction.
        index - is the index of the supported string to reply
        value - is the preferred name for the traffic direction on the roads.
      • setPreferredAttributeValuesForTrafficDirection

        public static void setPreferredAttributeValuesForTrafficDirection​(TrafficDirection direction,
                                                                          String... values)
        Set the preferred values of traffic direction used in the attributes for the traffic direction on the roads.
        Parameters:
        direction - a direction
        values - are the values for the given direction.
      • setPreferredAttributeValuesForTrafficDirection

        public static void setPreferredAttributeValuesForTrafficDirection​(TrafficDirection direction,
                                                                          List<String> values)
        Set the preferred values of traffic direction used in the attributes for the traffic direction on the roads.
        Parameters:
        direction - a direction
        values - are the values for the given direction.
      • getPreferredRoadConnectionDistance

        @Pure
        public static double getPreferredRoadConnectionDistance()
        Replies the preferred distance below which roads may be connected.
        Returns:
        the preferred distance (in meters) below which roads may be connected.
      • setPreferredRoadConnectionDistance

        public static void setPreferredRoadConnectionDistance​(double distance)
        Set the preferred distance below which roads may be connected.
        Parameters:
        distance - is the preferred distance (in meters) below which roads may be connected.
      • getPreferredRoadType

        @Pure
        public static RoadType getPreferredRoadType()
        Replies the preferred type of road segment.
        Returns:
        the preferred type of road segment.
      • setPreferredRoadType

        public static void setPreferredRoadType​(RoadType type)
        Set the preferred type of road segment.
        Parameters:
        type - is the preferred type of road segment.
      • getPreferredAttributeNameForRoadType

        @Pure
        public static String getPreferredAttributeNameForRoadType()
        Replies the preferred name for the types of the roads.
        Returns:
        the preferred name for the types of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_TYPE
      • setPreferredAttributeNameForRoadType

        public static void setPreferredAttributeNameForRoadType​(String name)
        Set the preferred name for the types of the roads.
        Parameters:
        name - is the preferred name for the types of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_TYPE
      • getPreferredAttributeValueForRoadType

        @Pure
        public static String getPreferredAttributeValueForRoadType​(RoadType type)
        Replies the preferred value of road type used in the attributes for the types of the roads.
        Parameters:
        type - a type
        Returns:
        the preferred name for the given type of the roads.
      • setPreferredAttributeValueForRoadType

        public static void setPreferredAttributeValueForRoadType​(RoadType type,
                                                                 String value)
        Set the preferred value of road type used in the attributes for the types of the roads.
        Parameters:
        type - a type
        value - is the preferred name for the types of the roads.
      • getPreferredAttributeNameForRoadName

        @Pure
        public static String getPreferredAttributeNameForRoadName()
        Replies the preferred name for the name of the roads.
        Returns:
        the preferred name for the name of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_NAME
      • setPreferredAttributeNameForRoadName

        public static void setPreferredAttributeNameForRoadName​(String name)
        Set the preferred name for the name of the roads.
        Parameters:
        name - is the preferred name for the name of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_NAME
      • getPreferredAttributeNameForRoadNumber

        @Pure
        public static String getPreferredAttributeNameForRoadNumber()
        Replies the preferred name for the numbers of the roads.
        Returns:
        the preferred name for the numbers of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_NUMBER
      • setPreferredAttributeNameForRoadNumber

        public static void setPreferredAttributeNameForRoadNumber​(String name)
        Set the preferred name for the numbers of the roads.
        Parameters:
        name - is the preferred name for the numbers of the roads.
        See Also:
        DEFAULT_ATTR_ROAD_NUMBER