This document is archived and information here might be outdated. Recommended version. |
Finds the nearest feature in index to the input shape.
[Visual Basic .NET] Public Sub NearestFeature ( _ ByVal pShape As IGeometry, _ ByRef pClosestFeatureFID As Integer, _ ByRef pDistance As Double _ )
[C#] public void NearestFeature ( IGeometry pShape, ref int pClosestFeatureFID, ref double pDistance );
[C++]
HRESULT NearestFeature(
IGeometry* pShape,
System.Int32* pClosestFeatureFID,
System.Double* pDistance
);
[C++]
Parameters pShape [in]
pShape is a parameter of type IGeometry* pClosestFeatureFID [out]
pClosestFeatureFID is a parameter of type long* pDistance [out]
pDistance is a parameter of type double*
Returns the nearest indexed feature and the distance to it based on the input shape.
Pass the returned long into IFeatureClass.GetFeature to get the corresponding feature.