Request for code to filter tracks with multiple connections

I am looking for code that can help me visualize all tracks (highway=track) in a specific area that have additional connections to other roads or paths at their endpoints or inside the segment. This would be useful for identifying potential routes for hiking or biking that utilize existing infrastructure.


Consider a track segment that connects two different roads. The code should identify this segment and include it in the results.

Additional considerations:

  • The solution should be applicable to any area and not limited to a specific region.
  • The code should be efficient and avoid unnecessary data processing.
  • The output should be easy to interpret and visualize, ideally in a format compatible with mapping tools.


Could someone provide Overpass Turbo code that can achieve the desired functionality? Any assistance would be greatly appreciated.

Additional information:

  • I have tried using the following code, but it does not return the desired results:
out geom;
  • I am using Overpass Turbo to run the queries.

Thank you for your time and consideration.

I’ll reply here too, maybe others can help us,
a possible solution:


//.tracks_no_exit out geom; //debug

(.all_tracks; - .tracks_no_exit;)->.tracks_with_exit;
.tracks_with_exit out geom;

link for the query : overpass-turbo
some suggestions ?