Query: Nodes with special tags ALONG a route between two locations

Hi OSM-Community!

I’m looking for a way to receive all fuel stations which are located along a given (car-)route between two locations.

So input is:
LocationA, LocationB (and probably something like amenity=fuel)
Wanted output:
List of fuel stations which are “along” (/near) this route.

I wasn’t able to find something prebuild for this kind of use-case.
Can you give me some hints on how to best achieve this?

Thanks a lot and kind regards from Bavaria,
Max

No sollution out-of-the-box,

but the android app Osmand has a feature to find POIs along a calculated route in a distance with max. XXXX meters away.

As Osmand is opensource, you can try to dig into the sourcecode.

Maybe your aim is also reachable via overpass-api, but I am not sure whether there is a topic about “alon a route” as target area for a POI search. Have a closer look at its documentation.

Thank you Stephan,

I’m going to take a look into OSMAnd.

Greetings,
Max