Skip to main content
Returns a code indicating the Z and M coordinate dimensions present in the input geometry. Values are: 0 = 2D, 1 = 3D-M, 2 = 3D-Z, 3 = 4D. ST_Zmflag

Signatures

ST_Zmflag(geom: Geometry)

Parameters

geom
Geometry
required
The input geometry.

Return type

An integer value.

Examples

SELECT ST_Zmflag(
        ST_GeomFromWKT('LINESTRING Z(1 2 3, 4 5 6)')
)
2
SELECT ST_Zmflag(
        ST_GeomFromWKT('POINT ZM(1 2 3 4)')
)
3