ST_GeometryN

Updated at:

Returns the Nth component of a sub-object.

Syntax

meshgeom ST_NumGeometries(meshgeom geom, integer index );
meshgeom ST_NumGeometries(sfmesh sfmeshObject, integer index );

Parameters

Parameter Name

Description

geom

The meshgeom object.

sfmeshObject

The sfmesh object.

index

The zero-based index of the geometry component.

Description

Returns the Nth component of a child object.

Examples

select ST_AsText(ST_GeometryN('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1), INDEX((0,1,2),(1,2,3)))))'::meshgeom, 0));

------------------------------------------------------------------------------
 MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))