Ticket #20902: josm_combinations_only_tag.patch
File josm_combinations_only_tag.patch, 1.9 KB (added by , 3 years ago) |
---|
-
resources/data/validator/combinations.mapcss
6 6 set unpaved_surface; 7 7 } 8 8 9 node[eval(number_of_tags()) = 1], 10 way[eval(number_of_tags()) = 1], 11 relation[type][eval(number_of_tags()) = 2] { 12 set one_tag; 13 } 14 9 15 /* {0.key} without {1.key} (warning level) */ 10 16 way[junction ][!highway][junction!=yes][!area:highway], 11 17 way[living_street ][!highway], … … 337 343 } 338 344 339 345 /* #16214 */ 340 relation[type=multipolygon] >[role="inner"] way[area] [eval(number_of_tags()) = 1]{346 relation[type=multipolygon] >[role="inner"] way[area].one_tag { 341 347 throwWarning: tr("{0} on an inner multipolygon ring without further tags", "{0.tag}"); 342 348 fixRemove: "area"; 343 349 set area_yes_autofix; 344 350 group: tr("suspicious tag combination"); 345 351 } 346 352 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] { 353 /* only {0.key}, #11104, #12422, #14950, #19572, #20902 */ 354 *[access].one_tag, 355 *[area].one_tag!.area_yes_autofix, 356 *[lanes].one_tag, 357 *[layer].one_tag, 358 way[level].one_tag, 359 relation[level].one_tag, 360 *[lit].one_tag, 361 *[name].one_tag, 362 *[ref].one_tag, 363 *[surface].one_tag { 355 364 throwWarning: tr("incomplete object: only {0}", "{0.key}"); 356 365 set only_one_tag; 357 366 group: tr("missing tag"); … … 363 372 group: tr("missing tag"); 364 373 } 365 374 /* only {0.tag}, #15269 */ 366 *[tourism=attraction] [eval(number_of_tags()) = 1]{375 *[tourism=attraction].one_tag { 367 376 throwWarning: tr("incomplete object: only {0}", "{0.tag}"); 368 377 group: tr("missing tag"); 369 378 }