Key:distance
distance |
Description |
---|
Distance (i.e. extent; length from start to finish) of a route given in kilometres, or distance along a route marked by milestone. |
Group: routes |
Used on these elements |
Status: de facto |
Tools for this tag |
|
This describes the distance (i.e., total length; physical extent) of a geographic feature. It is used in two kinds of elements: route relations and milestone nodes, as specified below.
If no unit is given explicitly, the value is assumed to be in kilometres. If another unit is given, it should be separated from the number by a space. Any decimal should be specified using a dot (.) as the decimal separator. Abbreviations for other units are described on the units page.
Route relations
When used on a route relation, distance describes the total distance of the route. It should not be used on single ways, because it will cause confusion if the way is split and the tag is kept.
For example, the total length (physical extent) of the Polish Autostrada A1 was 326 km in 2012, so the relation for Autostrada A1 Autostrada A1 was tagged distance=326.
((Q: This definition still leaves certain issues undetermined. Lots of roads have breaks or jumps where they are not defined. They disappear at these gaps and then reappear elsewhere. How does the "distance" of a relation handle these gaps? Is the distance of that gap included or ignored? -- A: If the route contains branches and a meaningful distance is not automatically computable, "distance" should be manually filled with something sensible. If the route is incomplete in OSM, "distance" can be filled with e.g. the officially declared length. (The Waymarkedtrails service shows the "distance" value with a "official length" label.)))
The example of Polish A1 also illustrates lack of use and maintenance problems with this tag. As of 2024-07-09, the A1 has been 566 km long since 2023, but the relation is still tagged distance=326 as it has been since changeset 14307828 in 2012 despite multiple extensions since then. The key is evidently not being used for anything overly important as it's been wrong for years and no one has bothered to fix it.
Milestone nodes
This tag is also used on milestones to record the distance shown on the marker. For details see highway=milestone, railway=milestone and waterway=milestone.