Skip to content

Add ref and railway:track_ref fields to railway=rail and =switch presets#1083

Merged
tyrasd merged 12 commits intoopenstreetmap:mainfrom
gy-mate:main
Jan 31, 2024
Merged

Add ref and railway:track_ref fields to railway=rail and =switch presets#1083
tyrasd merged 12 commits intoopenstreetmap:mainfrom
gy-mate:main

Conversation

@gy-mate
Copy link
Copy Markdown
Contributor

@gy-mate gy-mate commented Jan 19, 2024

  • railway=rail
  • railway=switch
    • Create ref=* (Switch Number) field
    • Add this field to its preset

Comment thread data/presets/railway/rail.json Outdated
Comment thread data/presets/railway/switch.json
@gy-mate gy-mate requested a review from tordans January 19, 2024 09:54
Copy link
Copy Markdown
Collaborator

@tordans tordans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM But disclaimer: I know litte about railway-mappging :-).

Copy link
Copy Markdown
Member

@tyrasd tyrasd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a few minor syntax errors (see below), this looks fine for me as well.

Only one question: the ref field seems to be quite a bit more common on railway=rail objects (see taginfo). What was your reasoning behind putting the ref field into moreFields? Are the track numbers usually easier to map?

Comment thread data/presets/railway/rail.json Outdated
Comment thread data/presets/railway/rail.json Outdated
@tyrasd
Copy link
Copy Markdown
Member

tyrasd commented Jan 24, 2024

One more suggestion: As switches only have a single reference number, it would be sufficient to use the generic field for the ref tag, wouldn't it? This would have the benefit of being slightly less effort to translate and maintain. Or is Switch Number a technical term?

Applied suggestions from code review

Co-authored-by: Martin Raifer <martin@raifer.tech>
@gy-mate
Copy link
Copy Markdown
Contributor Author

gy-mate commented Jan 24, 2024

What was your reasoning behind putting the ref field into moreFields? Are the track numbers usually easier to map?

@tyrasd Yeah, @tordans suggested this and I agree with him:

railway:track_ref would be commonly known but ref (ref_rail) is something that only external data or professionals would know

@tyrasd
Copy link
Copy Markdown
Member

tyrasd commented Jan 24, 2024

Ok, that makes sense now. 👍

@github-actions
Copy link
Copy Markdown

🍱 You can preview the tagging presets of this pull request here.

@tyrasd tyrasd added this to the v6.7 milestone Jan 24, 2024
@gy-mate
Copy link
Copy Markdown
Contributor Author

gy-mate commented Jan 24, 2024

As switches only have a single reference number, it would be sufficient to use the generic field for the ref tag, wouldn't it? This would have the benefit of being slightly less effort to translate and maintain. Or is Switch Number a technical term?

@tyrasd Well it's not really an essential technical term. You're right, there is no need to overcomplicate, it's still obvious without ref_switch. Reverted those commits.

@gy-mate gy-mate requested a review from tyrasd January 24, 2024 15:43
@tyrasd tyrasd merged commit 96a4600 into openstreetmap:main Jan 31, 2024
@k-yle k-yle mentioned this pull request Sep 17, 2025
3 tasks
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.

3 participants