> ## 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_NDims

Returns the coordinate dimension of the geometry.

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

## Signatures

```sql theme={"system"}
ST_NDims(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_NDims(ST_GeomFromEWKT('POINT(1 1 2)'))
```

```
3
```

Spark SQL example with x,y coordinate:

```sql theme={"system"}
SELECT ST_NDims(ST_GeomFromText('POINT(1 1)'))
```

```
2
```
