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

GraphHopper — Fast Open Source Route Planning Engine

GraphHopper is a Java-based routing engine using OpenStreetMap data that supports driving, cycling, walking, and custom vehicle profiles with isochrone and map matching APIs.

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
GraphHopper Overview
Comando con revisión previa
npx -y tokrepo@latest install 46817733-767a-11f1-9bc6-00163e2b0d79 --target codex

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

Introduction

GraphHopper is a routing engine written in Java that computes fast paths on OpenStreetMap road networks. It supports multiple vehicle profiles, turn costs, elevation data, and advanced features like isochrones, map matching, and route optimization out of the box.

What GraphHopper Does

  • Calculates point-to-point routes with distance, time, and geometry for any vehicle profile
  • Generates isochrone polygons showing reachable areas within a given time or distance
  • Matches GPS traces to road segments with its map matching API
  • Solves vehicle routing problems (VRP) via the jsprit-based optimization API
  • Supports elevation-aware routing using SRTM or CGIAR elevation data

Architecture Overview

GraphHopper preprocesses OSM data into a contraction hierarchy or landmark-based graph stored on disk and memory-mapped for fast access. The routing server exposes a REST API built on Dropwizard. Custom profiles are defined in YAML, specifying vehicle dimensions, speed factors, and access restrictions. The modular architecture allows swapping shortest-path algorithms and adding custom weightings.

Self-Hosting & Configuration

  • Download the JAR file or build from source with Maven
  • Provide an OSM PBF file and a YAML configuration file
  • Define vehicle profiles in the config with speed, access, and turn cost settings
  • Enable elevation by specifying an SRTM data provider in the configuration
  • Deploy with Docker using the official graphhopper/graphhopper image

Key Features

  • Multiple routing profiles (car, bike, foot, motorcycle, truck) configurable via YAML
  • Isochrone API for computing reachable regions within time or distance thresholds
  • Route optimization API for solving multi-stop vehicle routing problems
  • Elevation-aware routing that accounts for hills in cycling and walking profiles
  • Flexible custom model system for adjusting speeds and priorities per road type

Comparison with Similar Tools

  • OSRM — C++ based, faster raw speed, but less flexible profiles and no built-in isochrones
  • Valhalla — multi-modal with transit support, dynamic costing, tiled storage model
  • OpenTripPlanner — focused on public transit with multi-modal routing
  • pgRouting — SQL-integrated, useful for spatial analysis, slower for real-time applications

FAQ

Q: What languages does GraphHopper support? A: The core is Java with a REST API usable from any language. JavaScript, Python, and other client libraries are available.

Q: Can it handle truck routing with vehicle dimensions? A: Yes. Define truck profiles with height, width, weight, and length restrictions in the YAML config.

Q: How large a dataset can it handle? A: It can route on a planet-scale dataset. A full planet import requires roughly 20-30 GB of heap memory.

Q: Does it support real-time traffic? A: GraphHopper supports speed updates via its custom model system, enabling integration with live traffic feeds.

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