-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor fixes #6655
Minor fixes #6655
Conversation
include/storage/storage_config.hpp
Outdated
".osrm.timestamp", | ||
".osrm.tls", | ||
".osrm.tld", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
osrm-backend/src/storage/storage.cpp
Lines 294 to 332 in 62e11fd
std::vector<std::pair<bool, boost::filesystem::path>> files = { | |
{IS_OPTIONAL, config.GetPath(".osrm.cells")}, | |
{IS_OPTIONAL, config.GetPath(".osrm.partition")}, | |
{IS_REQUIRED, config.GetPath(".osrm.icd")}, | |
{IS_REQUIRED, config.GetPath(".osrm.properties")}, | |
{IS_REQUIRED, config.GetPath(".osrm.nbg_nodes")}, | |
{IS_REQUIRED, config.GetPath(".osrm.ebg_nodes")}, | |
{IS_REQUIRED, config.GetPath(".osrm.tls")}, | |
{IS_REQUIRED, config.GetPath(".osrm.tld")}, | |
{IS_REQUIRED, config.GetPath(".osrm.timestamp")}, | |
{IS_REQUIRED, config.GetPath(".osrm.maneuver_overrides")}, | |
{IS_REQUIRED, config.GetPath(".osrm.edges")}, | |
{IS_REQUIRED, config.GetPath(".osrm.names")}, | |
{IS_REQUIRED, config.GetPath(".osrm.ramIndex")}}; | |
for (const auto &file : files) | |
{ | |
if (file.first == IS_REQUIRED && !boost::filesystem::exists(file.second)) | |
{ | |
throw util::exception("Could not find required file(s): " + std::get<1>(file).string()); | |
} | |
} | |
return files; | |
} | |
std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetUpdatableFiles() | |
{ | |
constexpr bool IS_REQUIRED = true; | |
constexpr bool IS_OPTIONAL = false; | |
std::vector<std::pair<bool, boost::filesystem::path>> files = { | |
{IS_OPTIONAL, config.GetPath(".osrm.mldgr")}, | |
{IS_OPTIONAL, config.GetPath(".osrm.cell_metrics")}, | |
{IS_OPTIONAL, config.GetPath(".osrm.hsgr")}, | |
{IS_REQUIRED, config.GetPath(".osrm.datasource_names")}, | |
{IS_REQUIRED, config.GetPath(".osrm.geometry")}, | |
{IS_REQUIRED, config.GetPath(".osrm.turn_weight_penalties")}, | |
{IS_REQUIRED, config.GetPath(".osrm.turn_duration_penalties")}}; |
| true | Names of the two major roads used. Can be empty if the route is too short.| | ||
| false | empty `string` | | ||
| steps | | | ||
|-------|-----------------------------------------------------------------------| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
osrm-backend/include/engine/api/route_api.hpp
Lines 913 to 917 in 62e11fd
if (parameters.steps) | |
{ | |
leg.summary = guidance::assembleSummary( | |
facade, path_data, phantoms.target_phantom, reversed_target); | |
The storage module had a stricter check. This keeps the IOConfig check in sync.
…eter. There is no summary parameter.
d8bf708
to
07b2337
Compare
".osrm.icd", | ||
".osrm.maneuver_overrides"}, | ||
{".osrm.hsgr", ".osrm.cells", ".osrm.cell_metrics", ".osrm.mldgr", ".osrm.partition"}, | ||
{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
osrm-backend/src/storage/storage.cpp
Lines 294 to 332 in 62e11fd
std::vector<std::pair<bool, boost::filesystem::path>> files = { | |
{IS_OPTIONAL, config.GetPath(".osrm.cells")}, | |
{IS_OPTIONAL, config.GetPath(".osrm.partition")}, | |
{IS_REQUIRED, config.GetPath(".osrm.icd")}, | |
{IS_REQUIRED, config.GetPath(".osrm.properties")}, | |
{IS_REQUIRED, config.GetPath(".osrm.nbg_nodes")}, | |
{IS_REQUIRED, config.GetPath(".osrm.ebg_nodes")}, | |
{IS_REQUIRED, config.GetPath(".osrm.tls")}, | |
{IS_REQUIRED, config.GetPath(".osrm.tld")}, | |
{IS_REQUIRED, config.GetPath(".osrm.timestamp")}, | |
{IS_REQUIRED, config.GetPath(".osrm.maneuver_overrides")}, | |
{IS_REQUIRED, config.GetPath(".osrm.edges")}, | |
{IS_REQUIRED, config.GetPath(".osrm.names")}, | |
{IS_REQUIRED, config.GetPath(".osrm.ramIndex")}}; | |
for (const auto &file : files) | |
{ | |
if (file.first == IS_REQUIRED && !boost::filesystem::exists(file.second)) | |
{ | |
throw util::exception("Could not find required file(s): " + std::get<1>(file).string()); | |
} | |
} | |
return files; | |
} | |
std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetUpdatableFiles() | |
{ | |
constexpr bool IS_REQUIRED = true; | |
constexpr bool IS_OPTIONAL = false; | |
std::vector<std::pair<bool, boost::filesystem::path>> files = { | |
{IS_OPTIONAL, config.GetPath(".osrm.mldgr")}, | |
{IS_OPTIONAL, config.GetPath(".osrm.cell_metrics")}, | |
{IS_OPTIONAL, config.GetPath(".osrm.hsgr")}, | |
{IS_REQUIRED, config.GetPath(".osrm.datasource_names")}, | |
{IS_REQUIRED, config.GetPath(".osrm.geometry")}, | |
{IS_REQUIRED, config.GetPath(".osrm.turn_weight_penalties")}, | |
{IS_REQUIRED, config.GetPath(".osrm.turn_duration_penalties")}}; |
Issue
A couple of minor issues spotted whilst working on optional data loading.
Correct HTTP docs to reflect
summary
output dependency onsteps
parameter.There is no
summary
parameter.Ensure required file check in
osrm-routed
is correctly enforced.The storage module has a stricter check. This keeps the
IOConfig
check in sync.Tasklist