ST_Dimension

更新时间:
复制 MD 格式

Returns the maximum dimension of a geometry object, based on OGC SF 1.2.1.

Syntax

int4 ST_Dimension(meshgeom geom);
int4 ST_Dimension(sfmesh sfmeshObject);

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshObjectThe sfmesh object.

Return values

The return value depends on the geometry type of the input object:

Input typeReturn value
Point0
LineString1
Polygon2
meshgeomMaximum dimension value across all Patch-type objects

Examples

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

Output:

 st_dimension
--------------
            2