#7047: Nearest api returning node with id 0#7048
Open
muteebali wants to merge 2 commits intoProject-OSRM:masterfrom
Open
#7047: Nearest api returning node with id 0#7048muteebali wants to merge 2 commits intoProject-OSRM:masterfrom
muteebali wants to merge 2 commits intoProject-OSRM:masterfrom
Conversation
|
This PR seems to be stale. Is it still relevant? |
|
@jcoupey any idea on when this PR can be merged into the master? |
Collaborator
|
i have this on my plate for the coming week. |
Collaborator
|
Change looks good to me. What we'd need is a test case that fails without this change and succeeds with it. |
afarber
suggested changes
Aug 29, 2025
| forward_geometry(phantom_node.fwd_segment_position - 1)); | ||
| from_node = static_cast<std::uint64_t>(osm_node_id); | ||
| } | ||
| else if (phantom_node.fwd_segment_position == 0) |
Contributor
There was a problem hiding this comment.
Wouldn't this be more readable?
else if (phantom_node.forward_segment_id.enabled && phantom_node.fwd_segment_position == 0)
{
// At the very beginning of a one-way forward geometry.
// Segment runs from the first OSM node to the second OSM node.
// We require at least 2 nodes in forward_geometry to form a valid edge.
BOOST_ASSERT(forward_geometry.size() >= 2);
auto from_osm_node = facade.GetOSMNodeIDOfNode(forward_geometry[0]);
auto to_osm_node = facade.GetOSMNodeIDOfNode(forward_geometry[1]);
from_node = static_cast<std::uint64_t>(from_osm_node);
to_node = static_cast<std::uint64_t>(to_osm_node);
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Bug: Nearest api returning node with id 0
Tasklist
Snapshot of bug fix
FYI @jcoupey