Routing on rails with OpenStreetMap Michael Reichert (Nakaner) - - PowerPoint PPT Presentation

routing on rails with openstreetmap
SMART_READER_LITE
LIVE PREVIEW

Routing on rails with OpenStreetMap Michael Reichert (Nakaner) - - PowerPoint PPT Presentation

Routing on rails with OpenStreetMap Michael Reichert (Nakaner) photo: Andre de, Wikimedia Commons, CC-BY-SA 4.0 Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future Current solutions


slide-1
SLIDE 1

Routing on rails with OpenStreetMap

Michael Reichert (Nakaner)

photo: Andre de, Wikimedia Commons, CC-BY-SA 4.0

slide-2
SLIDE 2

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

slide-3
SLIDE 3

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Current solutions

Travic

proprietary

slide-4
SLIDE 4

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Current solutions

Mentz

proprietary

slide-5
SLIDE 5

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Current solutions

Raildar.fr

filtering the planet using osmfilter, routing with OSRM, rumours about tag replacement

slide-6
SLIDE 6

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Current solutions

Signal.eu.org

OSRM, support of left/right track, reversing

slide-7
SLIDE 7

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Railway tracks in OpenStreetMap

connected

  • ne way per track

1 841 430 km tracks (608 055 km in Europe) 1 239 753 possible points (634 524 in Europe) 289 423 points tagged with railway=switch (208 078 in Europe)

slide-8
SLIDE 8

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Railway tracks in OpenStreetMap

Simple points

slide-9
SLIDE 9

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Railway tracks in OpenStreetMap

Slip points

double slip point (railway=switch + railway:switch=double slip)

slide-10
SLIDE 10

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Railway tracks in OpenStreetMap

Slip points

single slip point (railway=switch + railway:switch=single slip)

slide-11
SLIDE 11

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Railway tracks in OpenStreetMap

Slip points

crossing (railway=railway crossing)

slide-12
SLIDE 12

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Railway tracks in OpenStreetMap

Tags

railway=rail/light rail/tram/ subway/narrow gauge gauge=* electrified=no/yes/contact line/rail voltage=* frequency=* See Railways at OpenStreetMap at SotM 2016 for more.

slide-13
SLIDE 13

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Features

power systems gauges preconfigured profiles

freight train and TGV profiles for France and Germany/Austria/Switzerland universal diesel train (any gauges), max. 120 kph universal electric train (any gauges, any power system),

  • max. 140 kph

profile customization via YAML file reversing reduced default speeds for crossovers and other slower tracks map matching (CSV, GPX)

slide-14
SLIDE 14

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Demo Demo

slide-15
SLIDE 15

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Performance

  • smium tags-filter -o planet-rail.osm.pbf

planet.osm.pbf nw/railway 6 minutes on a fast server, 1–2 GB RAM 168 MB .osm.pbf file import: about 1 minute, 1200 MB RAM without contraction hierarchies graph: 204 MB 2450 routes through Germany

2352 successfull routes 2 minutes 8 seconds, 1 thread average length per route: 409 km

slide-16
SLIDE 16

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Implementation

com.graphhopper com.graphhopper.reader.osm de.geofabrik.railway routing GraphHopper GraphHopperOSM RailwayHopper + cleanUp(): void

slide-17
SLIDE 17

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Implementierung

FlagEncoder

com.graphhopper.routing.util de.geofabrik.railway routing ≪interface≫ FlagEncoder AbstractFlagEncoder RailFlagEncoder

slide-18
SLIDE 18

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Implementierung

RailFlagEncoder RailFlagEncoder

  • electrifiedValues: ArrayList<String>
  • acceptedVoltages: ArrayList<Integer>
  • acceptedFrequencies: ArrayList<Double>
  • acceptedGauges: ArrayList<Integer>
  • speedCorrectionFactor: double

+ RailFlagEncoder(properties: PMap)

slide-19
SLIDE 19

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Implementierung

RailFlagEncoder RailFlagEncoder

  • electrifiedValues: ArrayList<String>
  • acceptedVoltages: ArrayList<Integer>
  • acceptedFrequencies: ArrayList<Double>
  • acceptedGauges: ArrayList<Integer>
  • speedCorrectionFactor: double

+ RailFlagEncoder(properties: PMap)

YAML config

name electrified voltages frequencies gauges maxspeed speedFactor

slide-20
SLIDE 20

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Experiences with GraphHopper

+ suitable for routing on any routeable OSM network – introduction into FlagEncoder could be more verbose – TurnCostExtension without good documentation → misconceptions – no different penalities for reversing for each FlagEncoder – a library for car routing only

flag encoders designed to be extensible addition of turn restrictions not designed to be extensible reading of OSM files not extensible → fork of GraphHopper

+ forum Read the unit tests!

slide-21
SLIDE 21

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Space for improvement

Left/right track on double-tracked lines

direction of travel

slide-22
SLIDE 22

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Space for improvement

Tag to distinguish left and right tracks

railway:preferred direction=forward/backward

slide-23
SLIDE 23

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Space for improvement

Estimation of travel times

currently 0.9 · speed limit

slide-24
SLIDE 24

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Space for improvement

Estimation of travel times

currently 0.9 · speed limit Comparison of timetables of nonstop IC trains using the TGV profile (max. 160 kph due to old infrastructure) timetable routing IC Koblenz–Mainz 1:05 0:50 IC Magdeburg–Dessau 0:42 0:36

slide-25
SLIDE 25

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Space for improvement

Specify heading direction

Saabr¨ ucken–Frankfurt

slide-26
SLIDE 26

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Space for improvement

Specify heading direction

Saabr¨ ucken–Frankfurt

slide-27
SLIDE 27

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Missing data

Gradients

Hansueli Krapf, Wikimedia Commons, CC-BY-SA 3.0

slide-28
SLIDE 28

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Missing data

Gradients

Problems SRTM resolution too low

cuttings and embankments in SRTM data narrow valleys vertical precision

slide-29
SLIDE 29

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Missing data

Gradients

Problems SRTM resolution too low

cuttings and embankments in SRTM data narrow valleys vertical precision

Solutions? Use railway lines to correct elevation data? elevation profiles provided by operator of infrastructure Measure elevation profiles data ourselves?

slide-30
SLIDE 30

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Missing data

Lines for special purpose (S-train, RER, . . . ), diesel engine bans

Poudou99, Wikimedia Commons, CC-BY-SA 4.0

slide-31
SLIDE 31

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Missing data

Loading gauge

Falk2, Wikimedia Commons, CC-BY-SA 4.0

slide-32
SLIDE 32

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

Missing data

Loading gauge

.osm.pbf file FlagEncoder shape file/PostGIS database polygons around lines with special properties

slide-33
SLIDE 33

Michael Reichert (Nakaner) Current solutions OSM data Features Demo Performance Implemen- tation Future

The development of this software has been sponsored by Source code: https://github.com/geofabrik/railway_routing