Skip to content

[high] Traffic Overpass query combines highway filters as impossible AND #1

@MeyerThorsten

Description

@MeyerThorsten

Severity: high
Category: bug

The OSM traffic road query concatenates multiple highway filters into a single way selector, which turns the intended OR into an impossible AND.

Evidence:

  • src/layers/traffic-layer.ts:479-480 builds queries like way["highway"="motorway"]["highway"="trunk"](...).
  • In Overpass, those filters all apply to the same element, so a road must have every highway value at once to match.

Impact:

  • the OSM road fetch returns no useful road network
  • the animated local traffic layer becomes empty or severely incomplete
  • persisted OSM traffic snapshots are also wrong

Recommended fix:

  • use a regex filter such as way["highway"~"^(motorway|trunk|primary|secondary)$"](...)
  • or emit a union of separate way clauses instead of stacking the filters on one selector

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions