id-tagging-schema icon indicating copy to clipboard operation
id-tagging-schema copied to clipboard

Accept units in Elevation field

Open 1ec5 opened this issue 9 months ago • 2 comments

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.

1ec5 avatar May 08 '24 23:05 1ec5

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

github-actions[bot] avatar May 08 '24 23:05 github-actions[bot]

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.

1ec5 avatar May 09 '24 02:05 1ec5