ra2ce.network.network_config_data.enums package#
Submodules#
ra2ce.network.network_config_data.enums.aggregate_wl_enum module#
- class AggregateWlEnum(value)[source]#
Bases:
Ra2ceEnumBaseEnumeration for methods to aggregate hazard intensity levels during hazard overlay for network links intersecting multiple hazard map cells. Options include:
MIN: Use the minimum hazard intensity level.
MAX: Use the maximum hazard intensity level.
MEAN: Use the mean hazard intensity level.
INVALID: Invalid option, used for error handling.
- INVALID = 99#
- MAX = 2#
- MEAN = 3#
- MIN = 1#
- NONE = 0#
ra2ce.network.network_config_data.enums.network_type_enum module#
- class NetworkTypeEnum(value)[source]#
Bases:
Ra2ceEnumBase- ALL = 5#
- BIKE = 2#
- DRIVE = 3#
- DRIVE_SERVICE = 4#
- INVALID = 99#
- NONE = 0#
- WALK = 1#
- classmethod get_enum(input_str)[source]#
Create an enum from a given input string.
- Return type:
- Parameters:
input_str (str | None)
- Args:
input (str): Value from config.
- Returns:
Ra2ceEnumBase: Enumeration instance. NONE: This entry is used if the config is missing. INVALID: This entry is used if the config value is invalid.
ra2ce.network.network_config_data.enums.road_type_enum module#
- class RoadTypeEnum(value)[source]#
Bases:
Ra2ceEnumBaseEnumeration of OpenStreetMap (OSM) road types.
This enum provides integer identifiers for road types as defined by OpenStreetMap (OSM) tagging conventions. These types are commonly used in routing, navigation, and map rendering.
- NONE#
No road type (0).
- Type:
int
- MOTORWAY#
OSM
highway=motorway— major highway, usually with controlled access (1).- Type:
int
- MOTORWAY_LINK#
OSM
highway=motorway_link— link roads (on/off ramps) connecting to a motorway (2).- Type:
int
- TRUNK#
OSM
highway=trunk— important roads, typically linking cities or regions (3).- Type:
int
- TRUNK_LINK#
OSM
highway=trunk_link— link roads connecting to a trunk road (4).- Type:
int
- PRIMARY#
OSM
highway=primary— major roads between towns or districts (5).- Type:
int
- PRIMARY_LINK#
OSM
highway=primary_link— link roads connecting to a primary road (6).- Type:
int
- SECONDARY#
OSM
highway=secondary— roads connecting smaller towns and settlements (7).- Type:
int
- SECONDARY_LINK#
OSM
highway=secondary_link— link roads connecting to a secondary road (8).- Type:
int
- TERTIARY#
OSM
highway=tertiary— local connector roads within regions (9).- Type:
int
- TERTIARY_LINK#
OSM
highway=tertiary_link— link roads connecting to a tertiary road (10).- Type:
int
- RESIDENTIAL#
OSM
highway=residential— roads serving residential areas (11).- Type:
int
- ROAD#
OSM
highway=road— generic, unclassified road type (12).- Type:
int
- TUNNEL#
OSM
tunnel=yes— road passing underground (13).- Type:
int
- BRIDGE#
OSM
bridge=yes— road passing over an obstacle (14).- Type:
int
- CULVERT#
OSM
culvert=yes— small passage under a road, often for water flow (15).- Type:
int
- RAIL#
OSM
railway=*— railway tracks (16).- Type:
int
- UNCLASSIFIED#
OSM
highway=unclassified— minor public road, less important than tertiary (98).- Type:
int
- INVALID#
Invalid or unsupported OSM road type (99).
- Type:
int
Notes
These identifiers are based on OSM tagging conventions. See: https://wiki.openstreetmap.org/wiki/Key:highway
- BRIDGE = 14#
- CULVERT = 15#
- INVALID = 99#
- MOTORWAY = 1#
- MOTORWAY_LINK = 2#
- NONE = 0#
- PRIMARY = 5#
- PRIMARY_LINK = 6#
- RAIL = 16#
- RESIDENTIAL = 11#
- ROAD = 12#
- SECONDARY = 7#
- SECONDARY_LINK = 8#
- TERTIARY = 9#
- TERTIARY_LINK = 10#
- TRUNK = 3#
- TRUNK_LINK = 4#
- TUNNEL = 13#
- UNCLASSIFIED = 98#
- classmethod get_enum(input_str)[source]#
Create an enum from a given input string.
- Return type:
- Parameters:
input_str (str | None)
- Args:
input (str): Value from config.
- Returns:
Ra2ceEnumBase: Enumeration instance. NONE: This entry is used if the config is missing. INVALID: This entry is used if the config value is invalid.
ra2ce.network.network_config_data.enums.source_enum module#
- class SourceEnum(value)[source]#
Bases:
Ra2ceEnumBaseEnumeration of data source types.
This enum defines identifiers for different input data formats or sources used for the network definition.
- OSB_BPF#
Binary Packed File (BPF) format from OSB pipeline (1).
- Type:
int
- OSM_DOWNLOAD#
Data downloaded directly from OpenStreetMap (OSM) (2).
- Type:
int
- SHAPEFILE#
ESRI Shapefile format (3).
- Type:
int
- PICKLE#
Python Pickle serialized object (4).
- Type:
int
- INVALID#
Invalid or unsupported data source (99).
- Type:
int
- INVALID = 99#
- OSB_BPF = 1#
- OSM_DOWNLOAD = 2#
- PICKLE = 4#
- SHAPEFILE = 3#
- property config_value: str#
Reconstruct the name as it is known in the config. This could entail replacement of “ “ by “_” and lower() operations.
- Returns:
str: Value as known in the config.
- classmethod get_enum(input_str)[source]#
Create an enum from a given input string.
- Return type:
- Parameters:
input_str (str)
- Args:
input (str): Value from config.
- Returns:
Ra2ceEnumBase: Enumeration instance. NONE: This entry is used if the config is missing. INVALID: This entry is used if the config value is invalid.