Map features/Units: Difference between revisions

From OpenStreetMap Wiki
Jump to navigation Jump to search
(→‎Default units: https://lists.openstreetmap.org/pipermail/tagging/2018-January/034632.html)
No edit summary
Line 104: Line 104:
| Multiply by 1.852
| Multiply by 1.852
|-
|-
! scope="row" rowspan="2" | <div id="Weight">Weight</div>
! rowspan="3" scope="row" | <div id="Weight">Weight</div>
| align=center | <code>t</code>
| align=center | <code>t</code>
| [[wikipedia:Tonne|Tonne (metric ton)]]
| [[wikipedia:Tonne|Tonne (metric ton)]]
Line 116: Line 116:
| -
| -
| Divide by 1000
| Divide by 1000
|-
|st
|[[Wikipedia:Short ton|Short ton]]
|
|
|Multiply by 0.9071847
|-
|-
|}
|}

Revision as of 20:08, 15 April 2018

Some tags have measurable values. The unit of such a value can be given explicitly as part of the value (e.g. maxspeed=50 mph). If no unit is specified, a default unit will be assumed (e.g. for maxspeed=50, the unit kilometre per hour is assumed). If the unit is different from the default, e.g. in non-metric countries, stating an unit is obligatory.

This article shows which units can be explicitly specified and which default units are implicitly assumed.

Default units

If no unit is explicitly specified, the following units are assumed:

Measure Default unit Implicit specification Example
Length Metre (meter) m width=3 means a width of 3 metres
Distance (land) Kilometre (kilometer) km distance=5 means a distance of 5 kilometres
Distance (sea related) nautical mile nmi seamark:light:range=3 means a distance of 3 nautical miles
Speed Kilometres per hour km/h maxspeed=100 means a speed limit of 100 kilometres per hour
Weight Tonne (metric ton) t maxweight=3.5 means a weight limit of 3.5 tonnes (3500 kg)

Explicit specifications

The following units can be explicitly specified by adding them after the numeric value, separated by a space (with the exception of the combined specification of feet and inches):

Measure Explicit specification Unit Example Aliases (Highly Discouraged) Conversion to default unit
Length or Distance
m Metre (meter) height=3 m metre, metres,
meter, meters
-
km Kilometre (kilometer) width=0.2 km kilometre, kilometres,
kilometer, kilometers
Multiply by 1000 or divide by 0.001
mi Mile width=1.45 mi mile, miles Multiply by 1609.344 or divide by 0.000621371192
nmi Nautical Mile distance=6 nmi international nautical mile Multiply by 1852
<feet>'<inch>" Feet and inches combined maxwidth=12'5" ft in Multiply the feet by 12, add the inches and multiply the result by 0.0254
Speed
km/h Kilometres per hour minspeed=80 km/h kph, kmph -
mph Miles per hour maxspeed=60 mph Multiply by 1.609344
knots Knots maxspeed=10 knots Multiply by 1.852
Weight
t Tonne (metric ton) maxweight=3 t -
kg Kilogram (kilogramme) maxweight=3500 kg - Divide by 1000
st Short ton Multiply by 0.9071847

Common mistakes

The following table presents examples of incorrect or discouraged tag usage together with their correct notation.

Incorrect usage Explanation Correct usage
height=6m Missing space between numeric value and unit. height=6 m
maxweight=3,5 Comma used as decimal separator. maxweight=3.5
width=12' 6" There should be no space between the specification of feet and inches. width=12'6"
maxspeed=50 kph Usage of an alias. maxspeed=50 km/h

See also