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

esriSpatialRelEnum Constants (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Constants > E > esriSpatialRelEnum Constants
ArcGIS Developer Help

esriSpatialRelEnum Constants

Queryable Spatial Relationships.

Constant Value Description
esriSpatialRelUndefined 0 No Defined Spatial Relationship.
esriSpatialRelIntersects 1 Query Geometry Intersects Target Geometry.
esriSpatialRelEnvelopeIntersects 2 Envelope of Query Geometry Intersects Envelope of Target Geometry.
esriSpatialRelIndexIntersects 3 Query Geometry Intersects Index entry for Target Geometry (Primary Index Filter).
esriSpatialRelTouches 4 Query Geometry Touches Target Geometry.
esriSpatialRelOverlaps 5 Query Geometry Overlaps Target Geometry.
esriSpatialRelCrosses 6 Query Geometry Crosses Target Geometry.
esriSpatialRelWithin 7 Query Geometry is Within Target Geometry.
esriSpatialRelContains 8 Query Geometry Contains Target Geometry.
esriSpatialRelRelation 9 Query geometry IBE(Interior-Boundary-Exterior) relationship with target geometry.

Product Availability

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



Used when the spatial relationship is not known at the time of object creation.


Returns a feature if any spatial relationship is found. Applies to all shape type combinations.


Returns a feature if the envelope of the two shapes intersects.


Returns a feature if the envelope of the query geometry intersects the index entry for the target geometry.  Because it uses the underlying index grid, rather than the evelope of the feature, it is faster and is commonly used for return features for display purposes.


Returns a feature if the two shapes share a common boundary. However, the intersection of the interiors of the two shapes must be empty. In the Point/Line case, the point may touch an endpoint only of the line. Applies to all combinations except Point/Point.


Returns a feature if the intersection of the two shapes results in an object of the same dimension, but different from both of the shapes. Applies to Area/Area, Line/Line, and Multi-point/Multi-point shape type combinations.


Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes. Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations.


Returns a feature if its shape wholly contains the search geometry. Valid for all shape type combinations.


Returns a feature if its shape is wholly contained within the search geometry. Valid for all shape type combinations.


This is the expected value for ISpatialFilter::SpatialRel when using ISpatialFilter::SpatialRelDescription to define a custom spatial relationship. See the help on ISpatialFilter for details.

See Also

ISpatialFilter Interface | esriSpatialRelEnum Constants

.NET Samples

Cut polygons without selection edit task Editing using a custom form ViperPin tool