All Products
Search
Document Center

PolarDB:ST_Collect

Last Updated:Jun 08, 2023

This topic describes the ST_Collect function. This function merges two or more sfmesh objects based on a node.

Syntax

  • Syntax 1

    sfmesh ST_Collect(sfmesh sfmeshObject1, sfmesh sfmeshObject2);
  • Syntax 2

    sfmesh ST_Collect(sfmesh[] sfmesh_array);
  • Syntax 3

    sfmesh ST_Collect(setofsfmesh sfmesh_set);

Parameters

Parameter

Description

sfmeshObject

The sfmesh object.

sfmesh_array

An array of sfmesh objects.

sfmesh_set

The sfmesh object group.

Description

This function merges two or more sfmesh objects based on a node. This function only merges sfmesh objects based on a node. It does not crop and merge geometries and textures of sfmesh objects.

Examples

  • Syntax 1

    WITH tmp AS
    (
        SELECT num, the_mesh
        FROM t_mesh
        WHERE num IN (1, 3)
    )
    SELECT a.num, b.num,
         ST_AsText(st_Collect(a.the_mesh,  b.the_mesh))
    FROM tmp a, tmp b;
  • Syntax 2

    WITH tmp AS
    (
        SELECT num, the_mesh
        FROM t_mesh
        WHERE num IN (1, 3, 13, 14)
    )
    SELECT a.num, b.num,
        ST_AsText(st_Collect(ARRAY[a.the_mesh,  b.the_mesh]))
    FROM tmp a, tmp b;
  • Syntax 3

    WITH tmp AS
    (
         SELECT num, the_mesh
         FROM t_mesh
    )
    SELECT 
         ST_AsText(st_Collect(the_mesh))
    FROM tmp;