This topic describes the ST_LineLocatePoint function. This function returns a floating-point number within the range of 0 to 1 to represent the location of the closest point in a LineString object to a point object in contrast to the total length of the LineString object.

Syntax

float8  ST_LineLocatePoint(geometry  aLinestring , geometry  aPoint);

Parameters

Parameter Description
aLinestring The LineString object that you want to specify.
aPoint The point object that you want to specify.

Description

This function can be used to estimate the number of addresses.

Examples

SELECT ST_LineLocatePoint('LINESTRING(0 0,0 2)'::geometry, 'POINT(1 1)'::geometry);
 st_linelocatepoint
--------------------
                0.5
(1 row)