Changeset 11338 in josm for trunk/data


Ignore:
Timestamp:
2016-11-28T21:13:39+01:00 (8 years ago)
Author:
Klumbumbus
Message:

see #14057 - validate direction values (forgotten part of r11337)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/numeric.mapcss

    r9737 r11338  
    186186  assertNoMatch: "node admin_level=5";
    187187}
     188
     189*[direction][direction>=0][direction<360] {
     190    set correct_direction_degree;
     191}
     192*[direction][direction !~ /^(north|east|south|west|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW|forward|backward|both|clockwise|anti-clockwise|anticlockwise|up|down)$/]!.correct_direction_degree {
     193  throwWarning: tr("unusual value of {0}", "{1.key}");
     194  assertMatch: "node direction=360";
     195  assertMatch: "node direction=-10";
     196  assertMatch: "node direction=north-east";
     197  assertNoMatch: "node direction=up";
     198  assertNoMatch: "node direction=down"; /* up/down are replaced by incline tag, has separate warning */
     199  assertNoMatch: "node direction=0";
     200  assertNoMatch: "node direction=45";
     201  assertNoMatch: "node direction=N";
     202  assertNoMatch: "node direction=NNE";
     203  assertNoMatch: "node direction=west";
     204  assertNoMatch: "node direction=forward";
     205  assertNoMatch: "node direction=anti-clockwise";
     206  assertNoMatch: "node direction=anticlockwise"; /* both spellings are in use and even wiki uses both */
     207}
Note: See TracChangeset for help on using the changeset viewer.