This document is archived and information here might be outdated.  Recommended version.


IProximityOperator.QueryNearestPoint Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Geometry)  

IProximityOperator.QueryNearestPoint Method

Copies into 'nearest' a point on this geometry nearest to the input point.

[Visual Basic .NET]
Public Sub QueryNearestPoint ( _
    ByVal p As IPoint, _
    ByVal extension As esriSegmentExtension, _
    ByVal nearest As IPoint _
)
[C#]
public void QueryNearestPoint (
    IPoint p,
    esriSegmentExtension extension,
    IPoint nearest
);
[C++]
HRESULT QueryNearestPoint(
  IPoint* p,
  esriSegmentExtension extension,
  IPoint* nearest
);
[C++]

Parameters p
p is a parameter of type IPoint* extension
extension is a parameter of type esriSegmentExtension nearest
nearest is a parameter of type IPoint*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Queries the nearest point on a geometry to the input point.  Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.

Remarks

 

QueryNearestPoint Example

See Also

IProximityOperator Interface | IProximityOperator.ReturnNearestPoint Method | esriSegmentExtension Constants