-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Return name and ref response fields separately #2857
Conversation
@emiltin this will finally provide separate Which also means your parsing code will probably have to change. Just keeping you in the loop here. |
Tasks
|
@@ -16,7 +16,7 @@ Feature: Bike - Street names in instructions | |||
|
|||
When I route I should get | |||
| from | to | route | | |||
| a | c | My Way (A6),Your Way (A7),Your Way (A7) | | |||
| a | c | My Way,Your Way,Your Way | |
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 have to be added as an additional check instead of being removed | route | ref |
... or something like this. References are an essential part of guidance checks.
thanks @daniel-j-h for the update |
- Guidance | ||
- Handle Access tags for lanes, only considering valid lanes in lane-guidance (think car | car | bike | car) | ||
- API: | ||
- `annotations=true` now returns the data source id for each segment as `datasources` | ||
- Reduced semantic of merge to refer only to merges from a lane onto a motorway-like road | ||
- new `ref` field in the `RouteStep` object |
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.
What is is good for? Also maybe a note about "name (ref)" -> name
, ref
.
8fdb350
to
9823778
Compare
| waypoints | route | turns | | ||
| a,o | Schwarzwaldstrasse (L561),Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | | ||
| waypoints | route | turns | ref | | ||
| a,o | Schwarzwaldstrasse,Ettlinger Allee,Ettlinger Allee | depart,turn right,arrive | L561,L561, | |
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.
Before it was a single ref, now it's two refs?
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.
Looks like in post-processing, whenever name gets updated, refs are not getting updated accordingly
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.
This is actually an existing bug where in post-processing we don't properly update collapsed steps with the correct destination and pronunciation data along with name. PR coming for this fix, which can then include moving ref
in preprocessing as well.
From discussion in chat. We are trying to include this in 5.4.0. I updated the milestone accordingly |
@@ -39,7 +54,7 @@ class ExtractorCallbacks | |||
// used to deduplicate street names and street destinations: actually maps to name ids | |||
using MapKey = std::tuple<std::string, std::string, std::string>; | |||
using MapVal = unsigned; | |||
std::unordered_map<MapKey, MapVal, boost::hash<MapKey>> string_map; | |||
std::unordered_map<MapKey, MapVal, std::hash<MapKey>> string_map; |
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.
std::hash
is the default, you can remove this. See http://en.cppreference.com/w/cpp/container/unordered_map
@@ -26,7 +26,7 @@ Feature: Foot - Way ref | |||
|
|||
When I route I should get | |||
| from | to | route | | |||
| a | b | E7,E7 | | |||
| a | b | {highway:primary},{highway:primary} | | |||
|
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.
align table
With @karenzshea's name / ref split (ref. #2857) in master we want to make use of it and reduce `NewName` instructions when ever possible. This is a first step towards #2744 by using the already existing name change heuristic from the extractor now in post-processing as well. Limitations: at the moment we don't have the `SuffixTable` in post-processing; this would require us serializing and subsequently deserializing the table, passing it through from the profiles to the API.
With @karenzshea's name / ref split (ref. #2857) in master we want to make use of it and reduce `NewName` instructions when ever possible. This is a first step towards #2744 by using the already existing name change heuristic from the extractor now in post-processing as well. Limitations: at the moment we don't have the `SuffixTable` in post-processing; this would require us serializing and subsequently deserializing the table, passing it through from the profiles to the API.
With @karenzshea's name / ref split (ref. #2857) in master we want to make use of it and reduce `NewName` instructions when ever possible. This is a first step towards #2744 by using the already existing name change heuristic from the extractor now in post-processing as well. Limitations: at the moment we don't have the `SuffixTable` in post-processing; this would require us serializing and subsequently deserializing the table, passing it through from the profiles to the API.
With @karenzshea's name / ref split (ref. #2857) in master we want to make use of it and reduce `NewName` instructions when ever possible. This is a first step towards #2744 by using the already existing name change heuristic from the extractor now in post-processing as well. Limitations: at the moment we don't have the `SuffixTable` in post-processing; this would require us serializing and subsequently deserializing the table, passing it through from the profiles to the API.
Issue
Ref #2704
Splits name and ref into separate fields in the response object.
Tasklist
Requirements / Relations
Enables #2744 and #2845
cc @daniel-j-h @MoKob @emiltin