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


IIndexQuery2.WithinFeature Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Carto)  

IIndexQuery2.WithinFeature Method

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

Product Availability

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

Description

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.

See Also

IIndexQuery2 Interface