From 7c41edf7c678db52e0391a45f3f6f46394057fd4 Mon Sep 17 00:00:00 2001 From: Jonas Klasen Date: Thu, 23 Apr 2026 17:43:10 +0200 Subject: [PATCH 1/2] Enhance README and documentation with compatibility details, usage examples, and improved descriptions. Update installation instructions and correct copyright year. Adjust example code for clarity and consistency. --- README.md | 38 +++++++++++++++++++++++++------------- docs/src/examples.md | 12 ++++++------ docs/src/index.md | 23 ++++++++++++++++------- 3 files changed, 47 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index bbdde53..eb11706 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,16 @@ # OpenSourceRoutingMachine.jl -A thin Julia wrapper for OSRM (Open Source Routing Machine), a high-performance tool for route planning in road networks. +[License: MIT](LICENSE) +[OSRM Version](https://github.com/Project-OSRM/osrm-backend/releases/tag/v26.4.0) + +A thin Julia wrapper for [OSRM](https://project-osrm.org/) (Open Source Routing Machine), a high-performance routing engine for road networks. +Use it to build routing graphs from OpenStreetMap data and query them for routes, duration/distance matrices, map matching, and more — all from within Julia. + +## Compatibility + +- **Julia**: ≥ 1.11 +- **OSRM**: v26.4.0 (bundled via [OSRM_jll](https://github.com/JuliaBinaryWrappers/OSRM_jll.jl) and [libosrmc_jll](https://github.com/JuliaBinaryWrappers/libosrmc_jll.jl)) +- **Platforms**: Linux (x86_64), macOS (x86_64, aarch64). Windows support is planned. ## Modules @@ -19,14 +29,16 @@ The rest of the functionality is organized in submodules with the following feat - **Tile**: Retrieve road network geometry as vector tiles All modules expose the full configuration and parameter handling API of OSRM through setter and getter functions, providing fine-grained control over query behavior. -The output format is restricted to FlatBuffers for all modules except the Tile module. -The Tile module returns road network geometry in MVT format (Protocol Buffer Format). + +All query modules (Nearest, Route, Table, Match, Trip) return by default an object whose types are auto-generated (see `gen/generate.jl`) from OSRM's FlatBuffers schema files. Alternatively, one can receive the binary FlatBuffers response directly. + +The Tile module is the exception — it returns road network geometry in MVT format (Mapbox Vector Tiles). ## Installation ```julia using Pkg -Pkg.add(url="https://github.com/moviro-hub/OpenSourceRoutingMachine.jl") +Pkg.add("OpenSourceRoutingMachine") ``` ## Usage examples @@ -149,15 +161,15 @@ using OpenSourceRoutingMachine.Table params = TableParams() # Add coordinates first -add_coordinate!(params, Position(9.9937, 53.5511)) # Index 0 -add_coordinate!(params, Position(9.9882, 53.6304)) # Index 1 -add_coordinate!(params, Position(9.9667, 53.5417)) # Index 2 -add_coordinate!(params, Position(9.9352, 53.5528)) # Index 3 +add_coordinate!(params, Position(9.9937, 53.5511)) +add_coordinate!(params, Position(9.9882, 53.6304)) +add_coordinate!(params, Position(9.9667, 53.5417)) +add_coordinate!(params, Position(9.9352, 53.5528)) # Mark which coordinates are origins and destinations -add_source!(params, 0) -add_source!(params, 1) -add_destination!(params, 2) -add_destination!(params, 3) +add_source!(params, 1) # first coordinate +add_source!(params, 2) # second coordinate +add_destination!(params, 3) # third coordinate +add_destination!(params, 4) # fourth coordinate # see the documentation for more parameters response = table(osrm, params) @@ -227,6 +239,6 @@ set_z!(params, 13) # Zoom level response = tile(osrm, params) ``` -Copyright (c) 2025 MOVIRO GmbH +Copyright (c) 2025–2026 MOVIRO GmbH Licensed under the MIT License. diff --git a/docs/src/examples.md b/docs/src/examples.md index b45ca54..51a9d2a 100644 --- a/docs/src/examples.md +++ b/docs/src/examples.md @@ -118,15 +118,15 @@ using OpenSourceRoutingMachine.Table params = TableParams() # Add coordinates first -add_coordinate!(params, Position(9.9937, 53.5511)) # Index 0 -add_coordinate!(params, Position(9.9882, 53.6304)) # Index 1 -add_coordinate!(params, Position(9.9667, 53.5417)) # Index 2 -add_coordinate!(params, Position(9.9352, 53.5528)) # Index 3 +add_coordinate!(params, Position(9.9937, 53.5511)) +add_coordinate!(params, Position(9.9882, 53.6304)) +add_coordinate!(params, Position(9.9667, 53.5417)) +add_coordinate!(params, Position(9.9352, 53.5528)) # Mark which coordinates are origins and destinations -add_source!(params, 0) add_source!(params, 1) -add_destination!(params, 2) +add_source!(params, 2) add_destination!(params, 3) +add_destination!(params, 4) # see the documentation for more parameters response = table(osrm, params) diff --git a/docs/src/index.md b/docs/src/index.md index 9a32ac6..859afde 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,14 +1,21 @@ # OpenSourceRoutingMachine.jl -A thin Julia wrapper for OSRM (Open Source Routing Machine), a high-performance tool for route planning in road networks. +A thin Julia wrapper for [OSRM](https://project-osrm.org/) (Open Source Routing Machine), a high-performance routing engine for road networks. +Use it to build routing graphs from OpenStreetMap data and query them for routes, duration/distance matrices, map matching, and more — all from within Julia. + +## Compatibility + +- **Julia**: ≥ 1.11 +- **OSRM**: v26.4.0 (bundled via [OSRM_jll](https://github.com/JuliaBinaryWrappers/OSRM_jll.jl) and [libosrmc_jll](https://github.com/JuliaBinaryWrappers/libosrmc_jll.jl)) +- **Platforms**: Linux (x86_64), macOS (x86_64, aarch64). Windows support is planned. ## Modules -The package structure consists of a core module and service submodules. +The package structure consists of a core module and several submodules. The core module `OpenSourceRoutingMachine` provides the constructor `OSRM` for creating an OSRM instance and setter and getter functions for basic configuration. -The rest of the functionality is organized in service submodules with the following scope: +The rest of the functionality is organized in submodules with the following features: - **Graph**: Builds OSRM graphs from OpenStreetMap data - **Nearest**: Find the nearest waypoint in a road network for a given position @@ -19,17 +26,19 @@ The rest of the functionality is organized in service submodules with the follow - **Tile**: Retrieve road network geometry as vector tiles All modules expose the full configuration and parameter handling API of OSRM through setter and getter functions, providing fine-grained control over query behavior. -The output format is restricted to FlatBuffers for all modules except the Tile module. -The Tile module returns road network geometry in MVT format. + +All query modules (Nearest, Route, Table, Match, Trip) return by default an object whose types are auto-generated (see `gen/generate.jl`) from OSRM's FlatBuffers schema files. Alternatively, one can receive the binary FlatBuffers response directly. + +The Tile module is the exception — it returns road network geometry in MVT format (Mapbox Vector Tiles). ## Installation ```julia using Pkg -Pkg.add("OpenSourceRoutingMachine", url="https://github.com/moviro-hub/OpenSourceRoutingMachine.jl") +Pkg.add("OpenSourceRoutingMachine") ``` -See the `Examples` section for end-to-end usage patterns. +See the [Examples](@ref) section for end-to-end usage patterns. ## API Reference From 2193884797812ff647bcc53c10d91c0c0612b3ad Mon Sep 17 00:00:00 2001 From: Jonas Klasen Date: Thu, 23 Apr 2026 17:48:21 +0200 Subject: [PATCH 2/2] cleanup --- docs/src/index.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 859afde..1da85b2 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -3,12 +3,6 @@ A thin Julia wrapper for [OSRM](https://project-osrm.org/) (Open Source Routing Machine), a high-performance routing engine for road networks. Use it to build routing graphs from OpenStreetMap data and query them for routes, duration/distance matrices, map matching, and more — all from within Julia. -## Compatibility - -- **Julia**: ≥ 1.11 -- **OSRM**: v26.4.0 (bundled via [OSRM_jll](https://github.com/JuliaBinaryWrappers/OSRM_jll.jl) and [libosrmc_jll](https://github.com/JuliaBinaryWrappers/libosrmc_jll.jl)) -- **Platforms**: Linux (x86_64), macOS (x86_64, aarch64). Windows support is planned. - ## Modules The package structure consists of a core module and several submodules.