[postgis-users] topology point - linestring

Nicolas Ribot nicolas.ribot at gmail.com
Tue Jul 12 07:57:52 PDT 2011


> hi all,
>
> within a linear referencing task i need the shortest distances of all points
> to the linestring.
> that itself wouldn't be a problem with st_line_locate_point and st_distance,
> but i also need to know the topological position of the point relative to
> the linestring (left, right or on the linestring).
>
> e.g. the linear referencing tool in ArcGIS indicates the relative location
> of a point to a line by means of a (un-)signed distance value (the tool
> returns positive and negative distance values).
>
> i haven't found any postgis function yet for this problem.
> does anyone know of a function which solves this? or a workaround which runs
> as quick as possible?
>
> thanks in advance and
> best regards,
>
> matthias

Hi Matthias,

Maybe st_linecrossingdirection could be used ?
(http://postgis.refractions.net/documentation/manual-1.5/ST_LineCrossingDirection.html)
using a tiny linestring composed of one point and a slight translation
of this point ?

Nicolas



More information about the postgis-users mailing list