This function compresses a pcpatch object based on the specified compression method.

Syntax

pcpatch ST_compress(pcpatch pc, text global_compression_schema default '', text compression_config default '');

Parameters

Parameter Description
pc The pcpatch object.
global_compression_schema The compression schema.
compression_config The compression configuration item that specifies the compression algorithm for specific dimensions.

Description

Valid values of the global_compression_schema parameter include:

auto           -- determined by pcid
dimension 
laz             -- no compression config supported
ght            -- is discarded

If the global_compression_schema parameter is set to dimension, valid values of the compression_config parameter include:

auto -- determined automatically, from values stats
zlib -- deflate compression
sigbits -- significant bits removal
rle -- run-length encoding

Examples

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

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