Changeset 17953 in josm for trunk/resources
- Timestamp:
- 2021-07-07T21:45:42+02:00 (3 years ago)
- Location:
- trunk/resources/data/validator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/resources/data/validator/combinations.mapcss
r17923 r17953 345 345 } 346 346 347 /* only {0.key}, #11104, #12422, #14950, #19572 */ 348 *[lanes][eval(number_of_tags()) = 1], 349 *[surface][eval(number_of_tags()) = 1], 350 *[access][eval(number_of_tags()) = 1], 351 *[area][eval(number_of_tags()) = 1]!.area_yes_autofix, 352 *[name][eval(number_of_tags()) = 1], 353 *[ref][eval(number_of_tags()) = 1], 354 *[lit][eval(number_of_tags()) = 1] { 347 /* only {0.key}, #11104, #12422, #14950, #19572, #20902 */ 348 /* relations excluded as there is a test for missing type=* plus several other test depending on the type exist */ 349 node[access][eval(number_of_tags()) = 1], 350 way[access][eval(number_of_tags()) = 1], 351 node[area][eval(number_of_tags()) = 1]!.area_yes_autofix, 352 way[area][eval(number_of_tags()) = 1]!.area_yes_autofix, 353 node[lanes][eval(number_of_tags()) = 1], 354 way[lanes][eval(number_of_tags()) = 1], 355 node[layer][eval(number_of_tags()) = 1], 356 way[layer][eval(number_of_tags()) = 1], 357 way[level][eval(number_of_tags()) = 1], /* nodes might be valid, e.g. start and end nodes of steps */ 358 node[lit][eval(number_of_tags()) = 1], 359 way[lit][eval(number_of_tags()) = 1], 360 node[name][eval(number_of_tags()) = 1], 361 way[name][eval(number_of_tags()) = 1], 362 node[ref][eval(number_of_tags()) = 1], 363 way[ref][eval(number_of_tags()) = 1], 364 node[surface][eval(number_of_tags()) = 1], 365 way[surface][eval(number_of_tags()) = 1] { 355 366 throwWarning: tr("incomplete object: only {0}", "{0.key}"); 356 367 set only_one_tag; … … 364 375 } 365 376 /* only {0.tag}, #15269 */ 366 *[tourism=attraction][eval(number_of_tags()) = 1] { 377 node[tourism=attraction][eval(number_of_tags()) = 1], 378 way[tourism=attraction][eval(number_of_tags()) = 1] { 367 379 throwWarning: tr("incomplete object: only {0}", "{0.tag}"); 368 380 group: tr("missing tag"); -
trunk/resources/data/validator/numeric.mapcss
r17939 r17953 134 134 } 135 135 136 *[roof:height][roof:height =~ /^0*(\.0*)?( (m|ft))?$/][roof:shape=flat] { 137 throwWarning: tr("{0} is unnecessary for {1}", "{0.tag}", "{2.tag}"); 138 group: tr("unnecessary tag"); 139 fixRemove: "{0.key}"; 140 set zero_roof_height_flat; 141 assertMatch: "node roof:height=0 roof:shape=flat"; 142 assertMatch: "node roof:shape=flat roof:height=\"00.00000 ft\" roof:shape=flat"; 143 assertNoMatch: "node roof:shape=flat roof:height=2 m roof:shape=flat"; 144 assertNoMatch: "node roof:height=0 roof:shape=gabled"; 145 } 146 *[roof:height][roof:height =~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/]!.zero_roof_height_flat { 147 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 148 set roof_height_meter_autofix; 149 fixAdd: concat("roof:height=", get(regexp_match("([0-9.]+)( )*(.+)",tag("roof:height")),1)," m"); 150 assertMatch: "node roof:height=6.78 meters"; 151 assertMatch: "node roof:height=5 metre"; 152 assertMatch: "node roof:height=2m"; 153 assertNoMatch: "node roof:height=2 m"; 154 assertNoMatch: "node roof:height=5"; 155 } 156 *[roof:height][roof:height =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/]!.zero_roof_height_flat { 157 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 158 set roof_height_foot_autofix; 159 fixAdd: concat("roof:height=", get(regexp_match("([0-9.]+)( )*(.+)",tag("roof:height")),1)," ft"); 160 assertMatch: "node roof:height=6.78 foot"; 161 assertMatch: "node roof:height=5 Feet"; 162 assertMatch: "node roof:height=2ft"; 163 assertNoMatch: "node roof:height=2 ft"; 164 assertNoMatch: "node roof:height=5"; 165 } 166 *[roof:height][roof:height =~ /^[0-9]+,[0-9][0-9]?( (m|ft))?$/] { 167 throwWarning: tr("unusual value of {0}: use . instead of , as decimal separator", "{0.key}"); 168 fixAdd: concat("roof:height=", replace(tag("roof:height"), ",", ".")); 169 set roof_height_separator_autofix; 170 assertMatch: "node roof:height=5,5"; 171 assertMatch: "node roof:height=12,00"; 172 assertMatch: "node roof:height=12,5 ft"; 173 assertNoMatch: "node roof:height=12,000"; 174 assertNoMatch: "node roof:height=3,50,5"; 175 assertNoMatch: "node roof:height=3.5"; 176 assertNoMatch: "node roof:height=4"; 177 } 178 136 179 *[maxlength][maxlength =~ /^[1-9][0-9]*(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] { 137 180 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); … … 231 274 } 232 275 233 *[height ][height !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([1-9][0-9]*\'((10|11|[0-9])((\.[0-9]+)?)\")?))$/]!.height_separator_autofix!.height_meter_autofix!.height_foot_autofix, 234 *[maxheight][maxheight !~ /^(([1-9][0-9]*(\.[0-9]+)?( (m|ft))?)|([0-9]+\'(([0-9]|10|11)(\.[0-9]*)?\")?)|none|default|below_default)$/]!.maxheight_separator_autofix!.maxheight_meter_autofix!.maxheight_foot_autofix, 235 *[maxlength][maxlength !~ /^(([1-9][0-9]*(\.[0-9]+)?( (m|ft))?)|([0-9]+\'(([0-9]|10|11)(\.[0-9]*)?\")?)|none|default|below_default)$/]!.maxlength_separator_autofix!.maxlength_meter_autofix!.maxlength_foot_autofix, 236 *[width ][width !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.width_separator_autofix!.width_meter_autofix!.width_foot_autofix, 237 *[maxwidth ][maxwidth !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.maxwidth_separator_autofix!.maxwidth_meter_autofix!.maxwidth_foot_autofix { 276 *[height ][height !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([1-9][0-9]*\'((10|11|[0-9])((\.[0-9]+)?)\")?))$/]!.height_separator_autofix!.height_meter_autofix!.height_foot_autofix, 277 *[maxheight ][maxheight !~ /^(([1-9][0-9]*(\.[0-9]+)?( (m|ft))?)|([0-9]+\'(([0-9]|10|11)(\.[0-9]*)?\")?)|none|default|below_default)$/]!.maxheight_separator_autofix!.maxheight_meter_autofix!.maxheight_foot_autofix, 278 *[roof:height][roof:height !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([1-9][0-9]*\'((10|11|[0-9])((\.[0-9]+)?)\")?))$/]!.roof_height_separator_autofix!.roof_height_meter_autofix!.roof_height_foot_autofix!.zero_roof_height_flat, 279 *[maxlength ][maxlength !~ /^(([1-9][0-9]*(\.[0-9]+)?( (m|ft))?)|([0-9]+\'(([0-9]|10|11)(\.[0-9]*)?\")?)|none|default|below_default)$/]!.maxlength_separator_autofix!.maxlength_meter_autofix!.maxlength_foot_autofix, 280 *[width ][width !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.width_separator_autofix!.width_meter_autofix!.width_foot_autofix, 281 *[maxwidth ][maxwidth !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.maxwidth_separator_autofix!.maxwidth_meter_autofix!.maxwidth_foot_autofix { 238 282 throwWarning: tr("unusual value of {0}: {1} is default; only positive values; point is decimal separator; if units, put space then unit", "{0.key}", "meters"); 239 283 assertMatch: "node height=medium";
Note:
See TracChangeset
for help on using the changeset viewer.