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

ICurve3.QueryPointsAndDistances Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IC > ICurve3 Interface > ICurve3.QueryPointsAndDistances Method
ArcGIS Developer Help

ICurve3.QueryPointsAndDistances Method

Given an input point, calculates the minimum distance to the geometry and provides an enumerator over all closest points on the geometry, along with additional information.

[Visual Basic .NET]
Public Sub QueryPointsAndDistances ( _
    ByVal extension As esriSegmentExtension, _
    ByVal searchRadius As Double, _
    ByVal inPoint As IPoint, _
    ByVal asRatio As Boolean, _
    ByRef distanceFromCurve As Double, _
    ByRef pointsAndDistances As IEnumPointAndDistance _
public void QueryPointsAndDistances (
    esriSegmentExtension extension,
    double searchRadius,
    IPoint inPoint,
    bool asRatio,
    ref double distanceFromCurve,
    ref IEnumPointAndDistance pointsAndDistances
HRESULT QueryPointsAndDistances(
  esriSegmentExtension extension,
  double searchRadius,
  IPoint* inPoint,
  System.Double* distanceFromCurve,
  IEnumPointAndDistance** pointsAndDistances

extension is a parameter of type esriSegmentExtension searchRadius
searchRadius is a parameter of type double inPoint [in]
inPoint is a parameter of type IPoint* asRatio
asRatio is a parameter of type bool distanceFromCurve [in, out]
distanceFromCurve is a parameter of type double* pointsAndDistances [out]
pointsAndDistances is a parameter of type IEnumPointAndDistance**

Product Availability

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


This method is similar to QueryPointsAndDistance; but it handles the case where the location of the minimum distance is not unique (See picture below). QueryPointAndDistance returns only the first location, this method returns all locations of minimum distance.


AsRatio is an input parameter that only affects the DistanceAlongCurvereturned as part of the output IEnumPointAndDistance enumerator.

distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.

IEnumPointAndDistance is an enumerator (it inherits from IEnumVertex) over all nearest points on the curve

See Also

ICurve3 Interface