How to find the nearest line by a point?

Feb 12, 2011 at 12:32 PM

I downloaded the DotSpatial tools, but not find a function what find the nearest line by a point.

Who can tell me which function do?

My MSN: owen_ics@hotmail.com

Please join me and contact me, thanks.

Feb 13, 2011 at 2:56 AM

who can answer the question?

Coordinator
Feb 14, 2011 at 9:07 PM

This should be in the DotSpatial.Topology library

Feb 15, 2011 at 7:47 AM

I have tried to use the DotSpatial.Topology, but DistancePointLinePerpendicular and DistancePointLine maybe exist some accuracy problems. Finally, it can't get the intersection value by the compute distance.

Feb 15, 2011 at 7:48 AM

I have tried to use the DotSpatial.Topology, but DistancePointLinePerpendicular and DistancePointLine maybe exist some accuracy problems. Finally, it can't get the intersection value by the compute distance.

Developer
Feb 15, 2011 at 3:02 PM

There should be a "Distance" function no geometries like a LineString.  So if you create a DotSpatial.Topology.Point from your point in question, and a DotSpatial.Topology.LineString from each of the lines, you can then cycle through and get the distance in each case.

Ted

Dec 11, 2012 at 5:14 PM

Friends,

I'm also having the same problem.
Can anyone give tips on how to find the row closest to the point?

Sincerely,

Nov 29, 2014 at 1:13 PM
I could use a good clear answer on this too.... like some example code...