IProximityOperator
ArcObjects Geomtery 관련 인터페이스 중 Geometry를 핸들링하는 가장 중요한 인터페이스가 무엇일까? 선택하라면 아마도 ITopologicalOperator, IRelationalOperator, IProximityOperator일 것이다. 여기에서는 그 중 인접성과 관련된 연산을 수행하는 IProximityOperator의 메쏘드를 살펴본다. IProximityOperator 인터페이스는 두 Geometry간의 거리를 계산하거나 주어진 포인트로부터 다른 Geometry 의 가장 가까운 포인트나 가장 가까운 포인트간의 거리를 계산하는데 사용한다. ▣ CoClasses that implement IProximityOperator - BezierCurve, CircularArc, EllipticArc, Envelope, Line, Multipoint, Point, Polygon, Polyline - esriDefenseSolutions: GeoEllipse, GeoPolygon, GeoPolyline ▣ Members ① QueryNearestPoint 주어진 포인트에서 대상 Geometry 간의 가장 가까운 포인트를 쿼리(copy)한다. segment extension 옵션에 의해 가장 가까운 포인트는 Geometry 의 extension을 이용해서도 계산될 수 있다. 다음 코드에서와 같이 QuerynearestPoint를 호출하기 위해서 InputPoint( nearest Point) 는 반드시 호출하기 전에 할당할 것. [C#]public void QueryNearestPoint (IPoint p, esriSegmentExtension extension, IPoint nearest); [code c#] IPoint fromPoint = new ESRI.ArcGIS.Geometry.PointClass(); IPoint toPoint = new ESRI.ArcGIS.Geometry.PointClass(); fromPoint.PutCoords(...