Skip To Content

Spatial relationships in ArcGIS GeoAnalytics Server

The Join Features  tool allows you to join features in one layer based on their location relative to features in another layer. This is referred to as a spatial join. Along with a spatial join, Join Features also allows you to apply a temporal join and an attribute join. In defining the spatial join, there are a number of spatial relationships to select the point, polyline, or polygon features in one layer that exhibit the relationship of interest with the features in another layer.

For example, if you want to find out how many homes were affected by a recent flood, you can join the homes layer to the flood boundary with the spatial relationship Within.

Join and target layers

A spatial join involves matching features from the join layer to the target layer based on the features' relative spatial locations.

The following legend applies to all the examples in this topic:

  • Target features—Green
  • Join features—Purple
  • Target feature exhibits the selected spatial relationship with join feature—Red highlight

Spatial relationships in ArcGIS GeoAnalytics Server

It's important to understand that spatial relationships between features is that each type of geometry (point, polyline, and polygon) has an interior and a boundary. How two geometries' boundaries and interiors compare determine the spatial relationship they exhibit. The following image outlines the geometries, boundaries, and interiors of points, polylines, and polygons:

Boundaries and interiors of geometries used in spatial relationships for

The relationships supported in ArcGIS GeoAnalytics Server are Clementini, meaning a polygon boundary is separate from its interior and exterior.

Geometry types and supported relationships

The following table displays which spatial relationships are supported for a spatial join between geometries of a given type (for example, joining points to other points):

Spatial join (target to join feature) between:EqualsIntersectsContainsWithinCrossesTouchesOverlapsNear

Point and point

Check markCheck markCheck markCheck markCheck mark

Point and polyline

Check markCheck markCheck markCheck mark

Point and polygon

Check markCheck markCheck markCheck mark

Polyline and point

Check markCheck markCheck markCheck mark

Polyline and polyline

Check markCheck markCheck markCheck markCheck markCheck markCheck markCheck mark

Polyline and polygon

Check markCheck markCheck markCheck markCheck mark

Polygon and point

Check markCheck markCheck markCheck mark

Polygon and polyline

Check markCheck markCheck markCheck markCheck mark

Polygon and polygon

Check markCheck markCheck markCheck markCheck markCheck markCheck mark

Equals

A target feature is equal to a join feature if their interiors are identical and the geometry types are the same.

The target features in green are highlighted with red when they are equal to the purple features.

Spatial relationship type Equals

Intersects

A target feature intersects a join feature if it shares any portion of its geometry with the join feature. If a target feature contains, is within, crosses, touches, or overlaps a join feature, it is intersecting.

The target features in green are highlighted with red when they intersect the purple features.

Spatial relationship type Intersects

Contains

A target feature contains a join feature if the join feature is a subset of the target feature, with intersecting interiors. If the join feature is on the boundary and intersects the interior, the target feature contains the joined feature. If the join feature is only on the boundary (and not the interior), the target feature does not contain the joined feature.

This is the inverse of the operator Within.

The target features in green are highlighted with red when they contain the purple features.

Spatial relationship type Contains

Within

A target feature is within a join feature if it is completely inside the join feature. A feature is within if the intersection of the interiors is nonempty and the target feature is a subset of the join features. If there is no intersecting interior, the join feature is not within the target feature.

This is the inverse of the operator Contains.

The target features in green are highlighted with red when they are within the purple features.

Spatial relationship type Within

Crosses

Two polylines cross if their intersection contains only points, and at least one of the points of intersection is internal to both polylines. A polyline and polygon cross if a connected part of the polyline is partly inside and partly outside the polygon. A polyline and polygon cross if they share a polyline in common on the interior of the polygon, which is not equal to the entire polyline. The target and join features must be either polylines or polygons.

The target features in green are highlighted with red when they cross the purple features.

Spatial relationship type Crosses

Touches

A target feature touches a join feature if they have an intersecting vertex, but the features do not overlap.

Spatial relationship type Touches

Overlaps

Two geometries overlap if they are the same geometry type, and their intersection also has the same geometry type but the intersection is different from both of the original geometries.

Spatial relationship type Overlaps

Near

Conceptually, this operator buffers the target features using the specified distance and returns all the target features that intersect the join features with the buffer applied.

The target features in green, with a near distance buffer (light green), are highlighted with red when they are near the purple join features.

Spatial relationship type Near

Related topics