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
| Parameter | Type | Default | Description |
|---|---|---|---|
pc | pcpatch | — | The pcpatch object whose schema is being changed. |
pcid | integer | — | The ID of the target schema. The ID comes from the pointcloud_formats table. |
def | float8 | 0.0 | The 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)该文章对您有帮助吗?