1

polylines A, B, and C meet at point P1. Whats a quick way that I could find out which line is closest to polyline A using arcobjects ?

At first I used IProximityOperator by casting PolylineA and then using ReturnDistance method on the other polylines, but I kept getting a 0 in return. I thought it was because they were connected.

var proxyOpt=(IProximityOperator)polylineA.Geometry;
foreach(var polyline in polylines){ 
  // I keep getting Zero
  var distance = proxyOpt.ReturnDistance(polyline.Geometry)
 }

Should I try connecting the polylines, and using the angles between the 2 lines instead ?

  • 1
    I'm not following this. If all lines meet at point P1 then they are all connected so I'm not surprised that the proximity operator is returning 0. If they meet they are already connected. – Dowlers Jun 2 '17 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.