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

Accept units in Elevation field #1216

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented May 8, 2024

Changed the Elevation field to be of type roadheight, so that the user can explicitly specify a unit other than meters when appropriate without having to convert the quantity in their head. In the United States, the unit field will default to “ft”, but the user will be able to switch it to “m” if they happen to observe a sign that (unusually) states the elevation in meters. Meanwhile, anywhere else in the world, the editor will behave exactly the same as before: the unit field will show “m” by default, but the resulting tag will omit the unit. If ele=* is already tagged, the field shows the currently tagged units, instead of “Unknown” in the case of feet and inches. Since units other than meters are now accepted, the field’s name no longer needs to specify “(Meters)”.

This behavior is consistent with the Height Limit field, which also allows feet and inches. Technically, an elevation is not a road height, but elevations happen to be measured in the same units as road heights in both the United States and elsewhere – even in famously messy Puerto Rico, near as I can tell. Once ideditor/schema-builder#15 is implemented, ele would map to either the vehicle or person-height usage categories.

This change supports a proposal to formally document ele=* as yet another key that accepts units, instead of being a prominent outlier. This draft PR helps to demonstrate that the change to documentation would have only minor impact on editors.

BeforeAfter
A childcare center imported from GNIS, which records elevations in both units, on the campus of NIST, which strongly prefers meters
Elevation (Meters)Elevation
A sledding hill mapped by hand at a former Voice of America broadcast complex, with the elevation signposted in feet
Elevation (Meters): UnknownElevation: 945 ft

Fixes openstreetmap/iD#5658.

Copy link

github-actions bot commented May 8, 2024

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

@1ec5
Copy link
Contributor Author

1ec5 commented May 9, 2024

As seen in the screenshot above, the “Height (Meters)” field could use the same treatment, since that key is already documented to accept units other than meters.

The Elevation field is now of type roadheight, so that the user can explicitly specify a unit other than meters when appropriate without having to convert the quantity in their head. Technically, this is not a road height but rather a different height dimension, but it happens to be measured in the same units in both metric and customary countries.
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.

imperial units silently removed from ele tag
1 participant