0

I'm trying to find out the type of a crossroad / intersection in overpass by given coordinates (simple 4-way-crossroad or 3-way-intersection aka Y/T intersection).

Wanted to count the way-id's I'm getting via json later in program code (4 = simple crossroad, 3 = Y or T) using the following query: http://overpass-turbo.eu/s/NyD

[out:json][timeout:15];
way"highway";
foreach ->.w {
  node(w.w);(way(bn);- .w;)->.wd;
  out body geom;
};

Problem: This only works if a street ends at the crossroad / intersection or at least turns into another way-id. In this example there's a street which reaches from north to south and east. The east way got another way-id so that's not a problem. But from north to south it's just one way (so only one id). Result: I'm counting 3 but it should be 4 for this type of crossroad.

How do I solve this problem or is there a better way to identify the type of a crossroad / intersection?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.