ST_patchAvg

Updated at:

Computes the average of each attribute dimension across all pcpoint objects in a pcpatch object and returns a new pcpoint whose attribute dimensions are set to those averages.

Syntax

pcpoint ST_patchAvg(pcpatch pc);

Parameters

ParameterDescription
pcThe pcpatch object.

Examples

SELECT ST_AsText(ST_PatchAvg(pa)) FROM patches WHERE id = 7;

Output:

{"pcid":1,"pt":[-126.46,45.54,54.5,5]}