Skip to content
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

Added trip service #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added trip service #20

wants to merge 1 commit into from

Conversation

srimaln91
Copy link

No description provided.

@daniel-j-h
Copy link
Owner

daniel-j-h commented May 1, 2020 via email

}
} catch (const std::exception& e) {
osrmc_error_from_exception(e, error);
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these annotation features needed for the trip service?

If you want them in, can you split it at least into two commits please.

auto* params_typed = reinterpret_cast<osrm::TripParameters*>(params);

if (first)
params_typed->source = osrm::TripParameters::SourceType::First;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

void osrmc_trip_params_add_destination(osrmc_trip_params_t params, bool last, osrmc_error_t* error) try {
auto* params_typed = reinterpret_cast<osrm::TripParameters*>(params);
if (last)
params_typed->destination = osrm::TripParameters::DestinationType::Last;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@daniel-j-h
Copy link
Owner

Looks good overall; I left some smaller comments inline.

General note: the trip service in osrm is pretty basic. We should probably add a note to the readme pointing the user e.g. to https://github.com/mapbox/node-or-tools which works on top of the distance table.

@daniel-j-h
Copy link
Owner

@srimaln91 do you still want to run out the suggested changes and then bring it in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants