Changes between Version 12 and Version 13 of Rules/QAToolInspiredValidations


Ignore:
Timestamp:
2019-02-22T20:15:18+01:00 (7 years ago)
Author:
dmanzer95
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Rules/QAToolInspiredValidations

    v12 v13  
    1313/* elevation 2020 */
    1414node[natural=peak][!ele], node[mountain_pass=yes][!ele]{
    15     throwError: "Missing {1.key} tag (elevation)";
    16     group: tr("elevation - Osmose 2020");
     15    throwError: "2020: Elevation; Missing {1.key} tag";
     16    group: "OSMOSE";
    1717}
    1818
    1919/* place without name 6030 */
    2020*[place][!name]{
    21     throwError: "{0.key} without {1.key}";
    22     group: tr("place without name - Osmose 6030");
     21    throwError: "6030: Place Without Name; {0.key} without {1.key}";
     22    group: "OSMOSE";
    2323}
    2424
     
    3737}
    3838
    39 
    4039/* set new_feature */
    4140
     
    4342    set new_feature;
    4443}
    45 
    4644
    4745/* Unconnected Cycleway */
     
    5149way[highway=cycleway]!:closed!.connected_node.new_feature >[index=1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking],
    5250way[highway=cycleway]!:closed!.connected_node.new_feature >[index=-1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking] {
    53     throwWarning: "Unconnected Cycleway";
    54     group: tr("Not-connected highway/cycleway -- OSMOSE Item 1210");
     51    throwWarning: "1210: Unconnected Cycleway";
     52    group: "OSMOSE";
    5553}
    5654
    5755/* Unconnected Road -- Motorway to Residential */
    5856
    59 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|residential)$/]!:closed!.connected_node.downloaded >[index=-1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle],
    60 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|residential)$/]!:closed!.connected_node.downloaded >[index=1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle],
    61 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|residential)$/]!:closed!.connected_node.new_feature >[index=-1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle],
    62 way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified|residential)$/]!:closed!.connected_node.new_feature >[index=1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle] {
    63     throwWarning: "Unconnected Road";
    64     group: tr("Not-connected highway/cycleway -- OSMOSE Item 1210");
     57way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified)$/]!:closed!.connected_node.downloaded >[index=-1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle],
     58way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified)$/]!:closed!.connected_node.downloaded >[index=1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle],
     59way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified)$/]!:closed!.connected_node.new_feature >[index=-1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle],
     60way[highway=~/^(motorway|trunk|primary|secondary|tertiary|unclassified)$/]!:closed!.connected_node.new_feature >[index=1] node[noexit!=yes][amenity!=parking_entrance][amenity!=parking][highway!=turning_circle] {
     61    throwWarning: "1210: Unconnected Highway";
     62    group: "OSMOSE";
    6563}
    6664
     
    7270
    7371relation[type] >[index=1].member way {
    74     throwWarning: "One Member Relation: Check for other members";
    75     group: "Osmose Item 1200";
     72    throwWarning: "1200: One Member Relation; Check for other members";
     73    group: "OSMOSE";
    7674}
    7775
     
    8078/*class 2*/
    8179way[highway*="_link"][eval(waylength()) > 1000] {
    82     throwWarning: "bad highway link";
    83     group: tr("highway too long for *_link -- OSMOSE item 1110/2");
    84 }
    85 
     80    throwWarning: "1110/2: Bad *_link Highway; highway too long for a *_link";
     81    group: "OSMOSE";
     82}
    8683
    8784 /* Bridge to tag -- OSMOSE Item 7012 */
    8885way[bridge=yes][!/^bridge:/][eval(waylength()) > 500] {
    89     throwWarning: "bridge deserving of more detail use bridge:structure= or bridge:support=; ";
    90     group: tr("bridge to tag -- OSMOSE Item 7012");
    91 }
    92 
     86    throwWarning: "7012: Bridge to Tag; bridge deserving of more detail";
     87    group: "OSMOSE";
     88}
    9389
    9490/* on junction = roundabout -- OSMOSE Item 4020 */
    9591
    9692*[junction=roundabout][oneway] {
    97     throwWarning: "Unnecessary oneway tag";
    98     group: tr("on junction=roundabout -- OSMOSE Item 4020");
     93    throwWarning: "4020: On junction=roundabout; Unnecessary oneway tag";
     94    group: "OSMOSE";
    9995    fixRemove: "oneway";
    10096}
    10197
    10298*[junction=roundabout][ref] {
    103     throwWarning: "Unnecessary ref tag";
    104     group: tr("on junction=roundabout -- OSMOSE Item 4020");
     99    throwWarning: "4020: On junction=roundabout; Unnecessary ref tag";
     100    group: "OSMOSE";
    105101    fixRemove: "ref";
    106102}
    107103
    108104*[junction=roundabout][area] {
    109     throwWarning: "Unnecessary area tag";
    110     group: tr("on junction=roundabout -- OSMOSE Item 4020");
     105    throwWarning: "4020: On junction=roundabout; Unnecessary area tag";
     106    group: "OSMOSE";
    111107    fixRemove: "area";
    112108}
    113109
    114110/* Oneway -- OSMOSE Item 2030 */
    115 
    116111
    117112/*-------Class 2-------*/
     
    124119    set junc_node
    125120}
    126 
    127121
    128122/*
     
    134128*/
    135129
    136 
    137130way[highway][!junction][!oneway][eval(waylength()) < 100]  node.junc_node {
    138     throwWarning: "Missing Oneway - Check highway entering/exiting roundabout";
    139     group: tr("oneway -- OSMOSE Item 2030/2")
    140 }
    141 
    142 
     131    throwWarning: "2030/2 Oneway; Missing Oneway - Check highway entering/exiting roundabout";
     132    group: "OSMOSE";
     133}
    143134
    144135/* ----- Class 20301 ------ */
    145136way[cycleway=opposite][!oneway],
    146137way[cycleway=opposite_lane][!oneway] {
    147     throwWarning: "Opposite cycleway without oneway";
    148     group: tr("oneway -- OSMOSE Item 2030/20301");
     138    throwWarning: "2030/20301 Oneway; Opposite cycleway without oneway";
     139    group: "OSMOSE";
    149140}
    150141
    151142/* source -- OSMOSE Item 2040 -- administrative boundary does not contain tag source=* */
    152143way[boundary=administrative][!source]{
    153     throwError: "administrative boundary does not have source tag";
    154     group: "source -- OSMOSE Item 2040";
    155 }
    156 
    157 
    158 
    159 /* OSMOSE sudden highway type change -- Item 1090 */
    160 
    161 /* ---- SET CLASSES ---- */
    162 
    163 way[highway=primary] node:connection {
    164     set hwy_cont_primary;
    165 }
    166 
    167 way[highway=secondary] node:connection {
    168     set hwy_cont_secondary;
    169 }
    170 
    171 way[highway=tertiary] node:connection {
    172     set hwy_cont_tertiary;
    173 }
    174 
    175 way[highway=unclassified] node:connection {
    176     set hwy_cont_unclassified;
    177 }
    178 
    179 way[highway=residential] node:connection,
    180 way[highway=living_street] node:connection {
    181     set hwy_cont_residential;
    182 }
    183 
    184 
    185 /* ----  Sudden Highway Type Change Checks ---- */
    186 
    187 /* Motorway Continuity */
    188 way[highway=motorway].hwy_cont_primary >[index=-1] node,
    189 way[highway=motorway].hwy_cont_primary >[index=1] node {
    190     throwWarning: "motorway connected to primary road - check for sudden highway type change";
    191     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    192 }
    193 
    194 way[highway=motorway].hwy_cont_secondary >[index=-1] node,
    195 way[highway=motorway].hwy_cont_secondary >[index=1] node {
    196     throwWarning: "motorway connected to secondary road - check for sudden highway type change";
    197     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    198 }
    199 
    200 way[highway=motorway].hwy_cont_tertiary >[index=-1] node,
    201 way[highway=motorway].hwy_cont_tertiary >[index=1] node {
    202     throwWarning: "motorway connected to tertiary road - check for sudden highway type change";
    203     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    204 }
    205 
    206 way[highway=motorway].hwy_cont_unclassified >[index=-1] node,
    207 way[highway=motorway].hwy_cont_unclassified >[index=1] node {
    208     throwWarning: "motorway connected to unclassified road - check for sudden highway type change";
    209     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    210 }
    211 
    212 way[highway=motorway].hwy_cont_residential >[index=-1] node,
    213 way[highway=motorway].hwy_cont_residential >[index=1] node {
    214     throwWarning: "motorway connected to residential road - check for sudden highway type change";
    215     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    216 }
    217 
    218 
    219 /* Trunk Continuity */
    220 way[highway=trunk].hwy_cont_secondary >[index=-1] node,
    221 way[highway=trunk].hwy_cont_secondary >[index=1] node {
    222     throwWarning: "trunk connected to secondary road - check for sudden highway type change";
    223     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    224 }
    225 
    226 way[highway=trunk].hwy_cont_tertiary >[index=-1] node,
    227 way[highway=trunk].hwy_cont_tertiary >[index=1] node {
    228     throwWarning: "trunk connected to tertiary road - check for sudden highway type change";
    229     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    230 }
    231 
    232 way[highway=trunk].hwy_cont_unclassified >[index=-1] node,
    233 way[highway=trunk].hwy_cont_unclassified >[index=1] node {
    234     throwWarning: "trunk connected to unclassified road - check for sudden highway type change";
    235     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    236 }
    237 
    238 way[highway=trunk].hwy_cont_residential >[index=-1] node,
    239 way[highway=trunk].hwy_cont_residential >[index=1] node {
    240     throwWarning: "trunk connected to residential road - check for sudden highway type change";
    241     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    242 }
    243 
    244 
    245 /* Primary Continuity */
    246 way[highway=primary].hwy_cont_tertiary >[index=-1] node,
    247 way[highway=primary].hwy_cont_tertiary >[index=1] node {
    248     throwWarning: "primary connected to tertiary road - check for sudden highway type change";
    249     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    250 }
    251 
    252 way[highway=primary].hwy_cont_unclassified >[index=-1] node,
    253 way[highway=primary].hwy_cont_unclassified >[index=1] node {
    254     throwWarning: "primary connected to unclassified road - check for sudden highway type change";
    255     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    256 }
    257 
    258 way[highway=primary].hwy_cont_residential >[index=-1] node,
    259 way[highway=primary].hwy_cont_residential >[index=1] node {
    260     throwWarning: "primary connected to residential road - check for sudden highway type change";
    261     group: tr("Sudden highway type change -- OSMOSE Item 1090/1");
    262 }
    263 
    264 
    265 /* Secondary Continuity */
    266 way[highway=secondary].hwy_cont_unclassified >[index=-1] node,
    267 way[highway=secondary].hwy_cont_unclassified >[index=1] node {
    268     throwWarning: "secondary connected to unclassified road - check for sudden highway type change";
    269     group: tr("Sudden highway type change -- OSMOSE Item 1090/2");
    270 }
    271 
    272 way[highway=secondary].hwy_cont_residential >[index=-1] node,
    273 way[highway=secondary].hwy_cont_residential >[index=1] node {
    274     throwWarning: "secondary connected to residential road - check for sudden highway type change";
    275     group: tr("Sudden highway type change -- OSMOSE Item 1090/2");
    276 }
     144    throwError: "2040: Source; administrative boundary does not have source tag";
     145    group: "OSMOSE";
     146}
     147
    277148
    278149/* Highway Roundabout OSMOSE Item 3010 */
    279150
    280 /*  Class 1 -- Wrong highway on roundabout  */
     151/*      Class 1 -- Wrong highway on roundabout  */
    281152/*---------- SET CLASSES ---------- */
    282153
     
    305176way[highway=residential][junction=roundabout] node:connection.primary_junc,
    306177way[highway=living_street][junction=roundabout] node:connection.primary_junc {
    307     throwWarning: "Wrong highway on roundabout: it must match the highest level of connected routes";
    308     group: tr("Highway Roundabout -- OSMOSE Item 3010/1");
     178    throwWarning: "3010/1: Highway Roundabout; highway tag on roundabout must match highest level of connected routes";
     179    group: "OSMOSE";
    309180}
    310181
     
    314185way[highway=residential][junction=roundabout] node:connection.secondary_junc,
    315186way[highway=living_street][junction=roundabout] node:connection.secondary_junc {
    316     throwWarning: "Wrong highway on roundabout: it must match the highest level of connected routes";
    317     group: tr("Highway Roundabout -- OSMOSE Item 3010/1");
     187    throwWarning: "3010/1: Highway Roundabout; highway tag on roundabout must match highest level of connected routes";
     188    group: "OSMOSE";
    318189}
    319190
     
    322193way[highway=residential][junction=roundabout] node:connection.tertiary_junc,
    323194way[highway=living_street][junction=roundabout] node:connection.tertiary_junc {
    324     throwWarning: "Wrong highway on roundabout: it must match the highest level of connected routes";
    325     group: tr("Highway Roundabout -- OSMOSE Item 3010/1");
    326 }
    327 
    328 
    329 /*  Class 4 -- Roundabout crossing  */
     195    throwWarning: "3010/1: Highway Roundabout; highway tag on roundabout must match highest level of connected routes";
     196    group: "OSMOSE";
     197}
     198
     199/*      Class 4 -- Roundabout crossing  */
    330200
    331201way[highway][!junction] >[index=-1] node,
     
    339209}
    340210
    341 way[highway][junction] node:connection!.crossing!.junc_to_junc {
    342     throwWarning: "Roundabout crossing. way through roundabout without stopping";
    343     group: tr("Highway Roundabout -- OSMOSE Item 3010/4");
    344 }
     211way[highway][junction=roundabout] node:connection!.crossing!.junc_to_junc {
     212    throwWarning: "3010/4: Highway Roundabout; highway crossing roundabout without stopping";
     213    group: "OSMOSE";
     214}   
    345215
    346216}}}