> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_Zmflag

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.

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_Zmflag/ST_Zmflag.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=eb701a001cb11d1ba63ff1f734cbfc1b" alt="ST_Zmflag" width="500" height="300" data-path="images/sql-functions/ST_Zmflag/ST_Zmflag.svg" />

## Signatures

```sql theme={"system"}
ST_Zmflag(geom: Geometry)
```

## Parameters

<ParamField body="geom" type="Geometry" required>
  The input geometry.
</ParamField>

## Return type

<ResponseField type="Integer">
  An integer value.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT ST_Zmflag(
        ST_GeomFromWKT('LINESTRING Z(1 2 3, 4 5 6)')
)
```

```
2
```

```sql theme={"system"}
SELECT ST_Zmflag(
        ST_GeomFromWKT('POINT ZM(1 2 3 4)')
)
```

```
3
```
