Skip to content

Rule skipped if set used for different type (node/way/relation) #1766

Open
@Famlam

Description

@Famlam

I tried to update the mapcss files in preparation for another PR, and saw the following line:
# Skip selector using undeclared class TunnelCulvertWithoutWaterway
in the py file for https://josm.openstreetmap.de/browser/josm/trunk/resources/data/validator/combinations.mapcss

It came from this rule:
# *[tunnel][!highway][!area:highway][!railway][!waterway][!piste:type][type!=tunnel][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=tunnel][power!=cable]!.TunnelCulvertWithoutWaterway
(which would match 1998 nodes if parsed correctly)

TunnelCulvertWithoutWaterway is however declared, just not for node/relation:

way[tunnel=culvert][man_made!=tunnel][!waterway] {
  throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.key}"); 
  group: tr("suspicious tag combination"); 
  set TunnelCulvertWithoutWaterway; 
}

As it is only set for way rules, the mapcss2osmose script now discards any node/relation rule that refers to it via !.TunnelCulvertWithoutWaterway

(The discarding was done in case it was declared in an "unparsable" rule)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions