SUMO
Simulation of Urban MObility

- Home
- Download
- Documentation
- Wiki
- Trac
- Blog
- Contact
- SF-Project

# SUMO edge type file

SUMO edge type file
Filename extension | .typ.xml
Type of content | Road type description
Open format? | Yes
SUMO specific? | Yes
XML Schema | types_file.xsd

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.

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.

## Syntax

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.

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 exemplary SUMO edge type file looks like:

    <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:

allow/disallow
  Map features, OSM tags for routing/Access restrictions.
numLanes
  Map features, Editing standards and conventions, Key:lanes, Key:highway and Tagging scheme by country.
priority
  Map features.
oneway
  Key:oneway.
speed
  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.

### Germany

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 [1]. As a consequence, the maxspeed 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, a table with all values and references after them.

osm-urban-de.typ.xml | osm-rural-de.typ.xml

id | priority | numLanes | speed (rural) | speed (urban) | Comments
--- | --- | --- | --- | --- | ---
highway.motorway | 13 | 2 | 41.667 | 41.667 | Autobahn. No legislative speed limit: 44.4 is just a reasonable default. [2] is a bit opposite to [3] regarding oneway tagging. All types but pedestrian, bicycle and all kinds of railways.
highway.motorway_link | 8 | 1 | 27.778 | 13.889 | Links are usually subordinate to the road that leads to the trunk (e.g. a secondary or tertiary road). As a consequence, I treat all links similar to the type unclassified.
highway.trunk | 12 | 1 | 27.778 | 13.889 | Autobahnähnlich [4] [5]. Lanes, maxspeed and oneway should be tagged explicitely. All types but pedestrian, bicycle and all kinds of railways.
highway.trunk_link | 8 | 1 | 27.778 | 13.889 | Links are usually subordinate to the road that leads to the trunk (e.g. a secondary or tertiary road). As a consequence, I treat all links similar to the type unclassified.
highway.primary | 11 | 1 | 27.778 | 13.889 | Bundesstraße [6] [7]
highway.primary_link | 8 | 1 | 27.778 | 13.889 | Links are usually subordinate to the road that leads to the trunk (e.g. a secondary or tertiary road). As a consequence, I treat all links similar to the type unclassified.
highway.secondary | 10 | 1 | 27.778 | 13.889 | Land-, Staats-, or a major Kreisstraße [8] [9]
highway.secondary_link | 8 | 1 | 27.778 | 13.889 | Links are usually subordinate to the road that leads to the trunk (e.g. a tertiary road). As a consequence, I treat all links similar to the type unclassified.
highway.tertiary | 9 | 1 | 27.778 | 13.889 | Kreisstraße, major Gemeindeverbindungsstraße or minor Staats-/Landesstraße [10] [11]
highway.unclassified | 8 | 1 | 27.778 | 13.889 | Below tertiary, still interconnecting, not in a residential area [12] [13] [14] [15]
highway.residential | 7 | 1 | 27.778 | 13.889 | Accessing a residential area, should probably not be outside a town [16] [17]
highway.road | 7 | 1 | 27.778 | 13.889 | A road that is not yet classified. So we cannot know anything. Do classify them! [18]
highway.living_street | 6 | 1 | 1.389 | 1.389 | Verkehrsberuhigter Bereich (walking speed). If you leave that street, you have to give way [19]
highway.pedestrian | 5 | 1 | 1.389 | 1.389 | Fußgängerzone. Pedestrians only. (Bicylces should be pushed.) [20] [21]
highway.service | 5 | 1 | 27.778 | 13.889 | 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. [22]
highway.bus_guideway | 5 | 1 | 27.778 | 13.889 | For busses only. [23]
highway.track | 4 | 1 | 8.333 | 8.333 | For agricultural traffic, usually not used by normal vehicles. Thus we assign it to bicylces and pedestrians. [24]
highway.path | 2 | 1 | 6.944 | 6.944 | Usually “not intended for motor vehicles”. [25]
highway.cycleway | 2 | 1 | 6.944 | 6.944 | “Access is only allowed for bikes” in Germany. [26]
highway.footway | 2 | 1 | 1.389 | 1.389 | For designated footpaths in Germany. (Bicycles must be tagged explicitely.) [27] [28]
highway.bridleway | 2 | 1 | 6.944 | 6.944 | For pedestrians, horses and sometimes bicycles. [29]
highway.steps | 2 | 1 | 1.389 | 1.389 | Steps are usually for pedestrians. [30]
railway.rail | 7 | 1 | 38.889 | 22.222 | Typical full sized trains. (I did not found reasonable data for typical speeds on German railway. The values in the Eisenbahn-Bau- und Betriebsordnung are quite high.) Assigned it to the SUMO class rail_fast. [31] [32]
railway.tram | 7 | 1 | 16.667 | 16.667 | Trams. Assigned it to the SUMO class cityrail. [33] [34]
railway.light_rail | 7 | 1 | 33.333 | 33.333 | The maximum speed of the S-Bahn in Munich is 120km/h [35]. Assigned it to the SUMO class lightrail. [36]
railway.subway | 7 | 1 | 22.222 | 22.222 | The maximum speed of the U-Bahn in Munich is 80km/h [37]. Assigned it to the SUMO class cityrail. [38]
railway.preserved | 7 | 1 | 8.333 | 8.333 | Historic trains. Assigned it to the SUMO class lightrail. [39] [40]
railway.narrow_gauge | 7 | 1 | 33.333 | 33.333 | Smaller gauge. Assigned it to the SUMO class lightrail. [41]]
railway.monorail | 7 | 1 | 16.667 | 16.667 | “Trains run on one single rail”. Assigned it to the SUMO class lightrail. [42]
railway.funicular | 7 | 1 | 16.667 | 16.667 | “Cable driven inclined railways”. Assigned it to the SUMO class cityrail. [43] [44]

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.

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. The authors are listed in the history.

This page was last modified on 20 February 2012, at 09:58.