Open Source Routing Machine - C++ backend
c-plus-pluscppcpp17isochronesmap-matchingopenstreetmaposmosrmroutingrouting-enginetraveling-salesman
With C++11 the stdlib gains: - `std::stoi` function family to convert from `std::string` to integral type - `std::to_string` to convert from number types to `std::string` The only reason for hand-writing the conversion code therefore is performance. I benchmarked an `osrm-extract` with the hand-written code against one with the stdlib conversion features and could not find any significant difference (we switch back and forth between C++ and Lua, shaving off a few us in conversion doesn't gain us much). Formatting arithmetic types in the default format with given precision requires streams, but is doable in a few lines of idiomatic stdlib code. For this, there is now the following function template available: template <Arithmetic T, int Precision = 6> inline std::string to_string_with_precision(const T); that requires integral or floating point types and returns a formatted string in the defaukt format with the given precision applied. In addition this completely rips out Boost.Spirit from the `casts.hpp` header, resulting in faster compile times. Boom! References: - http://en.cppreference.com/w/cpp/string/basic_string/stol - http://en.cppreference.com/w/cpp/string/basic_string/to_string - http://www.kumobius.com/2013/08/c-string-to-int/ |
||
---|---|---|
algorithms | ||
benchmarks | ||
cmake | ||
config | ||
contractor | ||
data_structures | ||
descriptors | ||
docker | ||
extractor | ||
features | ||
include/osrm | ||
library | ||
plugins | ||
profiles | ||
routing_algorithms | ||
scripts | ||
server | ||
test | ||
third_party | ||
tools | ||
unit_tests | ||
util | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
appveyor-build.bat | ||
appveyor.yml | ||
build-local.bat | ||
CMakeLists.txt | ||
datastore.cpp | ||
Doxyfile.in | ||
extract.cpp | ||
Gemfile | ||
Gemfile.lock | ||
LICENCE.TXT | ||
prepare.cpp | ||
profile.lua | ||
Rakefile | ||
README.md | ||
routed.cpp | ||
taginfo.json | ||
typedefs.h |
About
The Open Source Routing Machine is a high performance routing engine written in C++11 designed to run on OpenStreetMap data.
Current build status
build config | branch | status |
---|---|---|
Linux | master | ![]() |
Linux | develop | ![]() |
Windows | master/develop | |
LUAbind fork | master | ![]() |
Building
For instructions on how to build and run OSRM, please consult the Wiki.
To quickly try OSRM use our free and daily updated online service
Documentation
See the Wiki's server API documentation as well as the library API documentation
References in publications
When using the code in a (scientific) publication, please cite
@inproceedings{luxen-vetter-2011,
author = {Luxen, Dennis and Vetter, Christian},
title = {Real-time routing with OpenStreetMap data},
booktitle = {Proceedings of the 19th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems},
series = {GIS '11},
year = {2011},
isbn = {978-1-4503-1031-4},
location = {Chicago, Illinois},
pages = {513--516},
numpages = {4},
url = {http://doi.acm.org/10.1145/2093973.2094062},
doi = {10.1145/2093973.2094062},
acmid = {2094062},
publisher = {ACM},
address = {New York, NY, USA},
}