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

Add cardinal direction field to some route presets #214

Merged
merged 2 commits into from
Jan 4, 2022

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Aug 7, 2021

Added a Direction field to the Cycle Route, Road Route, and Train Route presets (and by extension other public transportation route presets). The field has only been added to route relation types that are commonly tagged with cardinal directions as of writing; I didn’t find enough usage on hiking, horse, or piste route relations to justify matching 9f092d8.

Unlike the other Direction fields, this is a combo box that suggests cardinal directions. Both the N/S/E/W and north/south/east/west formats are approved and well-established overall, but the latter predominates among route relations, so that’s what this PR introduces. The combo box allows user-defined values, since public transportation systems use a variety of idiosyncratic rail directions, some of which are commonly tagged in OSM.

Fixes #202.

Copy link
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.

I don't know. Currently, only very few relations use this tag (see below). The wiki only mentions usage for some specific countries: Perhaps it would make more sense to limit this to road route relations in the US, Canada and New Zealand for now?

route type total count count with direction relative amount
route=bicycle 87007 65 0.07%
route=train 11038 42 0.4%
route=road 197179 1413 0.7%
route=road (USA only) 48912 661 1.4%

@1ec5
Copy link
Contributor Author

1ec5 commented Dec 16, 2021

I limited the field to the three MUTCD countries where routes are commonly identified by cardinal direction. There’s no real-world justification for limiting it to just road routes in these countries, because bicycle and public transportation routes are commonly referred to in the same way. There’s more information in this wiki page, which has presented the direction tag as one of two approaches for many years.

@tyrasd
Copy link
Member

tyrasd commented Dec 16, 2021

because […] public transportation routes are commonly referred to in the same way.

Then why not also add route=bus, route=subway, route=tram and route=light_rail as well? 🤔

Perhaps the non-road route types could instead have the field in the moreFields section?

@1ec5
Copy link
Contributor Author

1ec5 commented Dec 16, 2021

So far, I’ve only added cardinal directions to this field. For public transportation routes that distinguish directions, there’s more local variation, like “inbound” versus “outbound”, so I wasn’t sure about broaching that here. By contrast, long-distance bike routes are always referred to by cardinal directions in the U.S. (not sure about Canada and New Zealand).

I agree that we could add the field to moreFields for the public transportation presets just in case a local community finds it suitable for their local bus or subway system. The original motivation for this PR was that iD is already using direction for its automatic relation labels, so I guess it would be more consistent to add it to all of them.

@tyrasd tyrasd merged commit e4fda02 into openstreetmap:main Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Direction field to route relation presets
2 participants