Working with OSM data

Describe the problems and solutions related to working with OSM data using OSRD

Problems

Some data is not available from OpenStreetMap (OSM), either because it’s not public (like signals in France) or because it has not been collected in OSM yet (like slopes).

OSM data in OSRD

The following list resumes the different objects used in OSRD, roughly sorted by their importance in the application.
This gives an idea about their role in OSRD and how they are extracted (or not) from OSM.

DataImportanceSource
Track sectionsRequired. This one’s pretty obvious why.Extracted from OSM ways with the tag railway=rail.​
SwitchesRequired. Tracks should be explicitly linked by switches to be connected.Generated from the angle between the track sections that cross each other. A specific switch object exist in OSM but is not used because its quality is uneven.​
SignalsRequired. Signals are used by the pathfinding and the conflict detection to determine where and how the trains can move on the infrastructure.Either extracted from OSM nodes with the tag railway=signal, or generated using track sections data.​
DetectorsRequired. Detectors are used in alongside of the signals for the pathfinding.Generated from the signals data.​
Operational pointsAlmost required. Without it, most of the application feature will not work.Extracted from OSM relations with the tag public_transport=stop_area.​
Speed sectionsNice to have. If not defined, a track section has a speed limit of 80 km/h, which will impact the realism of the simulation.Extracted from OSM tag maxspeed.​
ElectrificationsNice to have. Electric rolling stocks are not be able to travel on non-electrified tracks.Extracted from OSM tag voltage.​
Loading gaugesNice to have. If not defined, the least restrictive one is used, allowing the trains to run everywhere.Not extracted, but the data exist (see OSM tag loading_gauge).​
SlopesNice to have. If not defined, tracks are considered flat, which will impact the realism of the simulation.This data doesn’t exist in OSM.
CurvesNice to have. If not defined, tracks are considered straight, which will impact the realism of the simulation.Not extracted. The data exist under another format that would be hard to extract.
Level crossingsNice to have. Level crossings do not affect the simulation or pathfinding, but their closing information can be analyzed.Not extracted, but the data exist (see the OSM tag level_crossing).​
Neutral zonesNice to have.We did not explored that yet.

Solutions

If track sections are missing from your data, there’s not much we can do. However, this information is usually in very high quality in OSM because it can be traced using aerial imagery (track geometry can be sketchy in tunnels). But for signals, a option in the infrastructure generation can be used for replacing the existing ones with realisticaly generated signals.

For the operational points, there are a few optional fields (name, uic and local_track_name) that we generate if they are missing to make them easier to use.