-
Notifications
You must be signed in to change notification settings - Fork 660
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
add matrix to gurka #3793
add matrix to gurka #3793
Conversation
418e2a5
to
2728c7b
Compare
std::string build_valhalla_request(const std::vector<std::string>& location_types, | ||
const std::vector<std::vector<midgard::PointLL>>& waypoints, |
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.
these are now vectors of their previous types as to not have to overload this internal function
valhalla::Api do_action(const valhalla::Options::Action& action, | ||
const map& map, | ||
const std::vector<std::string>& sources, | ||
const std::vector<std::string>& targets, | ||
const std::string& costing, | ||
const std::unordered_map<std::string, std::string>& options, | ||
std::shared_ptr<valhalla::baldr::GraphReader> reader, | ||
std::string* response, | ||
std::string* request_json) { |
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.
another overload, unfortunately. I could've changed the signature of the do_action
but it's public so I'd have to change every gurka test almost.
test/gurka/test_matrix.cc
Outdated
TEST(MatrixTest, MatrixSimple) { | ||
constexpr double gridsize = 100; | ||
|
||
// the grid below is 50 x 100 meters at 36 km/h, i.e. 10 m/s | ||
const std::string ascii_map = R"( | ||
A----B | ||
| | | ||
| | | ||
C----D | ||
)"; |
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.
Just a small dumb test to show it works. Unfortunately, there's nothing relevant inside the Api
object that gets returned from do_action
as we don't track stuff in PBF for matrix. We can only predict the distance
but that could be fair enough with the right map
Co-authored-by: Kevin Kreiser <kevinkreiser@gmail.com>
fixes #3776
I think it'll be useful when dealing with adding time info to matrix.