ST_makePatch

更新时间:
复制 MD 格式

Constructs a pcpatch object from a point cloud schema ID and an array of point values.

Syntax

pcpatch ST_makePatch(integer pcid, float8[] vals);

Parameters

Parameter name

Description

pcid

The ID of the point cloud schema. The value comes from the pointcloud_formats table.

vals

The array of point values as float8 (double precision) values. The number of elements must be an integral multiple of the number of dimensions defined in the schema.

Examples

The following example constructs a patch from three points and returns it as text.

SELECT ST_asText(ST_MakePatch(1, ARRAY[-126.99,45.01,1,0, -126.98,45.02,2,0, -126.97,45.03,3,0]));

Output:

{"pcid":1,"pts":[
 [-126.99,45.01,1,0],[-126.98,45.02,2,0],[-126.97,45.03,3,0]
]}