This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > II > IIndexQuery2 Interface > IIndexQuery2.WithinFeature Method (ArcObjects .NET 10.4 SDK) |
Finds the first feature that the input shape lies within.
[Visual Basic .NET] Public Function WithinFeature ( _ ByVal pShape As IGeometry _ ) As Integer
[C#] public int WithinFeature ( IGeometry pShape );
[C++]
HRESULT WithinFeature(
IGeometry* pShape,
long* pWithinFeatureFID
);
[C++]
Parameters pShape [in]
pShape is a parameter of type IGeometry pWithinFeatureFID [out, retval] pWithinFeatureFID is a parameter of type long
Returns the ObjectID of the first feature in the spatial index for which the input shape is within. -1 is returned in the case where the input shape is not within any features in the index.