Changeset 6384 in josm


Ignore:
Timestamp:
2013-11-14T02:14:45+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #8966, fix #9106, fix #9289, fix #9301, fix #9302 - validator/tagchecker: fix various tests (modified patch by skyper)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/tagchecker.cfg

    r6369 r6384  
    9191relation : W : type == route_master && route_master != *       # route_master relation without route_master=*
    9292
     93# power related stuff (incomplete)
     94*    : W : power == /line|minor_line|cable/ && voltage != *    # power line without voltage
     95*    : W : substation == * && power != substation              # substation key without power=substation
     96*    : W : transformer == * && power != *                      # transformer key without power
     97*    : I : power == substation && substation != *              # missing substation=*
     98*    : I : power == transformer && transformer != *            # missing transformer=*
     99
    93100########################################
    94101# Rules derived from Taginfo statistics
     
    101108*    : W : lanes                == * && highway != *                                   # lanes without highway
    102109*    : W : lcn                  == * && highway != *                                   # lcn without highway
    103 *    : W : lit                  == * && highway != * && amenity != /parking.*/ && public_transport != platform   # lit without highway/parking/platform
     110*    : W : lit                  == * && highway != * && railway != * && piste:type != * && amenity != /parking.*/ && public_transport != platform   # lit without highway/railway/piste/parking/platform
    104111*    : W : living_street        == * && highway != *                                   # living_street without highway
    105112*    : W : maintenance          == * && highway != *                                   # maintenance without highway
     
    146153*    : W : canal                == * && waterway != *                                  # canal without waterway
    147154*    : W : have_riverbank       == * && waterway != *                                  # have_riverbank without waterway
    148 *    : W : tunnel               == * && highway != * && railway != * && waterway != *  # tunnel without highway/railway/waterway
    149 *    : W : bridge               == * && highway != * && railway != * && waterway != * && piste:type != * # bridge without highway/railway/waterway/piste
    150 *    : W : psv                  == * && highway != * && railway != * && waterway != *  # psv without highway/railway/waterway
    151 *    : W : width                == * && highway != * && railway != * && waterway != * && aeroway != * && cycleway != * && footway != * && barrier != * && man_made != * && entrance != * # width without physical linear feature
    152 *    : W : maxspeed             == * && highway != * && railway != * && traffic_sign != /(.*;)?maxspeed(;.*)?/ && type != enforcement # maxspeed without highway/railway/traffic_sign
     155*    : W : tunnel               == * && highway != * && railway != * && waterway != * && public_transport != platform && man_made != pipeline  # tunnel without highway/railway/waterway/platform/pipeline
     156*    : W : bridge               == * && highway != * && railway != * && waterway != * && piste:type != * && public_transport != platform && man_made != /bridge|pipeline/ && building != bridge  # bridge without highway/railway/waterway/platform/piste/pipeline
     157*    : W : psv                  == * && highway != * && railway != * && waterway != * && amenity != /parking.*/  # psv without highway/railway/waterway/parking
     158*    : W : width                == * && highway != * && railway != * && waterway != * && aeroway != * && cycleway != * && footway != * && barrier != * && man_made != * && entrance != *  # width without physical linear feature
     159*    : W : maxspeed             == * && highway != * && railway != * && traffic_sign != /(.*;)?maxspeed(;.*)?/ && type != enforcement  # maxspeed without highway/railway/traffic_sign/enforcement
    153160*    : W : fence_type           == * && barrier != fence                               # fence_type without barrier=fence
    154161*    : W : border_type          == * && boundary != *                                  # border_type without boundary
     
    157164*    : W : shelter_type         == * && amenity != shelter                             # shelter_type without amenity=shelter
    158165*    : W : lamp_type            == * && highway != street_lamp                         # lamp_type without highway=street_lamp
    159 *    : W : building_type        == * && building != *                                  # building_type without building
    160166*    : W : map_type             == * && information != map                             # map_type without information=map
    161167*    : W : site_type            == * && historic != archaeological_site                # site_type without historic=archaeological_site
     
    164170*    : W : reservoir_type       == * && landuse != reservoir && water != reservoir     # reservoir_type without landuse/water=reservoir
    165171*    : W : bunker_type          == * && military != bunker                             # bunker_type without military=bunker
    166 *    : W : power == /line|minor_line|cable/ && voltage != *                            # power line without voltage
    167172
    168173################################
     
    186191
    187192# measurement values and units warnings (ticket #8687)
    188 way : W : layer == * && layer != /^0$|^-?[1-5]$/  # layer should be between -5 and 5
     193way : W : layer == * && layer != /^0$|^-?[1-5]$/                                                                         # layer should be between -5 and 5
    189194*   : W : level == * && level != /^((([0-9]|-[1-9])|[1-9][0-9]*)(\.5)?)(;(([0-9]|-[1-9])|[1-9][0-9]*)(\.5)?)*$|^-0\.5$/  # level should be numbers with optional .5 increments
    190 *   : W : height == * && height != /^(([0-9]+\.?[0-9]*( m)?)|([1-9][0-9]*\'((10|11|[0-9])((\.[0-9]+)?)\")?))$/  # meters is default; period is separator; if units, put space then unit
    191 
    192 *   : W : maxheight == * && maxheight != /^(([1-9][0-9]*(\.[0-9]+)?( m)?)|([0-9]+\'([0-9]|10|11)(\.[0-9]*)?\"))$/  # meters is default; period is separator; if units, put space then unit
    193 way : W : width == * && width != /^(([0-9]+\.?[0-9]*( [a-z]+)?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/  # meters is default; period is separator; if units, put space then unit
    194 *   : W : maxwidth == * && maxwidth != /^(([0-9]+\.?[0-9]*( m)?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/  # meters is default; period is separator; if units, put space then unit
     195*   : W : height == * && height != /^(([0-9]+\.?[0-9]*( m)?)|([1-9][0-9]*\'((10|11|[0-9])((\.[0-9]+)?)\")?))$/           # height: meters is default; period is separator; if units, put space then unit
     196
     197*   : W : maxheight == * && maxheight != /^(([1-9][0-9]*(\.[0-9]+)?( m)?)|([0-9]+\'([0-9]|10|11)(\.[0-9]*)?\"))$/        # maxheight: meters is default; period is separator; if units, put space then unit
     198way : W : width == * && width != /^(([0-9]+\.?[0-9]*( [a-z]+)?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/                           # width: meters is default; period is separator; if units, put space then unit
     199*   : W : maxwidth == * && maxwidth != /^(([0-9]+\.?[0-9]*( m)?)|([0-9]+\'[0-9]+\.?[0-9]*\"))$/                          # maxwidth: meters is default; period is separator; if units, put space then unit
    195200way : W : maxspeed == * && maxspeed != /^(signals|none|unposted|unknown|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/  # unusual maxspeed format
    196 way : W : voltage == * && voltage == /(.*[A-Za-z].*)|.*,.*|.*( ).*/  # voltage should be in volts with no units/delimiter/spaces
     201way : W : voltage == * && voltage == /(.*[A-Za-z].*)|.*,.*|.*( ).*/                                                      # voltage should be in volts with no units/delimiter/spaces
    197202# some users are using frequency for other purposes (not electromagnetic) with the values 'perennial' and 'intermittent'; the vast majority are 0, 16.7, 50 and 60
    198 way : W : frequency == * && frequency != /^(0|[1-9][0-9]*(\.[0-9]+)?)( (kHz|MHz|GHz|THz))?$/  # unusual frequency specification
    199 way : W : gauge == * && gauge != /^([1-9][0-9]{1,3}(;[1-9][0-9]{1,3})*|broad|standard|narrow)$/  # unusual train track gauge; use mm with no separator
     203way : W : frequency == * && frequency != /^(0|[1-9][0-9]*(\.[0-9]+)?)( (kHz|MHz|GHz|THz))?$/                             # unusual frequency specification
     204way : W : gauge == * && gauge != /^([1-9][0-9]{1,3}(;[1-9][0-9]{1,3})*|broad|standard|narrow)$/                          # unusual train track gauge; use mm with no separator
    200205# the numbers for percentage and degrees include could probably be bracketed a bit more precisely
    201 way : W : incline == * && incline != /^(up|down|-?([0-9]+?(\.[1-9]%)?|100)[%°]?)$/  # unusual incline; use percentages/degrees or up/down
     206way : W : incline == * && incline != /^(up|down|-?([0-9]+?(\.[1-9]%)?|100)[%°]?)$/                                       # unusual incline; use percentages/degrees or up/down
Note: See TracChangeset for help on using the changeset viewer.