This topic describes the ST_Npoints function. This function returns the total number of points.

Syntax

int4 ST_NPoints(meshgeom geom);
int4 ST_NPoints(sfmesh sfmesh);

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshThe sfmesh object.

Description

This function returns the total number of points.

Examples

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

------------
 4