Extract hiking routes as vector data

Hey everyone,
I am trying to get hiking routes into my qgis as some kind of vector data.
I can find plenty of online viewers of hiking routes, but no good way to extract those routes specifically.

When I download general OSM vector data and try to extract hiking routes from this, I do not find the attributes “type=route” AND “route=hiking” in the datasets (I’ve tried several sources). I’ve found the Overpass-Turbo API tool which gets me there, but i can only extract hiking routes that pass through specific places (e.g. type=route and route=hiking in Munich). So this is mostly unhandy, for example when I want to get data for a region…
How do I extract hiking routes as vector for a specific area? I am mostly interested in Hiking routes in Germany, but would be glad to get a general solution for all OSM Data. Cheers!

If you only need a few hiking routes, you can find them on https://hiking.waymarkedtrails.org/ and download the GPX from there which you can import into QGIS.

If you need more than that, the code for waymarkedtrails is open, you can install that or at least get some ideas on how to do this yourself.

You can also have a look at osm2pgsql, which allows you to do all sorts of fancy processing of OSM data and then puts the data into a PostgreSQL/PostGIS database which works really well with QGIS.

GPX data is perfect as input for vector data. Is there a way, where you can find routes and export them as GPX data?

You can of course search for hiking routes in Germany, just modify the query below for ‘hiking’ (this one searches for rail based PT routes).

https://overpass-api.de/api/interpreter?data=[timeout:1800];area[boundary=administrative][admin_level=2][name='Deutschland'];(rel(area)[~'route'~'(train|light_rail|monorail)'];rel(br);rel[~'type'~'route'](r);)->.routes;(.routes;<<;rel(r.routes);way(r);node(w);way(r.routes);node(w);node(r.routes););out;

Te query outputs XML data, you may get JSON data when inserting [out:json] right after the data=.

But the analysis of the data requires some coding then.

Overpass is the way to go. You’ll find that you can specify areas in your queries