[GIS] How to get the intersections lat/lng on overpass api

openstreetmapoverpass-api

I've already knew that I can find all intersections on map by
Code.

My question is that I've knew one intersection and how I can get the information like lat and lon on others connecting intersections .

I've already get lat and lon of intersection A .
How to get the information on others connecting intersections in the following picture?

Example.

Best Answer

This is not possible with your current query since it only returns nodes. To determine other connected intersections you will need nodes and ways.

Downloading ways with the highway key and all of their nodes can be done with a really simple query:

way[highway];
(._;>;);
out;

See the example at overpass turbo.

Afterwards you have to compute a routing graph. There is a step-by-step explanation for building a routing graph from OSM data. For a general overview take a look at routing in the OSM wiki.