[postgis-users] Find LineString segment index containing closest point?

Sandro Santilli strk at kbt.io
Tue Aug 4 09:29:33 PDT 2020


On Tue, Aug 04, 2020 at 08:46:39AM -0700, Martin Davis wrote:

> The ST_ClosestPoint function (and the Linear Referencing functions) do have
> the segment index information internally.  It would be nice if there was an
> extended version of ST_ClosestPoint which returned a record with both the
> closest point and the index of the segment containing it.  Or perhaps an
> extended Linear Referencing function which returns the point, the segment
> index, and the fractional distance along the line.

I agree such a function would be great to have.
I filed a ticket to request that a long time ago:
https://trac.osgeo.org/postgis/ticket/892

It's looking for fundings, anyone interested ?

--strk;


More information about the postgis-users mailing list