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


ISpatialFilter.SpatialRel Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

ISpatialFilter.SpatialRel Property

The spatial relationship checked by the filter.

[Visual Basic .NET]
Public Property SpatialRel As esriSpatialRelEnum
[C#]
public esriSpatialRelEnum SpatialRel {get; set;}
[C++]
HRESULT get_SpatialRel(
  esriSpatialRelEnum* SpatialRel
);
[C++]
HRESULT put_SpatialRel(
  esriSpatialRelEnum SpatialRel
);
[C++]

Parameters SpatialRel [out, retval]
SpatialRel is a parameter of type esriSpatialRelEnum SpatialRel [in]
SpatialRel is a parameter of type esriSpatialRelEnum

Product Availability

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

Description

Tolerances

Most spatial relationships are defined by the intersection of boundaries, interior and exterior. All shapes have an interior. Lines and polygons have a boundary. Most spatial relations use a tolerance when examining the spatial relationship between two features. In most cases this tolerance is the XY tolerance of the search feature. All geometries within the tolerance are seen as intersecting. In the overlaps case the tolerance sets the minimum overlap. Geometries that overlap less than the tolerance will not be seen as overlapping.

Tolerance

Relationships that use the XY tolerance:

esriSpatialRelIntersects
esriSpatialRelEnvelopeIntersects
esriSpatialRelTouches
esriSpatialRelOverlaps
esriSpatialRelCrosses
esriSpatialRelWithin
esriSpatialRelContains

The esriSpatialRelRelation uses the XY resolution. Usually ten times smaller than the XY tolerance.

esriSpatialRelIndexIntersects does not use a tolerance.

See Also

ISpatialFilter Interface

.NET Snippets

Get First Feature from Point Search in GeoFeatureLayer | Perform Spatial Query

.NET Samples

Editing using a custom form (Code Files: EditorForm) | ViperPin tool (Code Files: ViperPinForm)

.NET Related Topics

Developing SOAP server object extensions | Executing spatial queries | How to download images from an image service | How to query an image service | Map services