-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Description
It's often useful to convert between patches and multipoint geometry.
It's possible to do so already:
- I do patch to multipoint with pc_explode and st_collect
- I do multipoint to patch with something like
select pc_makepatch
from source,
lateral st_dumppoints(geom) d,
lateral unnest(ARRAY[st_x(), st_y(), st_z(), some_metadata]) (not showing the whole picture here, just the general idea).
But some built-in function would certainly be helpful (also maybe for perf?).
Proposition
PC_ToGeometry would return a multipoint (though you would loose any other information in the point, depending on the format).
PC_GeometryToPatch would return a patch from a multipoint (or actually any geometry by taking the vertices). There could be 2 flavors:
PC_GeometryToPatch(geometry) -> patchPC_GeometryToPatch(ROW) -> patchwould also embed some metadata in the point. Maybe we would need to have the pcid as parameter too in this case.
Questions
- For
PC_ToGeometry, I'd like to have a way to get the associated metadata too, but actually I can't think of anything better than pc_explode for now. Maybe it could return a ROW with an array by metadata properties ?
Is it a feature this project would accept ?
Metadata
Metadata
Assignees
Labels
No labels