I’ve long searched for a straightforward way to convert OSM XML Data into shapefiles for use in common GIS applications. I’ve even set up my own PostgreSQL/PostGIS server for this task - a long and painful way to get data into QGIS.
But today I found a much simpler and faster approach (at least for points):
- Load data into JOSM
- Save as .geojson (use file-ending .geojson, not .json!)
- in GGIS, Layer -> Add Vector Layer… : choose type GeoJSON, open file.
- in Layers tab, right click “Save As… : ESRI Shapefile”
Note: for ways and polygons, you have to split up the data in JOSM first. Export an extra .geojson for nodes, ways and polygons each because QGIS only handles one datatype a time.