Skip to content

fix: Mapbox Arrival and Destinations assumptions - #3062

Merged
karussell merged 1 commit into
graphhopper:masterfrom
OlafFlebbeBosch:master
Oct 15, 2024
Merged

karussell merged 1 commit into
graphhopper:masterfrom
OlafFlebbeBosch:master

Conversation

@OlafFlebbeBosch

Copy link
Copy Markdown
Contributor

We learned that there are some implicit assumptions about the structure of the Directions Reponse.
The Start has to have exactly one outgoing "entry" with a corresponding bearing, while the destination needs to have exactly one incoming "entry".

All test case setup should be done with "intersections" on, since bearings are mandatory for directions.

@boldtrn boldtrn Oct 11, 2024 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
* The first Intersection of the first step should only have 1 bearing and one "out" entry
* The first Intersection of the first step should only have one "bearings" and one "out" entry

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is only job1, no job2? Maybe this comment should be removed, as it doesn't really help?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed outdfated comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't fully understand that. Why don't we copy the last element? The method is called fixFirstIntersectionDetail after all. We don't add a fixed version of the lat intersectionDetail here as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

moved the fixFirstIntersectionDetail one level up and it is now really doing only the first Intersection

@boldtrn boldtrn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for working on this and I agree, we should keep the results as close to the OSRM compatible equivalents as possible. I added a few remarks in the code that I think we should look at before merging this.

 Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
@OlafFlebbeBosch

Copy link
Copy Markdown
Contributor Author

I think I adressed the comments, but the git fork got out of sync and I had to rewrite the PR. Sorry
@boldtrn

@karussell

Copy link
Copy Markdown
Member

Are these changes compatible with the Maplibre SDK too?

@boldtrn

boldtrn commented Oct 15, 2024

Copy link
Copy Markdown
Member

Are these changes compatible with the Maplibre SDK too?

Yes they are, the change to the response format is pretty small as it only changes parts of the first and last intersection.

@karussell karussell added this to the 10.0 milestone Oct 15, 2024
@karussell
karussell merged commit 136309c into graphhopper:master Oct 15, 2024
@karussell

Copy link
Copy Markdown
Member

Ok, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants