Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: enable last intersection of last step before a via point#3176

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
karussell merged 8 commits intographhopper:masterfromOlafFlebbeBosch:intersection
Aug 7, 2025

Conversation

@OlafFlebbeBosch
Copy link
Contributor

@OlafFlebbeBoschOlafFlebbeBosch commentedJul 4, 2025
edited
Loading

We noticed that intersections are not populated on the arrival intersection on both OSRM and mapbox directions creating issues to pass VIA points in navigation.

  • rename instructionJson to stepJson, since it is about the step Json object
  • Adding an ManeuverType enum to better document the Maneuver we are going to create
  • Handle ManeuverTypes and TurnTypes differently, since they are different concepts, sharing some values but not all
  • Fix typo bearingsArray vs bearingsrray
  • rename isFirstInstructionOfLeg to isDepartInstruction and use maneuverType in the subroutines instead
  • rename fixFirstIntersectionDetail to fixDepartIntersectionDetail since intersections have to be fixed on every leg
  • fix one test setup and one test
    @boldtrn would you please have a look ?

@OlafFlebbeBoschOlafFlebbeBosch changed the titlefix: enable last intersection of last step of via pointsfix: enable last intersection of last step before a via pointsJul 4, 2025
@OlafFlebbeBoschOlafFlebbeBosch changed the titlefix: enable last intersection of last step before a via pointsfix: enable last intersection of last step before a via pointJul 4, 2025
/**
* fix the first IntersectionDetail.
* <p>
* The first Intersection of the first step should only have one "bearings" and one
Copy link
Member

Choose a reason for hiding this comment

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

The comments should be updated as well :)

OlafFlebbeBosch reacted with thumbs up emoji
* "out" entry
*/
privatestaticvoidfixFirstIntersectionDetail(List<PathDetail>intersectionDetails) {
privatestaticvoidfixDepartIntersectionDetail(List<PathDetail>intersectionDetails,intpos) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the name pos, can you rename this to something that explains what pos is?

Copy link
Member

@boldtrnboldtrn left a comment

Choose a reason for hiding this comment

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

I did setup this PR on a test server and tried to use the routing in combination with Maplibre-Navigation-Android. This worked fine as well, so we haven't broken anything here as well.

Copy link
Member

@boldtrnboldtrn left a comment

Choose a reason for hiding this comment

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

Sorry, I just found this issue that can occur in some situations when using Maplibre Navigation, this can lead to a nullpointer because the modifier is missing.

Copy link
Member

@boldtrnboldtrn left a comment

Choose a reason for hiding this comment

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

LGTM, just gave this another try with Maplibre after the latest change.

@OlafFlebbeBosch
Copy link
ContributorAuthor

Rebased and fixed an edge case

@karussellkarussell added this to the11.0 milestoneJul 22, 2025
request.addPoint(newGHPoint(42.505144,1.526113));
request.addPoint(newGHPoint(42.50529,1.527218));
request.setProfile(profile);
request.setProfile(profile).setPathDetails(Collections.singletonList("intersection"));
Copy link
Member

Choose a reason for hiding this comment

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

minor: can you check the formatting here and elsewhere in this file?

OlafFlebbeBosch reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

done

@karussellkarussell merged commit5b1f142 intographhopper:masterAug 7, 2025
@karussell
Copy link
Member

karussell commentedAug 7, 2025
edited
Loading

There is a now test failure in master. And if I changenull to "straight":

assertEquals("straight", maneuver.get("modifier").asText());

it runs fine. Is this expected or did I something wrong when merging?

karussell added a commit that referenced this pull requestAug 7, 2025
@boldtrn
Copy link
Member

There is a now test failure in master. And if I change null to "straight":

Actually depart usually has no modifier IIRC. I am not sure this will break anything, if there is a modifier - I would not expect it to (at least for Maplibre I would expect the impact to be rather low)

@OlafFlebbeBosch
Copy link
ContributorAuthor

Sorry, I am not sure why this slipped through. And agree to@boldtrn , it shouldn't have a modifier. Looking into why that happend

@karussell
Copy link
Member

karussell commentedAug 8, 2025
edited
Loading

Hm, this is now just as it was before the merge of this PR:

assertEquals("straight",maneuver.get("modifier").asText());

@boldtrn
Copy link
Member

Hm, this is now just as it was before the merge of this PR

Ah sorry, I must have missed this, OK, if we have always added a modifier here, then this is probably not an issue, so all good from my side then.

@oflebbe
Copy link
Contributor

Looks like i introduced the change with a previous attempt fixing and somehow the test didnt trigger w/o a mvn clean on my side

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

Reviewers

@karussellkarussellkarussell left review comments

@boldtrnboldtrnboldtrn approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

11.0

Development

Successfully merging this pull request may close these issues.

4 participants

@OlafFlebbeBosch@karussell@boldtrn@oflebbe

[8]ページ先頭

©2009-2025 Movatter.jp