[postgis-users] How to get the nearest point for a given point from a geometry of multilinestring
Kevin Neufeld
kneufeld at refractions.net
Mon Jul 20 22:13:14 PDT 2009
If I understand you correctly, you could first find the 2-point line
segment within your multilinestring that is within some tolerable
distance to your intersection point. The endpoints of the linesegment
would be vertices closest to your intersection point.
Here's an old way of extracting the line segments from a linestring if
it helps.
http://postgis.refractions.net/pipermail/postgis-users/2008-March/018734.html
Or, use ST_Line_Locate_Point
(http://www.postgis.org/documentation/manual-svn/ST_Line_Locate_Point.html)
to determine the percentage along your linestring the intersection point
occurs. Then for every vertex determine their percentage along to find
the two vertices of interest.
-- Cheers,
Kevin
Thilani Imalka wrote:
> We used ST_Intersection function to get the cross point when roads are
> crossing each other. So with the output of this function we have the
> crossing point and now we need to get adjacent points to that crossing
> point from the road (where the road is a geometry of
> multilinestring).Is there any post GIS function to get those adjacent
> points or any combination of functions to get the correct output
> Basically we need to get the nearest point for a given point from a
> geometry of multilinestring.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list