ST_3DArea

更新时间:
复制 MD 格式

Calculates the surface area of a 3D sfmesh or meshgeom object.

Syntax

float8 ST_3DArea(meshgeom geom);
float8 ST_3DArea(sfmesh sfmeshObject);

Parameters

ParameterTypeDescription
geommeshgeomThe meshgeom object.
sfmeshObjectsfmeshThe sfmesh object.

Usage notes

  • Returns 0 for point and linestring geometries.

  • Returns NULL if geom is invalid.

Examples

Calculate the surface area of a meshgeom object:

SELECT ST_3DArea('MESHGEOM(PATCH(INDEXSURFACE  Z(VERTEX(0 0 0,0 10 0,0 0 10,10 0  0), INDEX((0,1,2),(1,0,3)))))'::meshgeom);

Output:

-----------
       100