A Fast and Customizable Route Planner By Peter: @timetabling - - PowerPoint PPT Presentation

a fast and customizable route planner
SMART_READER_LITE
LIVE PREVIEW

A Fast and Customizable Route Planner By Peter: @timetabling - - PowerPoint PPT Presentation

A Fast and Customizable Route Planner By Peter: @timetabling Berlin, WhereCamp, 2014-11-13 graphhopper.com Overview of this Talk What is GraphHopper? Who uses GraphHopper? Numbers Find this presentation under


slide-1
SLIDE 1

A Fast and Customizable Route Planner

By Peter: @timetabling Berlin, WhereCamp, 2014-11-13

graphhopper.com

slide-2
SLIDE 2

2

Overview of this Talk

  • What is GraphHopper?
  • Who uses GraphHopper?
  • Numbers

Find this presentation under graphhopper.com/public/slides/

slide-3
SLIDE 3

3

What is GraphHopper?

A complete online maps application requires

  • 1. Geodata: OpenStreetMap and SRTM (NASA)
  • 2. Drawing: Display map from vector or raster data

Like Mapnik, MapSurfer.NET, …

  • 3. Geocoding: Search address, get GPS coordinate

Like Photon, Gisgraphy 4.0, Pelias, ...

  • 4. Routing: find best path(s) between coordinates

→ GraphHopper is all about routing! Still we offer routing and geocoding in our Directions API for business

slide-4
SLIDE 4

4

= Address Search + Tiles + GraphHopper

Try at graphhopper.com/maps

GraphHopper Maps

slide-5
SLIDE 5

5

What is GraphHopper?

  • Open Source, Apache License
  • Fast routing library and server
  • Handles OpenStreetMap data by default
  • Ordnance Survey experimental; Navteq possible
  • Very memory-efficient but still simple Java API
  • Scales to your problems
  • Runs world wide as well as indoor graphs
  • Can utilize lots of RAM for maximum speed
  • Still can run on Android with only 32MB
slide-6
SLIDE 6

6

What is GraphHopper?

  • Routing with optimality guarantees
  • Heuristics not necessary
  • Large test suite: unit, integration and load tests
  • Commercial Support & Consulting

& Matrix and Directions API → Business friendly

  • Written in Java:

Runs on the Serverside, Desktop, Rasperry Pi, Android, offline in the Browser and (drum roll) ...

(github.com/konsoletyper/graphhopper)

slide-7
SLIDE 7

7

GraphHopper for iOS!

… and offline on iOS!

  • graphhopper/graphhopper-ios
  • Also available under Apache License
  • Still experimental, same code base
  • Fast: ~1sec for a route through Germany

for iPhone 6

  • Big Thanks goes to Tobias and Calin!
  • Works for iOS 7.0+ and OS X 10.10
  • might work for older versions
  • Xcode 6.0+
  • including a sample project →
slide-8
SLIDE 8

8

Demos

GraphHopper Maps https://graphhopper.com/maps

  • Online Maps powered by GraphHopper Directions API

In-Browser Offline Routing thanks to TeaVM https://graphhopper.com/teavm

  • Showcase usable in real world for hybrid solutions
  • Combine with pure JS solutions like instantnavi/ffwdme
slide-9
SLIDE 9

9

GraphHopper Use Cases

  • Point to point routing for car, bicycle, mountainbike,

motorbike, horse, foot, ambulance, wheelchair, ...

  • Track vehicles via map matching:

'snap' real world GPS points to digital road network

  • Urban planning
  • Traffic simulation
  • Isochrone calculation

= reachability for cars or bikes

  • For tourism e.g. find

neighbouring POIs

  • Graph traversal and statistics
  • Education
slide-10
SLIDE 10

10

GraphHopper Use Cases

  • Indoor routing
  • Warehouse optimizations
  • Tradeshow planning and visitor routing
  • Virtual reality games ala 'scotland yard'
  • Outdoor routing like biking
  • For logistics:

Fast route matrix calculation

… and more!

slide-11
SLIDE 11

11

Who uses GraphHopper?

  • GPSies: used a self-hosted GraphHopper and will

switch to our Directions API

  • Gnome: uses our API for the 'Maps' Desktop app
  • Komoot: we made routing over 500x faster than

home-grown routing engine

  • Some IT companies for the taxi sector
  • Several IT companies for logistics

OpenDoorLogistics, Optitool, market-ip, …

  • Rome2rio: multimodal routing
  • University Clausthal: education and traffic simulation

→ For Outdoor and Logistics!

slide-12
SLIDE 12

12

Who uses GraphHopper?

→ For Outdoor!

Komoot Route planning Route suggestions

Komoot Wearable

slide-13
SLIDE 13

13

Who uses GraphHopper?

A typical scenario: Get the optimal route to deliver 'goods' to many locations

  • With GraphHopper or our Matrix Add-on:

Calculate the distance matrix

  • With external software: Optimize order of

locations e.g. for one or more vehicle → For Logistics!

slide-14
SLIDE 14

14

Flexibility & Speedup Mode

The flexibility mode

  • allows customized queries
  • n-the-fly changes possible: e.g. prefer/avoid silent roads, steps, mountains
  • still fast: <1sec through entire Germany

The speedup mode (Contraction Hierarchies)

  • very fast queries: <50ms through Europe
  • requires preparation
  • smaller RAM usage per query
  • more RAM for base graph
slide-15
SLIDE 15

15

Numbers!

For Worldwide Scenario

For car: 130 mio edges, ~100 mio nodes

  • Takes ~1h to import and requires 20GB RAM
  • Using memory mapped configuration decreases RAM

but increases query and import time

  • To run this ~10GB are required

Speed-up mode

  • preparation takes ~2h (car) and requires 25GB
  • to run this 17GB are required

Comparable to the fastest commercial Maps APIs

  • for embedded or LAN queries even ~5x faster
slide-16
SLIDE 16

16

Numbers!

Routing API, Europe 20 via-points for 1 route

Disclaimer: of course, firebug is no scientific performance analysis ;)

slide-17
SLIDE 17

17

Numbers!

Same 20 points but use Matrix API → results in 380 distances

slide-18
SLIDE 18

18

Thanks!

  • Join Mailing list!
  • Get Started: graphhopper.com/#community
  • Sources & Issues at github.com/graphhopper
  • Twitter: @graphhopper
slide-19
SLIDE 19

19

Backup slides

slide-20
SLIDE 20

20

What is a Graph?

  • In a graph we have nodes and edges
  • In the real world we have junctions and streets
  • Edges and nodes get properties like position

Real world Graph

slide-21
SLIDE 21

21

Dijkstra

→ Input: one start and one end node

  • 1. nodeX := start node
  • 2. Get all neighboring nodes of nodeX
  • 3. Put distance of edges for those nodes into a

priority queue

later steps: add old distance

  • 4. nodeX : getMin(priority queue)
  • 5. Go to 1, break if nodeX == end node

→ Output: Smallest distance from start to end

Get final path via shortest path tree

slide-22
SLIDE 22

22

Bidirectional Dijkstra

  • Search from start and end at the same time
slide-23
SLIDE 23

23

A*

  • Goal directed approach:

investigate more 'appropriate' nodes first

  • Use linear distance

to estimate which node is 'appropriate'