# SpatialRelationship Class

Enumerates different types of spatial relationships between geometries that can be tested for. More...

Since: | Esri::ArcGISRuntime 100.0 |

## Detailed Description

Enumerates different types of spatial relationships between geometries that can be tested for.

Geometry tests compare a base (first) geometry to a comparison (second) geometry, though for most relationships, this order does not matter.

The SpatialRelationship can be one of:

Value | Description |
---|---|

SpatialRelationship::Unknown (-1) | Unknown relationship. |

SpatialRelationship::Relate (0) | Matched a spatial relationship function. |

SpatialRelationship::Equals (1) | Geometries are equal. |

SpatialRelationship::Disjoint (2) | The intersection of the geometries is empty. |

SpatialRelationship::Intersects (3) | The geometries are not disjoint. |

SpatialRelationship::Touches (4) | The intersection of the geometries is not empty, while the intersection of their interiors is empty. |

SpatialRelationship::Crosses (5) | Two polylines cross if they share only points in common, at least one of which is not an endpoint. A polyline and a polygon cross if they share a polyline in common on the interior of the polygon which is not equivalent to the entire polyline. |

SpatialRelationship::Within (6) | The base geometry is equal to its intersection with the comparison geometry and the intersection of their interiors is not empty. |

SpatialRelationship::Contains (7) | Same relationship as SpatialRelationshipWithin, but with the base and comparison geometry roles swapped. |

SpatialRelationship::Overlaps (8) | The dimension of both geometries and the intersection of the geometries are all the same, and intersection of the geometries is not equal to either of the geometries. (See Geometry for description of dimension.) |

SpatialRelationship::EnvelopeIntersects (9) | The minimum bounding envelope of the two geometries have the SpatialRelationshipIntersects relationship. |

SpatialRelationship::IndexIntersects (10) | The base geometry intersects one or more spatial index entries for the comparison geometry, indicating that the geometries may intersect or are close to each other. |

**See also **Geometry.