QGIS – How to Import Single OSM Feature XML

openstreetmapqgisxml

I am aware of the great QGIS plugin QuickOSM to download OSM features into QGIS, and I know that QGIS supports importing a .osm file that was downloaded from an exported view like this one, however: how does one import a single OSM feature exported as XML?

  1. Go to an OSM feature, e.g.: https://www.openstreetmap.org/way/23922428
  2. Click on "Download XML", which is the same as using this link: https://www.openstreetmap.org/api/0.6/way/23922428
  3. Try to import into QGIS

Using QGIS 3.16 on Ubuntu 18.04, the import dialogue asks me what kind of features I want to import, but they are all empty once in the project. I tried using the extensions .xml and .osm on the file, but it didn't help.

Any idea what might be going wrong here?

Best Answer

Your link https://www.openstreetmap.org/api/0.6/way/23922428 only contains references to the nodes this way consists of, but it doesn't include these nodes directly. Try to add /full at the end of the URL, i.e. try importing https://www.openstreetmap.org/api/0.6/way/23922428/full instead.