Ignore:
Timestamp:
2017-07-22T21:01:39+02:00 (7 years ago)
Author:
Klumbumbus
Message:

fix #14989 - allow ranges in direction key

File:
1 edited

Legend:

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

    r12215 r12493  
    199199}
    200200
    201 *[direction][direction>=0][direction<360] {
    202     set correct_direction_degree;
    203 }
    204 *[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 {
     201/* #14989 */
     202*[direction][direction<0],
     203*[direction][direction>=360] {
    205204  throwWarning: tr("unusual value of {0}", "{1.key}");
     205  assertMatch: "node direction=-10";
    206206  assertMatch: "node direction=360";
    207   assertMatch: "node direction=-10";
    208   assertMatch: "node direction=north-east";
     207  assertNoMatch: "node direction=0";
     208}
     209*[direction][direction !~ /^([0-9][0-9]?[0-9]?|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)(-([0-9][0-9]?[0-9]?|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW))?(;([0-9][0-9]?[0-9]?|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW)-([0-9][0-9]?[0-9]?|N|E|S|W|NE|SE|SW|NW|NNE|ENE|ESE|SSE|SSW|WSW|WNW|NNW))*$/] {
     210  throwWarning: tr("unusual value of {0}", "{1.key}");
     211  assertMatch: "node direction=north-down";
     212  assertMatch: "node direction=rome";
     213  assertMatch: "node direction=C";
     214  assertMatch: "node direction=NNNE";
     215  assertMatch: "node direction=1360";
     216  assertNoMatch: "node direction=NE-S"; /* ranges are used at tourism=viewpoint*/
     217  assertMatch: "node direction=north-south"; /* ranges only in numbers or short NESW form */
     218  assertMatch: "node direction=north-east"; /* if range use N-E, if single direcion use NE */
     219  assertNoMatch: "node direction=0-360"; /* complete panorama view */
     220  assertNoMatch: "node direction=45-100;190-250;300-360";
     221  assertMatch: "node direction=45-100;190-250;300";
    209222  assertNoMatch: "node direction=up";
    210223  assertNoMatch: "node direction=down"; /* up/down are replaced by incline tag, has separate warning */
    211224  assertNoMatch: "node direction=0";
    212225  assertNoMatch: "node direction=45";
     226  assertNoMatch: "node direction=360";
    213227  assertNoMatch: "node direction=N";
    214228  assertNoMatch: "node direction=NNE";
Note: See TracChangeset for help on using the changeset viewer.