[postgis-users] the nearest point of a line from a point
sylvain dubouis
sdubouispostgis at gmail.com
Wed Jan 30 09:48:59 PST 2008
Thanks Kevin,
It seems to be the good solution, but I can't execute "st_" functions :
ERROR: function st_line_locate_point(geometry, geometry) does not exist
HINT: No function matches the given name and argument types. You may need
to add explicit type casts.
Do you know why? and how I can Install this functions on my
postgresql/postgis server
Sylvain
2008/1/30, Kevin Neufeld <kneufeld at refractions.net>:
>
> 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 at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080130/9efb4a6f/attachment.html>
More information about the postgis-users
mailing list