-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Move way name parsing from EncodingManager to OSMReader #2537
Conversation
|
||
req.putHint("instructions", false); | ||
instance.route(req); | ||
assertEquals(old, instance.getEncodingManager().isEnableInstructions(), "route method should not change instance field"); |
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.
Definitely not :) But testing this here does not seem necessary and now the flag is gone anyway...
if (Double.isInfinite(edge.getDistance())) | ||
throw new IllegalStateException("Infinite distance should not happen due to #435. way ID=" + way.getId()); |
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.
We do this check else where
private final EncodedValue.InitializerConfig turnCostConfig; | ||
private final EncodedValue.InitializerConfig relationConfig; | ||
private final EncodedValue.InitializerConfig edgeConfig; |
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 can be final so I made them final
# Conflicts: # CHANGELOG.md
I moved the code that parses the
name/ref
OSM tag of the OSM ways fromEncodingManager#applyWayTags
toOSMReader
. I also added a new setting to disable instructions on the server side calledrouting.instructions
, which is now separated fromdatareader.instructions
. The latter now only controls whether the way names shall be parsed or not. It is probably debatable whether we even needdatareader.instructions
and it should probably be better renamed todatareader.parse_names
or evenosmreader.parse_names
. However renamingdatareader
toosmreader
is for another issue.