Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 3, 2026·3 min de lecture

Valhalla — Open Source Multi-Modal Routing Engine

Valhalla is a C++ routing engine for OpenStreetMap with dynamic costing, tiled data storage, and support for driving, cycling, walking, and multi-modal transit routing.

Prêt pour agents

Installation avec revue préalable

Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Valhalla Overview
Commande avec revue préalable
npx -y tokrepo@latest install 5c765ffb-767a-11f1-9bc6-00163e2b0d79 --target codex

Dry-run d'abord, confirmez les écritures, puis lancez cette commande.

Introduction

Valhalla is a routing engine built by Mapzen (now maintained by the community and Mapbox contributors) that uses OpenStreetMap data stored in a tiled format. It supports dynamic costing, meaning route preferences can be adjusted at query time without reprocessing the entire graph.

What Valhalla Does

  • Computes routes for auto, bicycle, pedestrian, truck, motorcycle, and multi-modal profiles
  • Supports dynamic costing that adjusts penalties for highways, tolls, and ferries per request
  • Generates isochrone and isodistance polygons from any origin point
  • Matches GPS traces to the road network with its map matching service
  • Provides time-distance matrices for origin-destination analysis

Architecture Overview

Valhalla stores the road graph in a tiled format on disk, allowing incremental updates without full reprocessing. The routing algorithm uses a bidirectional A* search with dynamic edge costing evaluated at query time. Costing models define speed, access, and penalties per road type and can be parameterized in each request. The HTTP API (built with Prime Server) serves route, isochrone, matrix, and locate endpoints.

Self-Hosting & Configuration

  • Deploy with Docker using the ghcr.io/gis-ops/docker-valhalla/valhalla image
  • Provide OSM PBF files in the custom_files directory for automatic tile building
  • Configure costing defaults and service parameters in valhalla.json
  • Enable elevation by providing SRTM/ASTER tile data in the configuration
  • Run behind Nginx or Caddy for TLS termination and caching in production

Key Features

  • Dynamic costing lets users adjust route preferences (avoid tolls, prefer highways) per request
  • Tiled graph storage enables partial updates without rebuilding the entire dataset
  • Multi-modal routing combines walking segments with public transit schedules
  • Elevation-aware profiles that factor in grade for cycling and pedestrian routes
  • Compact tile format keeps a planet-wide dataset in manageable storage

Comparison with Similar Tools

  • OSRM — faster raw query speed, but uses static edge weights requiring full reprocessing
  • GraphHopper — Java-based, simpler configuration, but lacks dynamic costing flexibility
  • OpenTripPlanner — stronger transit routing, but heavier resource requirements
  • Google Maps Platform — cloud service with broader data, per-request pricing

FAQ

Q: What is dynamic costing? A: It means route cost factors (speed, penalties, access) are evaluated at query time rather than baked into preprocessed data, so different requests can use different preferences without rebuilding.

Q: Can Valhalla route with public transit? A: Yes. Valhalla supports multi-modal routing by combining walking segments with GTFS transit data when configured.

Q: How much disk space do tiles require? A: A planet-wide tile set is roughly 100-150 GB. Country-level extracts are typically 1-10 GB.

Q: How do I update map data? A: Replace the OSM PBF file and rebuild tiles. The tiled format supports incremental updates for changed regions.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires