Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#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 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

    126126  assertNoMatch: "way maxspeed=variable";
    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]*\"))$/] {
    130130  throwWarning: tr("{0}: kilometers is default; period is separator; if units, put space then unit", "distance");
    131131  assertMatch: "way distance=something";
    132132  assertMatch: "way distance=-5";
    257257  assertNoMatch: "node ele=-12.1 m";
    258258  assertNoMatch: "node ele=12";
    259259  assertMatch: "node ele=high";
    260 }
    261  No newline at end of file

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by Klumbumbus

Resolution: fixed
Status: newclosed

In 13035/josm:

fix #15479 - Include meters as a valid unit for distance (patch by naoliv)

comment:2 Changed 5 years ago by Klumbumbus

Milestone: 17.10
Priority: normalminor

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.