Select to view content in your preferred language

Get the shortest line between 2 features

535
1
10-24-2011 05:49 AM
EtienneDeschenes
Emerging Contributor
Hello,

I'm trying to draw (and save in a feature class) the shortest line between two features (lines).
I can get the shortest distance with the IProximityOperator but I can't find a way to get the actual line (or both points, or angle and point of origin like the generate near table does).

Thank you!

Etienne
0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor
Etienne,

The IProximityOperator Interface has a method called ReturnNearestPoint.  You would get a handle on your 2 lines and use this method in both directions to build an ILine geometry from the 2 points?

Duncan
0 Kudos