[pgpointcloud] Combine PC_Patch and PC_MakePoint

Lars laasunde at hotmail.com
Tue May 15 00:34:10 PDT 2018


The pointcloud webpage shows how to insert data into a points table and how to insert data from a points table into a patch table.

How can I create a patch and insert it into a patch table without using a points table?

The below query produces the error message "function pc_patch(record) does not exist".

insert into dummy(pa) select PC_Patch(bar) from (select PC_MakePoint(1, ARRAY[x,y,z] from (select val as x, val as y, val as z from generate_series(1,10,1) as val) as foo) as bar;

Tested running both inner queries as standalone queries and they produced expected result.
It appears the 'bar' parameter is the wrong type. Tried to cast 'bar' parameter but that produced "cannot cast type record to pcpoint" or "cannot cast type record to pcpoint[]"

insert into dummy(pa) select PC_Patch(bar::pcpoint) from (select PC_MakePoint(1, ARRAY[x,y,z] from (select val as x, val as y, val as z from generate_series(1,10,1) as val) as foo) as bar;
insert into dummy(pa) select PC_Patch(bar::pcpoint[]) from (select PC_MakePoint(1, ARRAY[x,y,z] from (select val as x, val as y, val as z from generate_series(1,10,1) as val) as foo) as bar;

Been looking at this issue for too long now and thought I'd ask for some input.

Appreciate any help.

kind regards, Lars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20180515/245c09d9/attachment.html>


More information about the pgpointcloud mailing list