Intro to Valhalla



Valhalla is a multi-purpose routing engine originally created by Mapzen's mobility team, which was led by and included the founders of Interline. Now, Valhalla is also used by organizations like Mapillary (street imagery), Mapbox (mapping APIs), Tesla (electric cars), and Sidewalk Labs (urban real-estate development and operations). Valhalla is open-source (MIT license) and is maintained by many contributors.

Interline continues its involvement in open-source Valhalla, providing a variety of products and services to help organizations and individuals use Valhalla.

What functions can Valhalla perform?

schematic example of a turn-by-turn route
turn-by-turn directions

Plan trips from Point A to Point B — and any number of other destinations.

schematic example of a time/distance matrix
time/distance matrixes

Rapidly calculate travel distances and times between many locations.

schematic example of an optimized route
optimized routes

Plan the shortest route to visit many locations (a.k.a. traveling salesman).

schematic example of an access isochrone
access isochrones

Compute the boundaries of how far one can travel in 15 minutes, 30 minutes, and so on from an origin location.

schematic example of a location-to-map match
location-to-map matches

Snap GPS probe data (or location data from another "noisy" source) with roadways and other elements of a transportation network.

What makes Valhalla unique?

🌎 OpenStreetMap
Valhalla is designed to work with the rich data model of OpenStreetMap. It normalizes a wide range of tags into a consistent roadway hierarchy. It applies country-specific parameters to handle different laws (e.g., drive on right vs. on left) and default speed limits.
📜 Narrative guidance
When generating turn-by-turn routes, Valhalla generates rich narrative guidance that's available in multiple languages. Without duplicative manuevers (no unnecessary instructions to "continue"). Ready for output as text-to-speech (TTS) on a smartphone.
🚌 Multimodal
Valhalla supports many travel modes: auto, high-occupany auto, bicycle, motor scooter, pedestrian, and public transit.
⚙️ Dynamic costing
All of Valhalla's travel modes can be customized on the fly by changing costing parameters in each query.
Tiled data structure
Valhalla generates and consumes its routing graph as tiles. This format allows an instance of Valhalla to scale to cover the entire planet, or to be specific to one metropolitan region.
📱 Embeddable
Valhalla is primarily written in C++. It can be used for embedded applications in auto infotainment systems, on iOS, and on Android.

When is an alternative more appropriate?

🚌 Public Transit Agencies
Valhalla can provide worldwide transit routing, using data ingested from Transitland. However, Valhalla does not currently provide all the options that a public transit agency may want to offer to their riders. Thus, we suggest that public transit agencies wanting to offer a trip planning portal instead use OpenTripPlanner (OTP).
🚦 Traffic-influenced Routing
Valhalla cannot accept real-time or historical traffic data in a drop-in fashion. While at Mapzen, we created a fully working prototype of traffic-influenced routing in Valhalla. However, for production applications that require routing and ETAs that fully factor in traffic conditions, we recommend HERE Routing or Google Maps APIs.

How can I run Valhalla?

Docker

Valhalla is distributed as a Docker container. Easy to run on your Windows or Mac computer for testing. Deploy to GCP Kubernetes Engine, AWS Elastic Container Service, or another container scheduler. more info

Mac OS

Valhalla can be compiled from source and installed on Mac OS using the Homebrew package manager. more info

Linux

Valhalla is distributed as PPA packages for Ubuntu and similar distributions of Linux. more info

How can Interline help me to use Valhalla?

We recommend Valhalla Tilepacks if you:

  • want to control your own Valhalla server(s)
  • know how to deploy Docker containers or PPA packages
  • don't want to run an entire Valhalla tile build pipeline
  • want to get started quickly

We recommend Interline's hosted global Valhalla APIs, offered through RapidAPI.com, if you:

  • don't know how to manage servers
  • want to test with free API access (pay only for higher rates of API usage)
  • want to get started very quickly