ST_Dimension() method

Returns the dimension of the ST_Geometry value. Points have dimension 0, lines have dimension 1, and surfaces have dimension 2. Any empty geometry has dimension -1.

Syntax

geometry-expression.ST_Dimension()

Returns

SMALLINT Returns the dimension of the geometry-expression as a SMALLINT between -1 and 2.

Examples

Standards

SQL/MM (ISO/IEC 13249-3: 2006) 5.1.2