/* {0} on a node, should be a way */ node[area=no], node[oneway], node[bridge], node[sidewalk], node[footway][footway!=crossing], /* footway=crossing has own warning in highway.mapcss */ node[man_made=embankment], node[man_made=groyne], node[man_made=cutline], node[power=line], node[cutline], node[aerialway=cable_car], node[aerialway=gondola], node[aerialway=chair_lift], node[aerialway=mixed_lift], node[aerialway=drag_lift], node[aerialway=t-bar], node[aerialway=j-bar], node[aerialway=platter], node[aerialway=magic_carpet], node[aerialway=rope_tow], node[aerialway=goods], node[aeroway=taxiway], node[aeroway=runway], node[railway=rail], node[railway=narrow_gauge], node[railway=monorail], node[railway=preserved], node[railway=light_rail], node[railway=subway], node[railway=tram], node[railway=disused], node[railway=abandoned], node[waterway=river], node[waterway=canal], node[waterway=stream], node[waterway=ditch], node[waterway=drain], node[natural=coastline], node[natural=ridge], node[natural=valley], node[natural=tree_row] { throwWarning: tr("{0} on a node. Should be used on a way.", "{0.tag}"); assertMatch: "node oneway=-1"; assertNoMatch: "way oneway=-1"; assertMatch: "node bridge=yes"; assertMatch: "node bridge=viaduct"; } /* {0} on a node, should be a way or relation */ node[boundary=administrative] { throwWarning: tr("{0} on a node. Should be used on a way or relation.", "{0.tag}"); } /* {0} on a node, should be an area; #10679 #16528 #16792 #12502 #17402*/ node[golf=green], node[golf=bunker], node[golf=fairway], node[area=yes], node[area:highway], node[landuse], node[natural=scree], node[natural=scrub], node[natural=fell], node[natural=heath], node[natural=wood], node[natural=grassland], node[natural=wetland], node[natural=water], node[natural=mud], node[natural=beach], node[natural=sand], node[natural=wood], node[natural=bare_rock], node[natural=glacier], node[leisure=park][natural!=tree], /* For nodes with both tags another warning is created in combinations.mapcss */ node[leisure=nature_reserve], node[waterway=riverbank], node[man_made=bridge], node[man_made=breakwater], node[aeroway=apron], node[power=plant], node[power=switchgear], node[building:part], node[source:outline] { throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}"); } /* {0} on a node, should be a relation; Error level; see #10252, #10769, #14288 */ node[type=multipolygon], node[interval], node[route], node[restriction] { throwError: tr("{0} on a node. Should be used in a relation", "{0.tag}"); } /* {0} on a way, should be a node */ way[line_attachment], way[emergency=fire_hydrant], way[entrance], way[door], way[railway=subway_entrance], way[man_made=survey_point], way[aeroway=holding_position], way[power=transformer], way[power=pole], way[power=catenary_mast], way[power=terminal], way[power=tower]!:closed, way[amenity=vending_machine], way[natural=peak], way[natural=saddle], way[natural=volcano], way[natural=tree], way[highway=give_way], way[highway=milestone], way[highway=mini_roundabout], way[highway=stop], way[highway=street_lamp], way[highway=traffic_signals], way[highway=turning_loop], way[highway=turning_circle], way[highway=motorway_junction] { throwWarning: tr("{0} on a way. Should be used on a node.", "{0.tag}"); } /* {0} on a way, should be a relation; see #15642, #10252, #14288 */ way[restriction][restriction =~ /^(no_right_turn|no_left_turn|no_u_turn|no_straight_on|only_right_turn|only_left_turn|only_straight_on|no_entry|no_exit)$/], way[type=multipolygon], way[interval][route!=ferry], way[route=bus] { throwError: tr("{0} on a way. Should be used in a relation", "{0.tag}"); } /* #14395, #17025 */ way[highway][area!=yes][!tunnel][!covered] > node { set node_in_highway; } way[highway][area!=yes][!tunnel][!covered]:closed > node { set node_in_closed_highway; } way[highway][area!=yes][!tunnel][!covered] >[index=1] node, way[highway][area!=yes][!tunnel][!covered] >[index=-1] node { set first_last_highway_node; } way[building][building!=no] > node[!entrance].node_in_closed_highway, way[building][building!=no] > node[!entrance].node_in_highway!.first_last_highway_node { throwWarning: tr("node connects highway and building"); } /* #15035, must not warn for node 3815077900*/ node[man_made!=monitoring_station][at(0.0,0.0)] { throwError: tr("Object at Position 0.00E 0.00N. There is nothing at this position except an already mapped weather buoy."); fixDeleteObject: this; } /* see ticket:#10125 */ node[source:geometry] { throwWarning: tr("{0} on a node", "{0.key}"); fixChangeKey: "source:geometry => source:position"; } /* Building inside building (spatial test) */ *[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] ∈ area[building][building!~/no|entrance/] { throwWarning: tr("Building inside building"); } /* Building overlapping building (spatial test) */ area[building][building!~/no|entrance/] ⧉ area[building][building!~/no|entrance/] { throwWarning: tr("Overlapping buildings"); } /* Overlapping areas (spatial test) */ area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] { set water_area; } /* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */ area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ⧉ area:closed:areaStyle.water_area, area:closed:areaStyle[landuse=reservoir] ⧉ area:closed:areaStyle.water_area { throwWarning: tr("Overlapping Water Areas"); } /* Water area inside water area (spatial test) */ area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ∈ area:closed:areaStyle.water_area, area:closed:areaStyle[landuse=reservoir] ∈ area:closed:areaStyle.water_area { throwWarning: tr("Water area inside water area"); } area:closed:areaStyle ⧉ area:closed:areaStyle { throwOther: tr("Overlapping Areas"); } /* see ticket #9311 */ node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ area[amenity=parking] { throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking"); group: tr("{0} inside {1}", "amenity", "amenity"); } /* see ticket #9556 */ area:closed:areaStyle[tag("natural") = parent_tag("natural")] ⧉ area:closed:areaStyle[natural] { throwWarning: tr("Overlapping Identical Natural Areas"); } area:closed:areaStyle[tag("landuse") = parent_tag("landuse")] ⧉ area:closed:areaStyle[landuse] { throwWarning: tr("Overlapping Identical Landuses"); } /* see ticket:#9522 */ node[tag("amenity") = parent_tag("amenity")] ∈ area[amenity][amenity != parking] { throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity"))); group: tr("{0} inside {1}", "amenity", "amenity"); } node[tag("leisure") = parent_tag("leisure")] ∈ area[leisure] { throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure"))); group: tr("{0} inside {1}", "leisure", "leisure"); } node[tag("tourism") = parent_tag("tourism")] ∈ area[tourism] { throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism"))); group: tr("{0} inside {1}", "tourism", "tourism"); } node[tag("shop") = parent_tag("shop")] ∈ area[shop] { throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop"))); group: tr("{0} inside {1}", "shop", "shop"); } node[tag("power") = parent_tag("power")] ∈ area[power] { throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power"))); group: tr("{0} inside {1}", "power", "power"); } /* isolated nodes which should be part of a way, see #10825, #15478 */ node:unconnected:in-downloaded-area[entrance], node:unconnected:in-downloaded-area[traffic_calming], node:unconnected:in-downloaded-area[highway=passing_place], node:unconnected:in-downloaded-area[highway=mini_roundabout], node:unconnected:in-downloaded-area[highway=motorway_junction], node:unconnected:in-downloaded-area[highway=turning_loop], node:unconnected:in-downloaded-area[highway=turning_circle], node:unconnected:in-downloaded-area[highway=stop], node:unconnected:in-downloaded-area[highway=give_way], node:unconnected:in-downloaded-area[highway=traffic_signals], node:unconnected:in-downloaded-area[highway=crossing], node:unconnected:in-downloaded-area[crossing], node:unconnected:in-downloaded-area[highway=milestone], node:unconnected:in-downloaded-area[railway=milestone], node:unconnected:in-downloaded-area[railway=crossing], node:unconnected:in-downloaded-area[railway=level_crossing], node:unconnected:in-downloaded-area[railway=buffer_stop], node:unconnected:in-downloaded-area[public_transport=stop_position], node:unconnected:in-downloaded-area[aeroway=holding_position], node:unconnected:in-downloaded-area[noexit], node:unconnected:in-downloaded-area[waterway=dam], node:unconnected:in-downloaded-area[waterway=weir], node:unconnected:in-downloaded-area[waterway=waterfall], node:unconnected:in-downloaded-area[amenity=ferry_terminal], node:unconnected:in-downloaded-area[leisure=slipway], node:unconnected:in-downloaded-area[mountain_pass=yes], node:unconnected:in-downloaded-area[barrier=gate], node:unconnected:in-downloaded-area[barrier=lift_gate], node:unconnected:in-downloaded-area[barrier=swing_gate], node:unconnected:in-downloaded-area[barrier=toll_booth], node:unconnected:in-downloaded-area[barrier=turnstile], node:unconnected:in-downloaded-area[barrier=full-height_turnstile], node:unconnected:in-downloaded-area[barrier=motorcycle_barrier], node:unconnected:in-downloaded-area[barrier=rope], node:unconnected:in-downloaded-area[barrier=sally_port], node:unconnected:in-downloaded-area[barrier=spikes], node:unconnected:in-downloaded-area[barrier=stile], node:unconnected:in-downloaded-area[barrier=sump_buster], node:unconnected:in-downloaded-area[barrier=kerb], node:unconnected:in-downloaded-area[barrier=border_control], node:unconnected:in-downloaded-area[barrier=bump_gate], node:unconnected:in-downloaded-area[barrier=bus_trap], node:unconnected:in-downloaded-area[barrier=cattle_grid], node:unconnected:in-downloaded-area[barrier=chain], node:unconnected:in-downloaded-area[barrier=cycle_barrier], node:unconnected:in-downloaded-area[barrier=hampshire_gate], node:unconnected:in-downloaded-area[barrier=height_restrictor], node:unconnected:in-downloaded-area[barrier=debris] { throwWarning: tr("{0}", "{2.tag}"); group: tr("isolated node which must be connected to a way"); } /* #11127 */ way[railway][bridge] > node, way[highway][bridge] > node { set node_in_bridge; } way[waterway] > node.node_in_bridge { throwWarning: tr("node connects waterway and bridge"); } /* #11128, #14812, #15032 */ way[highway] > node[tourism=information][information=guidepost] { set guidepost; throwOther: tr("{0} node connected to a highway", "{1.tag}"); } way >[index=1] node, way >[index=-1] node { set first_last_node; } way[highway] > node[amenity][!entrance][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking|bus_station|car_wash|ferry_terminal|weighbridge|taxi|toilets)$/], way[highway] > node[building][!entrance], way[highway] > node[leisure][!entrance][leisure!=slipway][leisure!=fitness_station], way[highway] > node[office][!entrance], way[highway] > node[shop][!entrance], way[highway] > node[tourism][!entrance][tourism!=viewpoint]!.guidepost.first_last_node:connection, way[highway] > node[tourism][!entrance][tourism!=viewpoint]!.guidepost!.first_last_node { throwWarning: tr("{0} node connected to a highway", "{0.key}"); } /* #18817 */ way[man_made=pipeline][location=underground] > node[marker], way[power=cable ][location=underground] > node[marker] { throwWarning: tr("{0} node connected to an underground object", "{0.key}"); } way[junction=roundabout]:righthandtraffic:clockwise, way[junction=roundabout]!:righthandtraffic:anticlockwise { throwWarning: tr("suspicious roundabout direction"); } /* #12496 */ area:closed[place=islet][eval(areasize()) > 1500000] { throwWarning: tr("{0} on a large area", "{1.tag}"); suggestAlternative: "place=island"; fixAdd: "place=island"; } area:closed[place=island][eval(areasize()) < 500000] { throwWarning: tr("{0} on a small area", "{1.tag}"); suggestAlternative: "place=islet"; fixAdd: "place=islet"; } /* #15648 */ way[place=island]!:closed { throwError: tr("Way with {0} not closed.", "{0.tag}"); } /* #12561 - building larger than Aalsmeer Flower Auction (518000) and Tesla factory (510000) */ area:closed[building][building!=no][eval(areasize()) > 520000] { throwError: tr("Too large building"); } /* #12577 */ way[power=line] > node, way[power=minor_line] > node, way[power=cable] > node { set node_in_power_way; } way[!power][!building] > node.node_in_power_way { throwWarning: tr("Node connects a power line or cable with an object which is not related to the power infrastructure."); } /* #12646, #12992, #16334 */ way[waterway=~/^(stream|river|drain)$/]!:closed >[index=-1] node[natural!=sinkhole][natural!=cave_entrance]!:connection:in-downloaded-area { throwWarning: tr("Waterway ends without a connection to another waterway or the direction of the waterway is wrong."); } /* #10717, #14535 */ way:closed[natural=coastline] ∈ area[natural=water], way:closed[natural=coastline] ∈ area[waterway=riverbank] { throwError: tr("Coastline inside {1}", "{0.tag}"); } /* #10471 */ way[waterway] > node[ford?] { set ford_on_waterway; } way[highway] > node[ford?] { set ford_on_highway; } node[ford?]:in-downloaded-area!.ford_on_waterway, node[ford?]:in-downloaded-area!.ford_on_highway { throwWarning: tr("{0} should be on the node where {1} and {2} intersect", "ford", "highway", "waterway"); } /* #13877 */ area:closed[waterway = canal][area!=no], area:closed[waterway = drain][area!=no], area:closed[waterway = ditch][area!=no], area:closed[waterway = stream][area!=no], area:closed[waterway = river][area!=no] { throwWarning: tr("{0} is the tag for the linear waterway. To tag the water area use {1} + {2} instead.", "{1.tag}", "natural=water", "water=*"); } /* #15097 */ way[highway][area!=yes] > node, way[man_made=pier] > node { set node_in_highway_pier; } way[route=ferry][tunnel=yes] > node, way[route=ferry][bridge=yes] > node { set node_in_ferry_bridge_tunnel; } way[route=ferry]!:closed >[index= 1] node!.node_in_highway_pier!.node_in_ferry_bridge_tunnel:in-downloaded-area, way[route=ferry]!:closed >[index=-1] node!.node_in_highway_pier!.node_in_ferry_bridge_tunnel:in-downloaded-area { throwWarning: tr("Ferry route is not connected to the road network or branches."); } way[amenity=ferry_terminal] > node, way[man_made=pier] > node { set node_in_terminal_pier; } way[route=ferry]!:closed >[index= 1] node[amenity!=ferry_terminal][man_made!=pier]!.node_in_terminal_pier!.node_in_ferry_bridge_tunnel:in-downloaded-area, way[route=ferry]!:closed >[index=-1] node[amenity!=ferry_terminal][man_made!=pier]!.node_in_terminal_pier!.node_in_ferry_bridge_tunnel:in-downloaded-area { throwWarning: tr("Ferry route is not connected to a ferry terminal or branches."); } /* #10391 - Many misuses of building=hangar instead of building=barn/industrial/warehouse */ area:closed2[aeroway] ⊉ way[building=hangar][!aeroway] { throwWarning: tr("{0} outside of {1}", "{0.tag}", "aeroway"); suggestAlternative: "building=barn"; suggestAlternative: "building=industrial"; suggestAlternative: "building=warehouse"; }