Determine Angle of Street by Parsing an Overpass-Turbo output xml

المشرف العام

Administrator
طاقم الإدارة
I am currently downloading all the street intersections from a bounding box using this query. The output is a 92 pages doc (including duplicates) containing nodes(node id, lat and long). I am extracting the latitudes and longitudes in order to compose a Google Street View Image link because i want to download for each point the corresponding image. In the composition of the link i also want to calculate the heading-angle of the street; i know the math formula needed but it requires 2 lat and 2 long (from 2 points in the same street) and my problem is that the nodes in the output file don't have a specific order. Therefore, i cannot calculate the angle between two consecutive nodes. I was thinking of sorting the lat or long in asc/desc order because in this way i might find the points in the same street.Is this method valid or i can solve it in an easier way? Is there any more efficient way to find all the street intersections?



أكثر...
 
أعلى