SUMO edge type file
|Type of content||Road type description|
A SUMO edge type file assigns default values for certain attributes to types of roads. It configures NETCONVERT when importing, for example, SUMO XML descriptions, OpenStreetMap files or ArcView files. The type configuration is saved in an XML structure. It is always possible to load multiple type maps and redefining types partly or completely when loading an additoinal file.
This article introduces the file format first. After that, it discusses the application of the SUMO edge type file on certain types of map files and collects reasonable templates for these map files. You are very welcome to provide additional templates for various contexts or to start a discussion about existing templates.
The XML root element is called types. It contains a collection of type elements. A type element represents a record with the following attributes:
|Attribute Name||Value Type||Description|
|id||id (string)||The name of the road type. This is the only mandatory attribute. For OpenStreetMap data, the name could, for example, be highway.trunk or highway.residential. For ArcView data, the name of the road type is a number.|
|allow||string||List of allowed vehicle classes. The classes are space separated (e.g. "pedestrian bicycle").|
|disallow||string||List of not allowed vehicle classes. The classes are space separated too.|
|discard||bool||If "yes", edges of that type are not imported. This parameter is optional and defaults to false.|
|numLanes||int||The number of lanes on an edge. This is the default number of lanes per direction.|
|oneway||bool||If "yes", only the edge for one direction is created during the import. (This attribute makes no sense for SUMO XML descriptions but, for example, for OpenStreetMap files.)|
|priority||int||A number, which determines the priority between different road types. NETCONVERT derives the right-of-way rules at junctions from the priority. The number starts with one; higher numbers represent more important roads.|
|speed||float||The default (implicit) speed limit in m/s.|
|sidewalkWidth||float||The default width for added sidewalks (defaults to -1 which disables extra sidewalks).|
The names of the SUMO vehicle classes are:
- By ownership
- private, public_transport, public_emergency, public_authority, public_army, vip, ignoring,
- By size
- passenger (a “normal” car), hov, taxi, bus, delivery, transport, lightrail, cityrail, rail_slow, rail_fast, motorcycle, bicycle, pedestrian.
So an example of a SUMO edge type file is:
<types> <type id="highway.motorway" priority="13" numLanes="2" speed="44.0" /> <type id="highway.residential" priority="4" numLanes="1" speed="13.889" /> </types>
Templates for OpenStreetMap
The SUMO edge type file defines default values for some tags, which are taken if no explicit value is given for a certain road in a OpenStreetMap file. So the OpenStreetMap tags maxspeed, lanes and oneway override these defaults. If the map is tagged correctly, these tags should only be omitted if their value equals an implicitly assumed value. In this section, SUMO edge type files are collected that contain these implicit values of OpenStreetMap for various contexts. The following OpenStreetMap pages help to find out the implicit values for the following attributes:
- Map features, OSM tags for routing/Access restrictions.
- Map features, Editing standards and conventions, Key:lanes, Key:highway and Tagging scheme by country.
- Map features.
- Key:maxspeed, OSM tags for routing/Maxspeed, Key:source:maxspeed and Key:traffic_sign. Wikipedia lists the Speed limits by country.
The right values are hard to find. Because they depend at least partly on the legislation (maxspeed, for example); the values vary from country to country. Further context information, like the fact whether a road is inside or outside a city border, may determine the defaults as well. In the following, SUMO edge type files for various contexts are given, using the country as the main ordering criterion. The lists and files contain only way types as they correspond to SUMO edges; node and area types (like highway=services) are not considered. You are very welcome to provide additional templates for various contexts or to start a discussion about existing templates.
In Germany, the legislation for the speed limit distinguishes roads inside from those outside city borders, roads with a central barrier separation from those without, and special road like living streets and pedestrian areas. There is no direct connection to the importance of a road. However in OpenStreetMap, a motorway is supposed to have such a central barrier separation per default . As a consequence, the speed value only varies between rural and urban contexts but not between road types, except for motorways, living streets and pedestrian areas. The two SUMO edge type files are given next, for the detailed values have a look at the files. References are mentioned in the table below. The rural type map is the default mapping when converting OpenStreetMap networks without an explicit typemap.
|highway.motorway||Autobahn. No legislative speed limit: 44.4 is just a reasonable default.  is a bit opposite to  regarding oneway tagging.|
|highway.motorway_link||Links are usually subordinate to the road that leads to the trunk (e.g. a secondary or tertiary road)|
|highway.trunk||Similar to Autobahn  . Lanes, maxspeed and oneway should be tagged explicitely.|
|highway.trunk_link||Links are usually subordinate to the road that leads to the trunk (e.g. a secondary or tertiary road)|
|highway.primary||Bundesstraße  |
|highway.primary_link||Links are usually subordinate to the road that leads to the trunk (e.g. a secondary or tertiary road)|
|highway.secondary||Land-, Staats-, or a major Kreisstraße  |
|highway.secondary_link||Links are usually subordinate to the road that leads to the trunk (e.g. a tertiary road)|
|highway.tertiary||Kreisstraße, major Gemeindeverbindungsstraße or minor Staats-/Landesstraße  |
|highway.tertiary_link||Links are usually subordinate to the road that leads to the trunk (e.g. a tertiary road).|
|highway.unclassified||Below tertiary, still interconnecting, not in a residential area    |
|highway.residential||Accessing a residential area, should probably not be outside a town  |
|highway.living_street||Verkehrsberuhigter Bereich (walking speed). If you leave that street, you have to give way |
|highway.pedestrian||Fußgängerzone. Pedestrians only. (Bicycles should be pushed.)  |
|highway.service||No explicit regulatory speed limit. Usually you have to give way when leaving such a street as it is not part of the road network with moving traffic. |
|highway.services||Rest area with additional services like a gas station. Usually you have to give way when leaving such a street as it is not part of the road network with moving traffic. |
|highway.bus_guideway||For busses only. |
|highway.track||For agricultural traffic, usually not used by normal vehicles. |
|highway.path||Usually “not intended for motor vehicles”. |
|highway.cycleway||“Access is only allowed for bikes” in Germany. |
|highway.footway||For designated footpaths in Germany. (Bicycles must be tagged explicitely.)  |
|highway.bridleway||For pedestrians, horses and sometimes bicycles. |
|Steps are usually for pedestrians. |
|railway.rail||Typical full sized trains|
|railway.preserved||Historic trains  |
Templates for additional traffic modes in OpenStreetMap
There are additional templates which should be loaded when importing pedestrian infrastructure (sidewalks), bike lanes, ship movements and special railways with some comments below:
If your railways have two tracks but are mapped with a single way in OSM, you may wish to load: <SUMO_HOME>/data/typemap/osmNetconvertBidiRail.typ.xml
|railway.narrow_gauge||Smaller gauge. Assigned it to the SUMO class lightrail. ]|
|railway.monorail||“Trains run on one single rail”. Assigned it to the SUMO class lightrail. |
|railway.funicular||“Cable driven inclined railways”. Assigned it to the SUMO class cityrail.  |
Only few data is available about the railway types. The most important document might be the Eisenbahn-Bau- und Betriebsordnung (EBO), but even that did not help me much. So the given values are mostly personal opinion, except if a reference is given. More references are very welcome.
Templates for OpenDrive
The default type map is <SUMO_HOME>/data/typemap/opendriveNetconvert.typ.xml.
There are additional templates which should be loaded when importing pedestrian infrastructure (sidewalks) and/or bike lanes: