Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsJul 3, 2026·3 min de lectura

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.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Valhalla Overview
Comando con revisión previa
npx -y tokrepo@latest install 5c765ffb-767a-11f1-9bc6-00163e2b0d79 --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

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

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados