I have a CSV file containing geodata in WKT in one column. The geometry type is GEOMETRYCOLLECTION. How do I import this to QGIS with one layer per geometry type (POINT and LINESTRING in this case)?
Here's a simplified feature example:
id,title,description,features,category,date
79042,Ausbau Wismar–Rostock,"Ich schlage einen zweigleisigen Ausbau und die Elektrifizierung Wismar–Rostock...","GEOMETRYCOLLECTION(POINT(11.474493907902323 53.89207715945744),LINESTRING(11.47502100706609 53.89112033371444,11.474763515000689 53.89162614941653))",Regionalverkehr,2023-03-24
I used Layer > Add Layer > Add Delimited Text Layer... in QGIS 3.22 and I can select either single geometry types or "Detect" for WKT. I would have expected a new window to select one or more geometry type layers to create from the source. But there is no such selection. An empty layer with no data is being created.
It works if I split the geometry into one column for points and one for lines.
id,title,description,point,line,category,date
79042,Ausbau Wismar–Rostock,"Ich schlage einen zweigleisigen Ausbau und die Elektrifizierung Wismar–Rostock...","POINT(11.474493907902323 53.89207715945744)","LINESTRING(11.47502100706609 53.89112033371444,11.474763515000689 53.89162614941653)",Regionalverkehr,2023-03-24
But my original data has almost 15k rows, so the manual solution does not work. Also, it has more than one point and one linestring per feature.