Changeset 18182 in josm
- Timestamp:
- 2021-08-26T16:42:55+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/resources/data/validator/multiple.mapcss
r18132 r18182 9 9 *[water =~ /.+;(.+)?/] { 10 10 throwWarning: tr("{0} with multiple values", "{0.key}"); 11 }12 13 /* Multiple access values, #19419 */14 node[/^(amenity|barrier|building(:part)?|entrance|(high|rail|water)way|leisure)$/][access *=";"],15 way[/^(amenity|building(:part)?|(high|rail|water)way|water|leisure)$/][access *=";"],16 relation[type =~ /^(boundary|multipolygon)$/][access *=";"],17 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/]["4wd_only" *=";"],18 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][agricultural *=";"],19 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][bdouble *=";"],20 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][bicycle *=";"],21 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][bus *=";"],22 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][carriage *=";"],23 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][disabled *=";"],24 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][dog *=";"],25 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][emergency *=";"],26 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][foot *=";"],27 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][golf_cart *=";"],28 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][goods *=";"],29 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][hazmat *=";"],30 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][hgv *=";"],31 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][horse *=";"],32 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][hov *=";"],33 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][mofa *=";"],34 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][moped *=";"],35 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][motor_vehicle *=";"],36 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][motorcar *=";"],37 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][motorcycle *=";"],38 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][psv *=";"],39 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][snowmobile *=";"],40 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][ski *=";"],41 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][taxi *=";"],42 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][tourist_bus *=";"],43 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][vehicle *=";"],44 *[/^(amenity|building(:part)?|entrance|highway|leisure)$/][wheelchair *=";"],45 *[railway][train *=";"],46 *[railway][tram *=";"],47 *[railway][subway *=";"],48 *[/^(leisure|water(way)?)$/][boat *=";"],49 *[/^(leisure|water(way)?)$/][canoe *=";"],50 *[/^(leisure|water(way)?)$/][cargo *=";"],51 *[/^(leisure|water(way)?)$/][motorboat *=";"],52 *[/^(leisure|water(way)?)$/][passenger *=";"],53 *[/^(leisure|water(way)?)$/][ship *=";"],54 *[/^(leisure|water(way)?)$/][swimming *=";"] {55 throwWarning: tr("{0} with multiple values", "{1.key}");56 group: tr("Multiple values in access tag");57 suggestAlternative: tr("only one value and additional {0}", "{1.key}:conditional");58 assertMatch: "node barrier=block access=agricultural;forestry";59 assertNoMatch: "node barrier=block access=agricultural";60 assertMatch: "way highway=trunk access=agricultural;forestry";61 assertNoMatch: "way highway=trunk access=agricultural";62 assertMatch: "relation type=multipolygon water=lake access=boat;canoe";63 assertNoMatch: "relation type=multipolygon water=lake access=boat";64 }65 66 /* Multiple access values per direction or lane, #21192 */67 way[/^(high|rail|water)way$/][/^access((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],68 way[highway][/^agricultural((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],69 way[highway][/^bdouble((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],70 way[highway][/^bicycle((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],71 way[highway][/^bus((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],72 way[highway][/^carriage((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],73 way[highway][/^emergency((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],74 way[highway][/^foot((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],75 way[highway][/^goods((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],76 way[highway][/^hazmat((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],77 way[highway][/^hgv((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],78 way[highway][/^horse((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],79 way[highway][/^hov((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],80 way[highway][/^mofa((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],81 way[highway][/^moped((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],82 way[highway][/^motor_vehicle((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],83 way[highway][/^motorcar((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],84 way[highway][/^motorcycle((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],85 way[highway][/^psv((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],86 way[highway][/^taxi((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],87 way[highway][/^tourist_bus((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],88 way[highway][/^vehicle((:both_ways)?:(backward|forward)|:both_ways)$/ =~ /;/],89 way[railway][/^train:(backward|forward)$/ =~ /;/],90 way[railway][/^tram:(backward|forward)$/ =~ /;/],91 way[railway][/^subway:(backward|forward)$/ =~ /;/],92 way[waterway][/^boat:(backward|forward)$/ =~ /;/],93 way[waterway][/^canoe:(backward|forward)$/ =~ /;/],94 way[waterway][/^cargo:(backward|forward)$/ =~ /;/],95 way[waterway][/^motorboat:(backward|forward)$/ =~ /;/],96 way[waterway][/^passenger:(backward|forward)$/ =~ /;/],97 way[waterway][/^ship:(backward|forward)$/ =~ /;/] {98 throwWarning: tr("Multiple values in accces per direction tag");99 group: tr("Multiple values in access tag");100 suggestAlternative: tr("only one value and additional {0}", ":conditional");101 assertMatch: "way highway=trunk bus:both_ways:forward=designated;yes";102 assertNoMatch: "way highway=trunk bus:both_ways:forward=designated";103 assertNoMatch: "way highway=trunk bus=designated;yes";104 }105 way[highway][/^access:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],106 way[highway][/^agricultural:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],107 way[highway][/^bdouble:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],108 way[highway][/^bicycle:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],109 way[highway][/^bus:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],110 way[highway][/^carriage:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],111 way[highway][/^emergency:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],112 way[highway][/^foot:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],113 way[highway][/^goods:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],114 way[highway][/^hazmat:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],115 way[highway][/^hgv:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],116 way[highway][/^horse:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],117 way[highway][/^hov:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],118 way[highway][/^mofa:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],119 way[highway][/^moped:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],120 way[highway][/^motor_vehicle:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],121 way[highway][/^motorcar:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],122 way[highway][/^motorcycle:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],123 way[highway][/^psv:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],124 way[highway][/^taxi:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],125 way[highway][/^tourist_bus:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/],126 way[highway][/^vehicle:lanes(:both_ways)?(:(backward|forward))?$/ =~ /;/] {127 throwWarning: tr("Multiple values in access per lane tag");128 group: tr("Multiple values in access tag");129 suggestAlternative: tr("only one value and additional {0}", ":conditional");130 assertMatch: "way highway=trunk bus:lanes:both_ways:forward=designated;yes|no";131 assertNoMatch: "way highway=trunk bus:lanes:both_ways:forward=designated|no";132 assertNoMatch: "way highway=trunk bus:both_ways:forward=designated;no";133 11 } 134 12
Note:
See TracChangeset
for help on using the changeset viewer.