Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert all to 'MULTILINESTRING' #357

Closed
aborruso opened this issue Jul 1, 2024 · 2 comments · Fixed by #403
Closed

How to convert all to 'MULTILINESTRING' #357

aborruso opened this issue Jul 1, 2024 · 2 comments · Fixed by #403
Labels

Comments

@aborruso
Copy link
Contributor

aborruso commented Jul 1, 2024

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

@Maxxen
Copy link
Member

Maxxen commented Jul 22, 2024

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.

@aborruso
Copy link
Contributor Author

Wow, thank you very much @Maxxen !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants