ST_setPcid

更新时间:
复制 MD 格式

Reassigns the schema of a pcpatch object and returns a new pcpatch with the updated schema applied.

Syntax

pcpatch ST_setPcid(pcpatch pc, integer pcid, float8 def default 0.0);

Parameters

ParameterTypeDefaultDescription
pcpcpatchThe pcpatch object whose schema is being changed.
pcidintegerThe ID of the target schema. The ID comes from the pointcloud_formats table.
deffloat80.0The fill value for attribute dimensions that exist in the new schema but not in the old schema.

Description

When a pcpatch is reassigned to a new schema, its attribute dimensions are handled as follows:

  • Dimensions present in the new schema but absent from the old schema are initialized to the value of def (default: 0.0).

  • Dimensions present in the old schema but absent from the new schema are discarded.

Examples

The following example reassigns all pcpatch values in the pa column to schema 2, using 0.0 as the fill value for any new dimensions:

UPDATE patches SET pa = ST_setPcid(pa, 2, 0.0);

Output:

(1 rows)