File: tagchecker.cfg

package info (click to toggle)
josm 0.0.svn5267%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 153,404 kB
  • sloc: java: 152,210; xml: 8,902; perl: 1,346; makefile: 64; sh: 35
file content (143 lines) | stat: -rw-r--r-- 12,270 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# JOSM TagChecker validator file

# Format:
# Each line specifies a certain error to be reported
# <data type> : messagetype : <key><expression><value>
# Lines starting with a # are considered as comments.
#
# Data type can be:
#  node        - a node point
#  way         - a way
#  relation    - a relation
#  *           - all data types
#
# Message type can be:
# E            - an error
# W            - a warning
# I            - an low priority informational warning
#
# Key and value are expressions describing certain keys and values of these keys.
# Regulator expressions are supported. In this case the expressions starts and
# ends with a / sign. If an 'i' is appended, the regular expression is
# case insensitive. For instance, /foo|bar/i
#
# The * sign indicates any string.
# The texts BOOLEAN_TRUE and BOOLEAN_FALSE in the value part indicate a special
# handling for boolean values (yes, true, 0, false, no, ...).
#
# Expression can be:
#  !=          - the key/value combination does not match
#  ==          - the key/value combination does match
#
# To have more complicated expressions, multiple elements can be grouped together
# with an logical and (&&).
#
# The comment at the end of a rule is displayed in validator description
#
# Empty lines and space signs are ignored

way  : W : highway == * && name == /.* (Ave|Blvd|Cct|Cir|Cl|Cr|Crct|Cres|Crt|Ct|Dr|Drv|Esp|Espl|Hwy|Ln|Mw|Mwy|Pl|Rd|Qy|Qys|Sq|St|Str|Ter|Tce|Tr|Wy)\.?$/i               # abbreviated street name

node : W : oneway == *                                         # oneway tag on a node
node : W : bridge == BOOLEAN_TRUE                              # bridge tag on a node
node : W : highway == tertiary                                 # wrong highway tag on a node
node : W : highway == secondary                                # wrong highway tag on a node
node : W : highway == residential                              # wrong highway tag on a node
node : W : highway == unclassified                             # wrong highway tag on a node
node : W : highway == track                                    # wrong highway tag on a node
way  : I : highway == unclassified && name != *                # Unnamed unclassified highway
way  : I : highway == secondary && ref != *                    # highway without a reference
way  : I : highway == tertiary && ref != *                     # highway without a reference
way  : I : highway == motorway && nat_ref != *                 # highway without a reference
*    : W : highway == road                                     # temporary highway type
*    : W : / *name */i == * && name != *                       # misspelled key name

# The following could replace unnamed way check. Still at the moment we keep it as it is
#way  : W : junction == roundabout && highway == /motorway|trunk|primary|secondary|tertiary|residential|pedestrian/ && /name|ref|(name:.*)|(.*_name)|(.*_ref)/ != * # Unnamed junction
#way  : W : highway == /motorway|trunk|primary|secondary|tertiary|residential|pedestrian/ && /name|ref|(name:.*)|(.*_name)|(.*_ref)/ != * # Unnamed 

way  : W : highway == cycleway && bicycle == BOOLEAN_FALSE     # cycleway with tag bicycle
way  : W : highway == footway && foot == BOOLEAN_FALSE         # footway with tag foot
#way  : I : highway == cycleway && bicycle == *                 # cycleway with tag bicycle
#way  : I : highway == footway && foot == *                     # footway with tag foot
way  : W : highway == cycleway && cycleway == lane             # separate cycleway as lane on a cycleway
way  : W : highway == * && barrier == *                        # barrier used on a way

#way  : I : waterway == * && layer != *                         # waterway without layer tag
way  : I : highway == footway && maxspeed == *                 # maxspeed used for footway
way  : I : highway == steps && maxspeed == *                   # maxspeed used for footway

# see #5844, #6760
#way  : W : oneway != BOOLEAN_FALSE && /.*:(backward|forward)/ == *    # oneway combined with *:backward/forward

*    : W : layer == /\+.*/                                     # layer tag with + sign

*    : I : name == /.*Strasse.*/i                              # street name contains ss

relation : E : type != *                                       # relation without type

node : I : amenity == /restaurant|cafe|fast_food/ && name != * # restaurant without name
#way  : I : highway != * && railway != * && waterway != * && name == * # unusual named way type
#*    : W : natural == water && waterway == *                   # unusual tag combination (natural=water & waterway)
*    : W : highway == * && waterway == *                       # unusual tag combination (highway & waterway)
*    : W : highway == * && natural == *                        # unusual tag combination (highway & natural)

*    : W : natural == water && leisure == swimming_pool       # natural water used for swimming pool
*    : W : natural == water && amenity == swimming_pool       # natural water used for swimming pool

# see ticket #5017
# Taginfo query: select keypairs.key1, keypairs.key2, keypairs.count_all, keys.count_all, cast(keypairs.count_all as real)/keys.count_all as from_fraction_all from keys, keypairs where key1='waterway' and keys.key=keypairs.key2 and (key1<>'highway' or keypairs.count_all>12000) and (key1<>'railway' or keypairs.count_all>3000) and (key1<>'waterway' or keypairs.count_all>800) and key2 not like '%:%' and from_fraction_all>0.97 and 1 union select keypairs.key2, keypairs.key1, keypairs.count_all, keys.count_all, cast(keypairs.count_all as real)/keys.count_all as from_fraction_all from keys, keypairs where key2='waterway' and keys.key=keypairs.key1 and (key2<>'highway' or keypairs.count_all>12000) and (key2<>'railway' or keypairs.count_all>3000) and (key2<>'waterway' or keypairs.count_all>800) and key1 not like '%:%' and from_fraction_all>0.97 and 1 order by keypairs.count_all desc limit 1000;
*    : W : incline              == * && highway != *                                   # incline without highway
way  : W : junction             == * && highway != *                                   # junction without highway
*    : W : lanes                == * && highway != *                                   # lanes without highway
*    : W : lcn                  == * && highway != *                                   # lcn without highway
*    : W : lit                  == * && highway != * && public_transport != platform   # lit without highway
*    : W : living_street        == * && highway != *                                   # living_street without highway
*    : W : maintenance          == * && highway != *                                   # maintenance without highway
*    : W : maxspeed             == * && highway != *                                   # maxspeed without highway
*    : W : median               == * && highway != *                                   # median without highway
*    : W : motorroad            == * && highway != *                                   # motorroad without highway
*    : W : ntd_id               == * && highway != *                                   # ntd_id without highway
*    : W : oneway               == * && highway != *                                   # oneway without highway
*    : W : sac_scale            == * && highway != *                                   # sac_scale without highway
*    : W : segregated           == * && highway != *                                   # segregated without highway
*    : W : sidewalk             == * && highway != *                                   # sidewalk without highway
*    : W : smoothness           == * && highway != *                                   # smoothness without highway
*    : W : snowplowing          == * && highway != *                                   # snowplowing without highway
*    : W : step_count           == * && highway != *                                   # step_count without highway
*    : W : toll                 == * && highway != *                                   # toll without highway
*    : W : tracktype            == * && highway != *                                   # tracktype without highway
*    : W : trail_visibility     == * && highway != *                                   # trail_visibility without highway
*    : W : trolley_wire         == * && highway != *                                   # trolley_wire without highway
*    : W : zip_left             == * && highway != *                                   # zip_left without highway
*    : W : zip_right            == * && highway != *                                   # zip_right without highway
*    : W : detail               == * && railway != *                                   # detail without railway
*    : W : eddy_current_brake   == * && railway != *                                   # eddy_current_brake without railway
*    : W : electrified          == * && railway != *                                   # electrified without railway
*    : W : etcs                 == * && railway != *                                   # etcs without railway
*    : W : gauge                == * && railway != *                                   # gauge without railway
*    : W : grade_of_track       == * && railway != *                                   # grade_of_track without railway
*    : W : kursbuchstrecke      == * && railway != *                                   # kursbuchstrecke without railway
*    : W : lzb                  == * && railway != *                                   # lzb without railway
*    : W : old_railway_operator == * && railway != *                                   # old_railway_operator without railway
*    : W : operating_procedure  == * && railway != *                                   # operating_procedure without railway
*    : W : pzb                  == * && railway != *                                   # pzb without railway
*    : W : radio                == * && railway != *                                   # radio without railway
*    : W : structure_gauge      == * && railway != *                                   # structure_gauge without railway
*    : W : tilting_technology   == * && railway != *                                   # tilting_technologie without railway
*    : W : track_class          == * && railway != *                                   # track_class without railway
*    : W : tracks               == * && railway != *                                   # tracks without railway
*    : W : traffic_mode         == * && railway != *                                   # traffic_mode without railway
*    : W : usage                == * && railway != *                                   # usage without railway
*    : W : workrules            == * && railway != *                                   # workrules without railway
*    : W : stream               == * && waterway != *                                  # stream without waterway
*    : W : intermittent         == * && waterway != *                                  # intermittent without waterway
*    : W : boat                 == * && waterway != *                                  # boat without waterway
*    : W : length_unit          == * && waterway != *                                  # length_unit without waterway
*    : W : llid                 == * && waterway != *                                  # llid without waterway
*    : W : canal                == * && waterway != *                                  # canal without waterway
*    : W : have_riverbank       == * && waterway != *                                  # have_riverbank without waterway
*    : W : tunnel               == * && highway != * && railway != * && waterway != *  # tunnel without highway/railway/waterway
*    : W : bridge               == * && highway != * && railway != * && waterway != *  # bridge without highway/railway/waterway
*    : W : psv                  == * && highway != * && railway != * && waterway != *  # psv without highway/railway/waterway
*    : W : width                == * && highway != * && railway != * && waterway != * && aeroway != *  # width without highway/railway/waterway/aeroway