ST_Dimension — The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension.
The inherent dimension of this Geometry object, which must
be less than or equal to the coordinate dimension. OGC SPEC
s126.96.36.199 - returns 0 for
, 1 for
, 2 for
the largest dimension of the components of a
If the dimension is unknown (empty
) 0 is returned.
This method implements the SQL/MM specification. SQL-MM 3: 5.1.2
Enhanced: 2.0.0 support for Polyhedral surfaces and TINs was introduced. No longer throws an exception if given empty geometry.
Prior to 2.0.0, this function throws an exception if used with empty geometry.
This function supports Polyhedral surfaces.
This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).
SELECT ST_Dimension('GEOMETRYCOLLECTION(LINESTRING(1 1,0 0),POINT(0 0))'); ST_Dimension ----------- 1