OpenStreetMap logo OpenStreetMap

RapiD editor has rather unique feature that it can flag pedestrian crossings where node and way are tagged differently. But how to know where are such crossings if you can’t load entire city or country into iD editor? Luckily there’s overpass syntax for that. Quite a few people found this query useful, therefore I’m sharing it with wider audience.

Most of query was produced by LLM after feeding it with Overpass QL language reference. Only parent.u syntax needed manual fixing. I decided to use dynamic comparison of tag values because I wasn’t sure what would happen if there were some unique tagging typo, such as crossing=marked2 or similar.

[out:json][timeout:180];
{{geocodeArea:Estonia}}->.a;

/* Ways that explicitly have https://wiki.openstreetmap.org/wiki/Key:crossing */
way(area.a)["crossing"]->.ways;

/* Loop each way as .parent */
foreach.ways->.parent
{
  /* https://wiki.openstreetmap.org/wiki/Key:crossing nodes of parent, but
     with different crossing value */
  node(w.parent)["crossing"]
    (if: t["crossing"] != parent.u(t["crossing"]))
    ->.badnodes;

  /* Output if there is at least one mismatching node */
  (.badnodes;)->._;
  if (count(nodes) > 0)
  {
    .badnodes out tags geom meta; /* the mismatching node(s) */
    .parent   out tags geom meta; /* the parent way */
  }
}

Originally published at OSM World Discord on 2025-08-23

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Log in to leave a comment