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

Returns a double between 0 and 1, representing the location of the closest point on the LineString as a fraction of its total length. The first argument must be a LINESTRING, and the second argument is a POINT geometry.

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

## Signatures

```sql theme={"system"}
ST_LineLocatePoint(linestring: Geometry, point: Geometry)
```

## Parameters

<ParamField body="linestring" type="Geometry" required>
  The linestring value.
</ParamField>

<ParamField body="point" type="Geometry" required>
  The point value.
</ParamField>

## Return type

<ResponseField type="Double">
  A numeric value.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_LineLocatePoint(ST_GeomFromWKT('LINESTRING(0 0, 1 1, 2 2)'), ST_GeomFromWKT('POINT(0 2)'))
```

```
0.5
```
