ST_ZMFlag
Name
ST_ZMFlag — Returns a code indicating the ZM coordinate dimension of a geometry.
Synopsis
smallint
ST_ZMFlag
(
geometry
geomA
)
;
Description
Returns a code indicating the ZM coordinate dimension of a geometry.
Values are: 0 = 2D, 1 = 3D-M, 2 = 3D-Z, 3 = 4D.
This function supports 3d and will not drop the z-index.
This method supports Circular Strings and Curves.
Examples
Code
SELECT ST_ZMFlag('LINESTRING(1 2,3 4)');
Output
0
Code
SELECT ST_ZMFlag('LINESTRINGM(1 2 3, 3 4 3)');
Output
1
Code
SELECT ST_ZMFlag('CIRCULARSTRING(1 2 3,3 4 3,5 6 3)');
Output
2
Code
SELECT ST_ZMFlag('POINT(1 2 3 4)');
Output
3