-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Using a type field to indicate road type during preprocessing #1165
Comments
That makes sense. So this could be one way of doing it:
|
Sounds reasonable, but moving the Descriptor into LUA has performance implications. |
sounds great |
Thinking on this some more, another advantage of a type field could be as an optional preference for FindPhantomNodeForCoordinate, as used in the /nearest and /viaroute calls. If you're planning a route by clicking on (say) z7 tiles, which might only show trunk roads, you probably want your route to start on a trunk road 300m away from your click, rather than a random service road 5m away from your click. Similarly, if you're dragging a route, it's easy to 'misclick' and release slightly away from the main road, in which case you get an unwanted out-and-back diversion along a track or something. (Or a footpath off a cycleway, in my case!) |
I am a bit new to this discussion, but was wondering how possible it would be to get road type in the instructions. Failing the instructions from a viaroute call, how about when using a nearest call. It sounds like by carrying out some pre-processing some new .osm files would be generated, and by using them, it might help...if so any suggestions on how that would be done? |
@hmaeda usually people just encode the type in the street name that you can set from the lua profile. |
@TheMarex Can you please give an example of how the profile.lua file would be changed to include type? |
take a look at the bike profile. it encodes the way type in the way name, when the normal name is empty: |
@systemed wrote
The idea is a good one. Unfortunately, @emiltin was right when he replied
I am in favor of properly implementing a type field that can be used during preprocessing / generation of instructions. OTOH, it should be set from the LUA script and then the instruction generation should also be handled by a LUA function as it doesn't make too much sense to hard-code road types in C++ land.
CC: @emiltin @systemed
The text was updated successfully, but these errors were encountered: