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?
