CREATE EXTENSION pointcloud; INSERT INTO pointcloud_formats (pcid, srid, schema) VALUES (1, 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 4326 ' ); CREATE TABLE IF NOT EXISTS pt_test ( pt PCPOINT(1) ); \d pt_test DELETE FROM pt_test; INSERT INTO pt_test (pt) VALUES ('00000000020000000100000002000000030004'); INSERT INTO pt_test (pt) VALUES ('00000000010000000100000002000000030004'); INSERT INTO pt_test (pt) VALUES ('00000000010000000200000003000000030005'); INSERT INTO pt_test (pt) VALUES ('00000000010000000300000004000000030006'); SELECT PC_Get(pt, 'Intensity') FROM pt_test; SELECT Sum(PC_Get(pt, 'y')) FROM pt_test; SELECT PC_AsText(pt) FROM pt_test; CREATE TABLE IF NOT EXISTS pa_test ( pa PCPATCH(1) ); \d pa_test DELETE FROM pa_test; INSERT INTO pa_test (pa) VALUES ('0000000002000000000000000200000002000000030000000500060000000200000003000000050008'); INSERT INTO pa_test (pa) VALUES ('0000000001000000000000000200000002000000030000000500060000000200000003000000050008'); INSERT INTO pa_test (pa) VALUES ('000000000100000000000000020000000600000007000000050006000000090000000A00000005000A'); SELECT PC_AsText(pa) FROM pa_test; SELECT PC_Envelope(pa) from pa_test; SELECT PC_AsText(PC_Patch(pt)) FROM pt_test; SELECT PC_AsText(PC_Explode(PC_Patch(pt))) FROM pt_test; --DROP TABLE pts_collection; --DROP TABLE pt_test; --DROP TABLE pa_test;