Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
[Visual Basic .NET] Public Sub QueryPointAndDistance ( _ ByVal extension As esriSegmentExtension, _ ByVal inPoint As IPoint, _ ByVal asRatio As Boolean, _ ByVal outPoint As IPoint, _ ByRef DistanceAlongCurve As Double, _ ByRef distanceFromCurve As Double, _ ByRef bRightSide As Boolean _ )
[C#] public void QueryPointAndDistance ( esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide );
[C++]
HRESULT QueryPointAndDistance(
esriSegmentExtension extension,
IPoint* inPoint,
VARIANT_BOOL asRatio,
IPoint* outPoint,
double* DistanceAlongCurve,
double* distanceFromCurve,
VARIANT_BOOL* bRightSide
);
[C++]Parameters
extensionextension is a parameter of type esriSegmentExtension
inPointinPoint is a parameter of type IPoint
asRatio asRatio is a parameter of type VARIANT_BOOL outPointoutPoint is a parameter of type IPoint
DistanceAlongCurve [in, out] DistanceAlongCurve is a parameter of type double distanceFromCurve [in, out] distanceFromCurve is a parameter of type double bRightSide [in, out] bRightSide is a parameter of type VARIANT_BOOL
Product Availability
Description
Finds the Point on the specified extended curve nearest to the input point and the distance between those points. Also returns information about the side of the curve the input point is on as well as the distance along the curve that the nearest point occurs.
Remarks
AsRatio is an input parameter that only affects the DistanceAlongCurve
distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.
DistanceAlongCurve is an output parameter that represents the distance between the Frompoint of the input curve and the returned point on the curve.
bRightSide is an output parameter that tells if the output point is on the right side of the curve. The direction of the curve determines the right and left sides.
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
See Also
ICurve Interface | IPoint Interface