Add --output option to osrm-extract for custom output base path#7349
Merged
DennisOSRM merged 3 commits intoProject-OSRM:masterfrom Feb 16, 2026
Merged
Add --output option to osrm-extract for custom output base path#7349DennisOSRM merged 3 commits intoProject-OSRM:masterfrom
DennisOSRM merged 3 commits intoProject-OSRM:masterfrom
Conversation
4d959f0 to
540fea6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a --output (-o) option to osrm-extract to allow users to specify a custom output base path for generated files. This addresses issue #4930, enabling users to extract the same OSM file with different routing profiles without creating symbolic links to the input file.
Changes:
- Added
output_pathfield toExtractorConfigfor storing the custom output base path - Modified
osrm-extractCLI to accept--output/-ooption and use it to set output file paths - Added unit test to verify extraction with custom output path
- Updated documentation to explain the new feature with examples
- Updated CHANGELOG.md with the new feature
- Modified .gitignore pattern to handle test output files with custom names
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| include/extractor/extractor_config.hpp | Added output_path field to store custom output base path |
| src/tools/extract.cpp | Added CLI option parsing for --output/-o and logic to use custom path when provided |
| unit_tests/library/extract.cpp | Added test case to verify extraction with custom output path |
| docs/profiles.md | Added documentation section explaining how to use multiple profiles with the same input file |
| CHANGELOG.md | Added entry documenting the new feature |
| .gitignore | Updated pattern to ignore test output files with custom names (monaco*.osrm*) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
540fea6 to
0d11db1
Compare
DennisOSRM
approved these changes
Feb 16, 2026
MarcelloPerathoner
pushed a commit
to MarcelloPerathoner/osrm-backend
that referenced
this pull request
Feb 24, 2026
…ect-OSRM#7349) * Add --output option to osrm-extract for custom output base path * Verify more output files in custom output path extract test --------- Co-authored-by: Dennis Luxen <info@project-osrm.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #4930
This PR adds an
-o/--outputoption toosrm-extractso users can specify a custom output base path. This allows using the same OSM file with different routing profiles to generate separate output files without needing symbolic links.Example usage:
Tasklist
Requirements / Relations
None