Skip to content

Add support for new geometry type instead of relying on spatial#406

Merged
pdet merged 3 commits intoduckdb:mainfrom
Maxxen:new-geometry-type
Feb 24, 2026
Merged

Add support for new geometry type instead of relying on spatial#406
pdet merged 3 commits intoduckdb:mainfrom
Maxxen:new-geometry-type

Conversation

@Maxxen
Copy link
Member

@Maxxen Maxxen commented Feb 24, 2026

This PR adds support for converting then new GEOMETRY type in DuckDB v1.5 back and forth seamlessly to PostGIS.

This is much nicer and has less sharp edges than the previous "cast to intermediate wkb_blob type that spatial understands"-based solution. The test no longer requires spatial.

I've added support for the correct conversion when reading/writing both for the binary and text protocol (I don't think the text format actually worked previously).

In the future we should propagate coordinate system information by peeking through the PostGIS metadata tables, but I will leave that for a follow-up PR as that requires more complex metadata management instead of just conversion code.

@pdet
Copy link
Contributor

pdet commented Feb 24, 2026

Thanks.

@pdet pdet merged commit a42c490 into duckdb:main Feb 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants