This topic describes the ST_Zmflag function. This function returns an integer that represents the ZM flag of a geometry object.

Syntax

smallint  ST_Zmflag(geometry  geomA);

Parameters

Parameter Description
geomA The geometry object that you want to specify.

Description

  • The meaning of the return values:
    • 0: The ZM flag of the geometry object is a 2D point object.
    • 1: The ZM flag of the geometry object is a 3DM point object.
    • 2: The ZM flag of the geometry object is a 3DZ point object.
    • 3: The ZM flag of the geometry object is a 4D point object.
  • The ST_Zmflag function supports 3D objects and does not delete z coordinates.
  • The ST_Zmflag function supports circular strings and curves.

Examples

The following examples show the return values for different types of geometry objects:
SELECT ST_Zmflag('POINT(0 1)'::geometry) as _2D,
       ST_Zmflag('POINTM(0 1 2)'::geometry) as _3DM,
             ST_Zmflag('POINT(0 1 2)'::geometry) as _3DZ,
       ST_Zmflag('POINT(0 1 2 3)'::geometry) as _4D;
 _2d | _3dm | _3dz | _4d
-----+------+------+-----
   0 |    1 |    2 |   3
(1 row)