It works,<br>thanks for your help<br><br><div><span class="gmail_quote">2008/1/30, Kevin Neufeld <<a href="mailto:kneufeld@refractions.net">kneufeld@refractions.net</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Sylvain,<br><br>ST_ prefixed functions is the new way to access PostGIS methods,<br>following the SQL-MM specifications. It sounds like you'll need to<br>upgrade your PostGIS version.<br><br>See this thread in the archives for more info.<br>
<a href="http://postgis.refractions.net/pipermail/postgis-users/2007-September/016997.html">http://postgis.refractions.net/pipermail/postgis-users/2007-September/016997.html</a><br><br>-- Kevin<br><br>sylvain dubouis wrote:<br>
> Thanks Kevin,<br>> It seems to be the good solution, but I can't execute "st_" functions :<br>><br>> ERROR: function st_line_locate_point(geometry, geometry) does not exist<br>> HINT: No function matches the given name and argument types. You may<br>
> need to add explicit type casts.<br>><br>> Do you know why? and how I can Install this functions on my<br>> postgresql/postgis server<br>><br>> Sylvain<br>><br>> 2008/1/30, Kevin Neufeld <<a href="mailto:kneufeld@refractions.net">kneufeld@refractions.net</a><br>
> <mailto:<a href="mailto:kneufeld@refractions.net">kneufeld@refractions.net</a>>>:<br>><br>> See the section on linear referencing (sec. 6.2.7).<br>> (<a href="http://postgis.refractions.net/docs/ch06.html#id2775904">http://postgis.refractions.net/docs/ch06.html#id2775904</a>)<br>
><br>> You'll need to use two methods.<br>><br>> ST_line_locate_point(LineString, Point) returns the percentage<br>> along the<br>> the LineString the closest point will occur.<br>><br>
> ST_line_interpolate_point(linestring, location) returns the geometric<br>> point given a LineString and a percentage along.<br>><br>> SELECT ST_line_interpolate_point(line_geom,<br>> ST_line_locate_point(line_geom, point_geom))<br>
> FROM ...<br>><br>> Cheers,<br>> Kevin<br>><br>> sylvain dubouis wrote:<br>> > hello, I have a point and a line.<br>> > I'd like to know the nearest point on the line from the point.<br>
> > but I don't find any function to do this... is there one?<br>> > thanks for your help.<br>> > Sylvain<br>> ><br>> ------------------------------------------------------------------------<br>
> ><br>> > _______________________________________________<br>> > postgis-users mailing list<br>> > <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <mailto:<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>> > <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
> ><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <mailto:<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br>_______________________________________________<br>postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br>