6

Suppose I have a GPX file which covers a long distance (200km~5000km).

I'd like to check where to find food / where to sleep before I start riding.

I can load the GPX file on Google Maps and scan areas to search for those places. But it will take a lot of time.

Is there an efficient way to search for food/inn/city along a GPX track/route?

3
  • 2
    I’m voting to close this question about route planning, only related to cycling as the transport method is a bike (presuming by riding the OP is not referring to horses, motorcycles etc). Probably better suited to travel.stackexchange.com
    – mattnz
    Commented Jul 18, 2021 at 0:42
  • Another possibly-more-on-topic stack would be softwarerecs.stackexchange.com if you want a software solution, but.... (see answer)
    – Criggie
    Commented Jul 19, 2021 at 10:51
  • 2
    @Criggie if we do go for off-topic (I admit it's marginal but think we're OK here) I reckon travel, as the answer may not be purely software. It may be possible to have something more software-assisted than I suggest. I'm considering it on-topic as car satnavs often provide comparable features for other travellers, road signs are designed for drivers etc. so the problem is a little different on a bike
    – Chris H
    Commented Jul 19, 2021 at 10:55

4 Answers 4

3

From the programmer's viewpoint here is an algorithm I would implement if I was faced with this problem.

  1. Get an Openstreetmap database extract for the region I am interested in.
  2. Filter the extract file to keep only nodes/ways with tags amenity=restaurant, amenity=fast_food etc. That is, only data related to the "food" category.
  3. Write a script that takes a set of GPX points of the route, a set of the "restaurant" points, and a threshold distance value. For each POI, calculate the minimum distance to all points (or linear segments) of the route.
  4. Finally, generate a GPX with only those "restaurant" POIs which are close enough (below the fixed threshold).

Alternatively, a database query for Overpass API could be constructed to do all this work. I am quite weak in its obscure language(s), but there are likely ready examples for it for finding POIs along a curve.

As such, this question is maybe more suitable for the GIS Q&A site.

1
  • This is on my list of projects that are too big to start with a full time job (I also want strip maps as an output). There are many other useful overpass queries to include - amenity=drinking-water, shop=bicycle, public transport in case of ride-ending mechanicals, maybe hospitals and other emergency healthcare, supermarkets/convenience stores... It may be possible to query Overpass for a series of boxes along the route, but I'm not sure about rate limits on the server. Sadly this is something I wish was an answer, rather than an actual answer
    – Chris H
    Commented Jul 19, 2021 at 9:30
2

OsmAnd (my favorite smartphone navigation app) allows you to show Points Of Interest along a route.

https://osmand.net/features/navigation#How_to_view_POI_along_the_road

enter image description here

1
  • Can you select multiple classes of POIs (e.g. supermarket, convenience store, cafe, pub for a food stop) at one time?
    – Chris H
    Commented Jul 19, 2021 at 15:50
2

As a frame-challenge, try considering the problem the other way around. Work out how far you want to ride in an average day and check what is that distance away on your route. Say 100 km or ~6 hours casual riding. But any steep climbs could halve the daily distance, or you might want a rest/easy day. Build tourist/rest days into your plan too.

Presumably you want to be at the destination within some amount of time, perhaps your visa has an expiry, or there's a flight to catch.

Now, once you have an idea of your overnight stop in a towns/village/city, then its more of a "where's a good place to stay in Dusseldorf with bike parking ?"

Your lunch stop might be better to be spontaneous - every town will have something, as long as you arrive around local-lunchtime then something will be selling food.

Depending on where in the world you are, there will be Cycling Guides, either in paper form or on the web. Though consider the post C19 world and everything may be out of date.

On the off-chance you don't find something, always have emergency food/water on the bike. A couple gels and a bar can be enough to get you to your dinner stop, and then refuel/rest.

1
  • 1
    This pretty much what i do, though the scale is different - I might be doing 200-300km in a day, but know that I want to break it into reasonable stages. It can be hard to find lunch sometimes in countries where the shops often shut for lunch - you end up tracking down a proper restaurant or going for somewhere big enough to support fast food (France can be an issue, for example, where the delis and bakeries shut for a few hours in the middle of the day, and a "cafe" can be what we'd call a bar)
    – Chris H
    Commented Jul 19, 2021 at 15:43
2

Assuming you're planning on desktop rather than in an app or on a GPS unit, my approach is as follows (and it's a bit slow, but time well spent):

  • Work out how long I'd like between breaks. This could be 50-100km, with the short end of that range in tough conditions (hills/heat/headwinds/heavy rain) or late in a really long day. For me one stop in a century (160km), well after half way might be adequate, but a 200km with only one stop is pushing it. Scroll through my route to a suitable distance from the start/previous stop, but reconsider the route or the previous stop if there's nothing at all.

  • Using OpenStreetMap's cycle and standard layers, zoom in on likely towns along the route. OSM is an option in nearly all route planners (e.g. RideWithGPS, Komoot). That often shows a few options.

  • If there aren't many, or I'm planning on passing through at odd times, then it's time for a Google Maps search - "petrol station Okehampton" (often the best bet for 24 hour opening), "convenience store Aviemore", etc. (I'm currently planning to ride the length of the UK hence my examples). Google can be rather optimistic, so be careful - a motorbike shop won't be much use if you need parts.

  • This may lead to a little rerouting, perhaps to pass through a town centre during the day, or take a busier road with overnight services at night.

  • If you've got a long leg with no options, make sure to stock up beforehand and stop at the side of the road (bus stops are good if it's raining). Alternatively modify your route, especially if you're looking for a hot meal or an overnight stop and don't carry camping gear.

  • I also note railway stations, bike shops, and hospitals from Google searches from the likely towns along the route, Scrolling Google Maps and clicking "search this area" is very useful (but it's not always an option and you may need to search the map without a place name to start with).

I usually have a tab open in Komoot with the route and OpenStreetMap cycle view, one on OpenStreetMap.org, and one or two for Google Maps and/or Street View

It's usually best to break the route into reasonable chunks as the route planners tend to be more responsive when not handling too much data, and the task of planning is more manageable. The longest of mine is 600km including an overnight stop, the others are single days or near enough.

Sleep in many ways is easier if you know how far you want to ride each day. For me, wild camping, I'm looking at places on or just off route, not too far after a town where I can get water - Street View helps again there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.