[postgis-users] How to get the nearest point for a given point from a geometry of multilinestring

Thilani Imalka thilanii at gmail.com
Mon Jul 20 23:40:49 PDT 2009


Thanks a lot.I will try with this and let you know the result.
Thilani

On Tue, Jul 21, 2009 at 10:43 AM, Kevin Neufeld<kneufeld at refractions.net> wrote:
> 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
>>
>
> _______________________________________________
> 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