com.esri.arcgis.carto
Interface IIndexQuery2

All Superinterfaces:
Serializable
All Known Implementing Classes:
FeatureIndex

public interface IIndexQuery2
extends Serializable

Provides access to members that control the index created with IFeatureIndex.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 IFeatureCursor getWithin(IGeometry pShape)
          Finds all features that the input shape lies within.
 void intersectedFeatures(IGeometry pShape, Object[] pSAIds)
          Finds all intersected features in index to the input shape.
 void nearestFeature(IGeometry pShape, int[] pClosestFeatureFID, double[] pDistance)
          Finds the nearest feature in index to the input shape.
 void nearestFeatures(IGeometry pShape, Object[] pSAIds, double[] pDistance)
          Finds all nearest features in index to the input shape (i.e.
 int withinFeature(IGeometry pShape)
          Finds the first feature that the input shape lies within.
 

Method Detail

nearestFeature

void nearestFeature(IGeometry pShape,
                    int[] pClosestFeatureFID,
                    double[] pDistance)
                    throws IOException,
                           AutomationException
Finds the nearest feature in index to the input shape.

Description

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pClosestFeatureFID - The pClosestFeatureFID (out: use single element array)
pDistance - The pDistance (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWithin

IFeatureCursor getWithin(IGeometry pShape)
                         throws IOException,
                                AutomationException
Finds all features that the input shape lies within.

Product Availability

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

Parameters:
pShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureCursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nearestFeatures

void nearestFeatures(IGeometry pShape,
                     Object[] pSAIds,
                     double[] pDistance)
                     throws IOException,
                            AutomationException
Finds all nearest features in index to the input shape (i.e. equal distance).

Description

Returns the nearest indexed features in a variant array and the distance to them based on the input shape.

It is similar to the NearestFeature (no final S) method except that if two or more features are found as the closest and so are exactly at the same distance from the source geometry, then all those are returned in the array.

Pass the returned array into IFeatureClass.GetFeatures to get the corresponding features.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pSAIds - A Variant (out: use single element array)
pDistance - The pDistance (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

intersectedFeatures

void intersectedFeatures(IGeometry pShape,
                         Object[] pSAIds)
                         throws IOException,
                                AutomationException
Finds all intersected features in index to the input shape.

Description

Returns the indexed features in an variant array that intersect the input shape.

Pass the returned array into IFeatureClass.GetFeatures to get the corresponding features

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pSAIds - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

withinFeature

int withinFeature(IGeometry pShape)
                  throws IOException,
                         AutomationException
Finds the first feature that the input shape lies within.

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pShape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
The pWithinFeatureFID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.