Sunday, 14 June 2015

polygon - Problem importing OSM multipolygon buildings with inner courtyards into QGIS


I want to import polygons representing buildings in my local area from OSM into QGIS (v 2.18.11). Regular polygons are fine. There are also 3 buildings represented by multipolygon relations in the data set, which have internal courtyards (polygons with role=inner). All 3 render correctly in both OpenStreetMap itself and JOSM (one of the buildings omitted for more clarity):


enter image description here


One of them renders correctly in QGIS (ie like a square doughnut), but the others have the courtyard filled in:


enter image description here


The XML code for the 3 objects is as follows:






























































































































































































































































Can anyone suggest what might be the problem here?



Answer



This seems to be a bug in the QuickOSM plugin. If you download the data in Shapefile format, it looks ok (as in Steven Kay's answer).



Using the Geojson format to preserve full key names, you get the school building with the two holes rendered as features as well. Using Vector -> Geometry Tools -> Multipart to singlepart, you can separate the two inner.


Selecting the school building and saving it to shapefile (or download with QuickOSM using shapefile format) shows the correct outline.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...