#15479 closed enhancement (fixed)
[PATCH] Include meters as a valid unit for distance
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 17.10 |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description
https://wiki.openstreetmap.org/wiki/Key:distance says:
If no unit is given explicitly, the value is assumed to be in kilometers. 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.
And in the Units page we can see that the meter (m
) is as valid as km
, mi
and nmi
for distance.
One example is on footways and sport tracks where we can see signs marking the distance in meters (for example, distance=50 m
, etc)
-
data/validator/numeric.mapcss
126 126 assertNoMatch: "way maxspeed=variable"; 127 127 } 128 128 129 *[distance][distance !~ /^(([0-9]+\.?[0-9]*( ( km|mi|nmi))?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/] {129 *[distance][distance !~ /^(([0-9]+\.?[0-9]*( (m|km|mi|nmi))?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/] { 130 130 throwWarning: tr("{0}: kilometers is default; period is separator; if units, put space then unit", "distance"); 131 131 assertMatch: "way distance=something"; 132 132 assertMatch: "way distance=-5"; … … 257 257 assertNoMatch: "node ele=-12.1 m"; 258 258 assertNoMatch: "node ele=12"; 259 259 assertMatch: "node ele=high"; 260 } 261 No newline at end of file 260 }
Attachments (0)
Change History (2)
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Milestone: | → 17.10 |
---|---|
Priority: | normal → minor |
In 13035/josm: