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
| Parameter | Description |
|---|---|
geom | The meshgeom object. |
sfmeshObject | The sfmesh object. |
Return values
The return value depends on the geometry type of the input object:
| Input type | Return value |
|---|---|
| Point | 0 |
| LineString | 1 |
| Polygon | 2 |
| meshgeom | Maximum 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该文章对您有帮助吗?