0

This query returns all of the vehicle roadways in a certain bounding box (bbox):

"""
nwr["highway"="(motorway|trunk|primary|secondary|tertiary|(motorway|trunk|primary|secondary)_link)"]({{bbox}});out geom;
"""

Each Way is a collection of nodes. I would like to aggregate the total count of each Node across all Ways and Relations. I would presume that any Node with more than 1 count is an intersection between two distinct vehicle roads. What is the Overpass QL query for this?

Thanks!

David Bernat
  • 324
  • 2
  • 11
  • A node that is part of two ways doesn't have to be an intersection. It can also be at the start or end of a way in which case it will likely belong to two consecutive ways. – scai Mar 26 '20 at 06:39
  • It is not clear to me why that is the case. Your first point I agree with. Ways which are closed polygons will repeat its first node as its last. But a proper query can account for that-- simply use the unique nodes in the way. Your second point: why would that be the case? Any two consecutive ways with no intersection could be merged into one. Also: what's the query? :-) – David Bernat Mar 26 '20 at 13:20
  • No, consecutive ways can't be merged into a single way if their have different properties like different names, different speed limits, different lanes, different surfaces, belong to different route relations and so on. That's why consecutive ways without an intersection between appear rather often. I can't answer the query part. Counting things isn't part of Overpass' purpose, with a few exceptions. The purpose of Overpass API is to return data. Processing of this data has to be done on the client-side. – scai Mar 26 '20 at 15:25

0 Answers0