INSERT INTO pointcloud_formats (pcid, srid, schema) VALUES (5, 0, ' 1 4 X coordinate as a long integer. You must use the scale and offset information of the header to determine the double value. X int32_t 0.01 2 4 Y coordinate as a long integer. You must use the scale and offset information of the header to determine the double value. Y int32_t 0.01 3 4 Z coordinate as a long integer. You must use the scale and offset information of the header to determine the double value. Z int32_t 0.01 4 2 The intensity value is the integer representation of the pulse return magnitude. This value is optional and system specific. However, it should always be included if available. Intensity uint16_t 1 ght 4326 ' ); CREATE TABLE IF NOT EXISTS pa_test_ght ( pa PCPATCH(5) ); \d pa_test_ght INSERT INTO pa_test_ght (pa) VALUES ('0000000005000000000000000200000002000000030000000500060000000200000003000000050008'); INSERT INTO pa_test_ght (pa) VALUES ('000000000500000000000000020000000600000007000000050006000000090000000A00000005000A'); INSERT INTO pa_test_ght (pa) VALUES ('0000000005000000000000000200000002000000030000000500060000000200000003000000050003'); INSERT INTO pa_test_ght (pa) VALUES ('0000000005000000000000000200000002000000030000000500060000000200000003000000050001'); SELECT Sum(PC_NumPoints(pa)) FROM pa_test_ght; SELECT Sum(PC_MemSize(pa)) FROM pa_test_ght; SELECT Sum(PC_PatchMax(pa,'x')) FROM pa_test_ght; SELECT Sum(PC_PatchMin(pa,'x')) FROM pa_test_ght; DELETE FROM pa_test_ght; INSERT INTO pa_test_ght (pa) SELECT PC_Patch(PC_MakePoint(5, ARRAY[x,y,z,intensity])) FROM ( SELECT -127+a/100.0 AS x, 45+a/100.0 AS y, 1.0*a AS z, a/10 AS intensity, a/400 AS gid FROM generate_series(1,1600) AS a ) AS values GROUP BY gid; SELECT Sum(PC_NumPoints(pa)) FROM pa_test_ght; SELECT Sum(PC_MemSize(pa)) FROM pa_test_ght; SELECT Max(PC_PatchMax(pa,'x')) FROM pa_test_ght; SELECT Min(PC_PatchMin(pa,'x')) FROM pa_test_ght; SELECT Min(PC_PatchMin(pa,'z')) FROM pa_test_ght; TRUNCATE pointcloud_formats;