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

Return the topological dimension of this Geometry object, which must be less than or equal to the coordinate dimension. OGC SPEC s2.1.1.1 - returns 0 for POINT, 1 for LINESTRING, 2 for POLYGON, and the largest dimension of the components of a GEOMETRYCOLLECTION. If the dimension is unknown (e.g. for an empty GEOMETRYCOLLECTION) 0 is returned.

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

## Signatures

```sql theme={"system"}
ST_Dimension (A: Geometry) | ST_Dimension (C: Geometrycollection)
```

## Parameters

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

## Return type

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

## Example

```sql theme={"system"}
SELECT ST_Dimension('GEOMETRYCOLLECTION(LINESTRING(1 1,0 0),POINT(0 0))');
```

```
1
```
