duckdb_spatial
duckdb_spatial copied to clipboard
How to convert all to 'MULTILINESTRING'
Hi, when I run
duckdb -c "COPY (SELECT id,ST_AsWKB(geom) geom from ST_READ('input.gpkg')) to 'output.gpkg' WITH (FORMAT GDAL, DRIVER 'GPKG',SRS 'EPSG:32632',LAYER_NAME 'output',GEOMETRY_TYPE 'MultiLineString')"
I have this error
Invalid Input Error: Expected all geometries to be of type 'MULTILINESTRING', but got one of type 'LINESTRING'
Is there a ST_Multi function to convert all geom to MULTILINESTRING? If yes, how to use it?
If no, is there another duckdb way to do it?
Thank you
Hello! Thanks for opening this issue!
I can't think of any immediate way to work around this right now, but we should definitely add a ST_Multi function. Ill add it to my todo list.
Wow, thank you very much @Maxxen !!!