com.esri.arcgis.geometry
Interface IHitTest

All Superinterfaces:
Serializable
All Known Implementing Classes:
Envelope, MultiPatch, Multipoint, Point, Polygon, Polyline

public interface IHitTest
extends Serializable

Provides access to members that locate a part of a geometry closest to a point.

Product Availability

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


Method Summary
 boolean hitTest(IPoint queryPoint, double searchRadius, int geometryPart, IPoint hitPoint, double[] hitDistance, int[] hitPartIndex, int[] hitSegmentIndex, boolean[] bRightSide)
          Locates a part of a geometry closest to a query point.
 

Method Detail

hitTest

boolean hitTest(IPoint queryPoint,
                double searchRadius,
                int geometryPart,
                IPoint hitPoint,
                double[] hitDistance,
                int[] hitPartIndex,
                int[] hitSegmentIndex,
                boolean[] bRightSide)
                throws IOException,
                       AutomationException
Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.

Remarks

The segment index returned has different meanings depending on the esriGeometryHitPartType used (Please see the example for more details).


EsriGeometryPartVertex: returns a vertex index


EsriGeometryPartBoundary, esriGeometryPartMidpoint and esriGeometryPartEndpoint: return a segment index


EsriGeometryPartCentroid: Always returns 0 for the part index and the segment index.

brightside: Indicates if the input point is on the right side of the input geometry

Note: The distance units use in this method are the units of the input geometry. No conversion is performed. esriGeometryHitPartType parameter cannot be a combination of several esriGeometryHitPartTypes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
queryPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
searchRadius - The searchRadius (in)
geometryPart - A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
hitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
hitDistance - The hitDistance (in/out: use single element array)
hitPartIndex - The hitPartIndex (in/out: use single element array)
hitSegmentIndex - The hitSegmentIndex (in/out: use single element array)
bRightSide - The bRightSide (in/out: use single element array)
Returns:
The bHit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.