This topic describes the ST_NDims function. This function returns the dimension of the coordinate values of an object.

Syntax

int2 ST_NDims(meshgeom geom);
int2 ST_NDims(sfmesh sfmesh);

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshThe sfmesh object.

Description

This function returns the dimension of the coordinate values of a meshgeom or sfmesh object. This function works the same as the ST_CoordDim function.

Examples

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

-------------
           3