3liz / QuickOSM

QGIS plugin to fetch OSM data with the Overpass API
GNU General Public License v2.0
180 stars 54 forks source link

Can't export lines to geopackage due to duplicated column names #431

Open asongtoruin opened 1 year ago

asongtoruin commented 1 year ago

What is the bug?

Hello, I have successfully (and very easily!) downloaded some OSM data - however, when I try to save the lines output to a geopackage, QGIS gives an error due to duplicated column names. I can't seem to find the error as copyable text, so here's a screenshot:

image

From looking at the data, it seems as though the download includes both type and TYPE as separate columns and I believe geopackage insists on all lower-case column names.

It looks like this might be a quirk on the OSM-side, but would there be any way for QuickOSM to pre-process the data and ensure uniqueness of (lower case) column names?

The query I ran is as follows:

{"query": ["[out:xml] [timeout:25];\n(\n    node( {{bbox}});\n    way( {{bbox}});\n    relation( {{bbox}});\n);\n(._;>;);\nout body;"], "description": ["All OSM objects in the canvas or layer extent are going to be downloaded."], "advanced": false, "file_name": "", "query_layer_name": [""], "query_name": ["Query1"], "type_multi_request": [[]], "keys": [[""]], "values": [[""]], "area": [""], "bbox": [{"__extent__": "-3.246191445775106 55.94311319126636 -3.155759203527417 55.97216842876525"}], "output_geom_type": [[{"__enum__": "LayerType.Points"}, {"__enum__": "LayerType.Lines"}, {"__enum__": "LayerType.Multilinestrings"}, {"__enum__": "LayerType.Multipolygons"}]], "white_list_column": [{"multilinestrings": null, "points": null, "lines": null, "multipolygons": null}], "output_directory": [""], "output_format": [""]}

Environment