ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data Namespace / SpatialQueryFilter Class / SpatialRelationshipDescription Property
Example

In This Topic
    SpatialRelationshipDescription Property
    In This Topic
    The DE-9IM matrix relation encoded as a string. This property is only applicable if the SpatialRelationship is SpatialRelationship.Relation.
    Syntax
    public string SpatialRelationshipDescription {get; set;}
    Public Property SpatialRelationshipDescription As String
    Example
    Spatial query filter with DE9-IM spatial relationships
    public void FindSpatiallyRelatedFeaturesUsingDE9IMPredicate(Geodatabase geodatabase, FeatureClass polygonFeatureClass, FeatureClass polylineFeatureClass)
    {
      using (RowCursor polygonRowCursor = polygonFeatureClass.Search(new QueryFilter()))
      {
        if (polygonRowCursor.MoveNext())
        {
          using (Feature polygonFeature = polygonRowCursor.Current as Feature)
          {
            // DE9IM predicate string to find overlapping features
            string overlappingDE9IM = "1*T***T**";
    
            SpatialQueryFilter spatialQueryFilter = new SpatialQueryFilter()
            {
              FilterGeometry = polygonFeature.GetShape(),
              SpatialRelationship = SpatialRelationship.Relation,
              SpatialRelationshipDescription = overlappingDE9IM
            };
    
            using (RowCursor overlappingPolyline = polylineFeatureClass.Search(spatialQueryFilter))
            {
              while (overlappingPolyline.MoveNext())
              {
                // Overlapping polylines on the polygon
              }
            }
          }
        }
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also