duckdb_spatial icon indicating copy to clipboard operation
duckdb_spatial copied to clipboard

st_collectionextract doesnt work as documentation states

Open chrisflatley opened this issue 7 months ago • 2 comments

The documentation for st_collectionextract states:

select st_collectionextract('MULTIPOINT(1 2,3 4)'::geometry, 1);
-- POINT(1 2)

But, when I run this I just get the same data back:

D select st_collectionextract('MULTIPOINT(1 2,3 4)'::geometry, 1);
MULTIPOINT (1 2, 3 4)

Is there a function which would convert a GEOMETRY to GEOMETRY[]? The opposite of ST_Collect?

My use case for that is that I'm aggregating (via ST_Union_Agg) but it would be nice to be able to unnest to extract the individual geometries back?

chrisflatley avatar Jul 03 '24 17:07 chrisflatley