Destinglish between mid and end nodes of ways with overpass-turbo

Hey,
I’m trying to check for potential quality issues in my area, like missing barrier=kerb or highway=crossing as well as proper usage of footway=sidewalk/crossing.

I figured out how to get all highways, separate them into roads, sidewalks and crossings and get their nodes and using the intersect functionality to find the connecting nodes.

[out:json][timeout:25];
way[highway]({{bbox}})->.highways;

//Get roads
way.highways["highway"~"(motorway|motorway_link|trunk|primary|secondary|tertiary|unclassified|residential)(_link)?"]->.highwayRoad;
(.highwayRoad; >>;)->.highwayRoadNodes;

//Get sidewalks
way.highways["highway"="footway"]["footway"="sidewalk"]->.highwaySidewalk;
(.highwaySidewalk; >>;)->.highwaySidewalkNodes;

//Get crossings
way.highways["highway"="footway"]["footway"="crossing"]->.highwayCrossing;
(.highwayCrossing; >>;)->.highwayCrossingNodes;

//Find roads without lane definition
(way.highwayRoad[!"lanes"][!"lane_markings"];);out geom;

//Find roads without surface
(way.highwayRoad[!"surface"];);out geom;

//Get connecting nodes of roads and sidewalks -> should not exist
(node.highwayRoadNodes.highwaySidewalkNodes;);out geom;

//Get connecting nodes of roads and crossing -> should have highway=crossing
(node.highwayRoadNodes.highwayCrossingNodes;)->.intersectCrossing;
(node.intersectCrossing["highway"!="crossing"];);out geom;

//Get connecting nodes of crossings and sidewalks -> should have kerb=*
(node.highwayCrossingNodes.highwaySidewalkNodes;)->.intersectKerb;
(node.intersectKerb["barrier"!="kerb"];);out geom;

That is working quite well on smaller areas, but need further enhancement.

Like if a footway=sidewalk ends on the road, it might be ok, but if the way continues that should be a footway=crossing. So I am trying to separate the end nodes and the inbetween-nodes into two different sets, but unfortunately I can’t get node(w:1,-1); to work. Any ideas on how to achieve that separation?

1 Like

Seems, there are no ideas on how to get that done with overpass.

Are there any other ways on doing such kind of QA? I took a look into Geodesk database, but couldn’t find any way of doing that deriving the nodes…

I would like to check for those cases:

  • sidewalk shares nodes with roads
  • crossings start/end on roads
  • crossings middle nodes share a node with a road, but it’s not highway=crossing
  • link end-nodes and crossing end-nodes share a node with a sidewalk, but have no kerb=*

Any ideas for how to get it done?

1 Like

Recent days I put some efforts in getting that done on my own in PowerShell. As of now, I still get all the road network form overpass, but the check is done on the local machine. Next step is to get that out of a local extract.

Feel free to take a look: GitHub - aighes/OSM-QA

After loading the resulting geojson into jOSM, it looks like this…