See the section on linear referencing (sec. 6.2.7). (http://postgis.refractions.net/docs/ch06.html#id2775904)

You'll need to use two methods.

ST_line_locate_point(LineString, Point) returns the percentage along the the LineString the closest point will occur.

ST_line_interpolate_point(linestring, location) returns the geometric point given a LineString and a percentage along.

SELECT ST_line_interpolate_point(line_geom, ST_line_locate_point(line_geom, point_geom))
FROM ...

Cheers,
Kevin

sylvain dubouis wrote:
hello, I have a point and a line.
I'd like to know the nearest point on the line from the  point.
but I don't find any function to do this... is there one?
thanks for your help.
Sylvain
------------------------------------------------------------------------

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to