Skip to content
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

Improve class 31608 description #2072

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Improve class 31608 description #2072

merged 1 commit into from
Nov 21, 2023

Conversation

Famlam
Copy link
Collaborator

@Famlam Famlam commented Nov 17, 2023

  • Ensure the full tag is stored in stars, rather than only the fragment before the first :, so that the tag is available for the message.
    • A nice side effect is that both class 31608 and 31603 now also detect (previously undetected) conflicts between for example:
      • 31603: destination:ref:lanes and destination:ref:lanes:forward
      • 31608: lanes(destination:ref:lanes:backward)=2 + lanes(destination:lanes:backward)=1)
  • Avoid outputting confusing messages like lanes(lanes:lanes)=1 when there is no tag lanes:lanes, or lanes(lanes:*:backward)=2 when the tag is actually lanes:backward.
  • Add some comments to the code

Examples of changed output:

text
old 1 (lanes(turn:*:backward)=2) - (non fullwidth=0) != (lanes(lanes:lanes:backward)=1) - (non fullwidth=0)
new 1 (lanes(turn:lanes:backward)=2) - (non fullwidth=0) != (lanes(lanes:backward)=1) - (non fullwidth=0)
old 2 (lanes(lanes:*:forward)=3) - (non fullwidth=0) != (lanes(change:lanes:forward)=1) - (non fullwidth=0)
new 2 (lanes(lanes:forward)=3) - (non fullwidth=0) != (lanes(change:lanes:forward)=1) - (non fullwidth=0)

- Ensure the full tag is stored in `stars` so that the tag is available for the message.
  - A nice side effect is that both class 31608 and 31603 now also detect conflicts between for example (31603: `destination:ref:lanes` and `destination:ref:lanes:forward`) or (31608: `lanes(destination:ref:lanes:backward)=2` + `lanes(destination:lanes:backward)=1)`. Previously those were undetected
- Avoid outputting confusing messages like `lanes(lanes:lanes)=1` when there is no tag `lanes:lanes`, or `lanes(lanes:*:backward)=2` when the tag is actually `lanes:backward`.
- Add some comments to the code
@frodrigo frodrigo merged commit 9bca570 into osm-fr:dev Nov 21, 2023
3 checks passed
@Famlam Famlam deleted the lanes_31608 branch November 21, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants