0

I have a pointcloud in PostgreSQL/postgis imported via PDAL, everything is fine, I chipped it into groups of 600 points, no problems.

I then manipulated the data, first exploding the patches and saving the coordinates to a new table:

CREATE TABLE pointcloud52 AS
SELECT
st_x(PC_EXPLODE(pa)::geometry) as x,
st_y(PC_EXPLODE(pa)::geometry) as y,
st_z(PC_EXPLODE(pa)::geometry) as z
From pointclouds

Now I have columns x,y,z how do I re-patch these, i.e. return the points to a patched geometry?

I've been trying with the PC_Patch() function, but it refuses to work

  • So ST_Make_Point returns the geometry, which I then try to patch using the following: select ST_MakePatch(1, ARRAY[st_x(geom),st_y(geom),st_z(geom)]) from pointcloud_99_526.top_698_tmp but I get the error: function st_makepatch(integer, double precision[]) does not exist – Spatial Digger Sep 30 '19 at 9:35
  • 1) Logically, you need to round up your data to two decimal places, 2) And why not SELECT (ST_MakePatch(1, ARRAY[x,y,z])) from pointcloud52; 3) float8[] – Cyril Mikhalchenko Sep 30 '19 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.