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

Return the Nth point in a single linestring or circular linestring in the geometry. Negative values are counted backwards from the end of the LineString, so that -1 is the last point. Returns NULL if there is no linestring in the geometry.

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

## Signatures

```sql theme={"system"}
ST_PointN(geom: Geometry, n: Integer)
```

## Parameters

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

<ParamField body="n" type="Integer" required>
  The index or count value.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_PointN(ST_GeomFromText('LINESTRING(0 0, 1 2, 2 4, 3 6)'), 2)
```

```
POINT (1 2)
```
