#QGIS and #OpenStreetMap question… is there an easy way to load either a specific way, or the ways in a relation as a vector line in QGIS?

I’m making a map of places I’ve been, and would like to add railway lines, ferry routes etc. without having to load in /all/ the data. Most of these are already mapped as objects in OSM.

I can load into JOSM, then export as gpx, then load and convert in QGIS, but that seems suboptimal.

Thanks for any pointers on a simpler/more efficient way.

@drnoble try QuickOSM plugin. Its able to query keys/values for given area, and than downloads data with Overpass API https://docs.3liz.org/QuickOSM/
QuickOSM

Download OSM data within QGIS with the Overpass

@OtoKalab thanks, I’ll need to brush up on OverPass if I use that 🙂
@drnoble @OtoKalab Overpass also supports querying by osm ID which is perhaps helpful.

@drnoble

Yes! I use this Overpass snippet for a given relation ID, picked up from the OSM query tool.

You'll get geojson with up to 3 different layers for points, lines and polygons.

This extracts the West Highland Way for example (relation id 16287).

I have no idea what line 3 means, I really should read the docs. But it works, most of the time. 🙂

[out:json][timeout:25];
rel(16287);
(._;>>;);
out;

@stevefaeembra thanks, will give this a try tomorrow, making sure not to mess with the mystic line 3😁

@stevefaeembra @watmildon @OtoKalab

Thanks Steve, that works exactly as I wanted.

Now to try and work out where I've gone over the past 30 odd years 🤔😁

@drnoble
It depends on how big the area you're working is. You can also try osmium to filter the tags you need for your routes.

You can easily import #OpenStreetMap elements into #QGIS with the #QuickOSM Plugin. Building the Overpass turbo query is now straightforward with the interactive dialogue.
https://plugins.qgis.org/plugins/QuickOSM/

@drnoble

QuickOSM - Download OSM data thanks to the Overpass API. You can also open local OSM or PBF files. A special parser, on top of OGR, is …