Spatial relationships in the GeoAnalytics Desktop toolbox

The Join Features  tool allows you to join features in one layer to features in another layer based on their relative locations. This is called 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 you can use 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, to find the number of homes that were affected by a recent flood, you could join the homes layer to the flood boundary using the Within spatial relationship operator.

Join and target layers

A spatial join matches 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 that exhibits the selected spatial relationship with join feature—Red highlight

Spatial relationships between features

In a spatial relationships between features, each type of geometry (point, polyline, and polygon) has an interior and a boundary. How the interiors and boundaries of two geometries compare determines the spatial relationship they exhibit.

Boundaries and interiors of geometries used in spatial relationships using the GeoAnalytics Desktop tools

The relationships supported by the GeoAnalytics Desktop tools are Clementini, meaning a polygon boundary is separate from its interior and exterior.

Geometry types and supported relationships

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

Spatial join (target to join feature) betweenEqualsIntersectsContainsWithinCrossesTouchesOverlapsPlanar NearGeodesic Near

Point and point

Check markCheck markCheck markCheck markCheck markCheck mark

Point and polyline

Check markCheck markCheck markCheck markCheck mark

Point and polygon

Check markCheck markCheck markCheck markCheck mark

Polyline and point

Check markCheck markCheck markCheck markCheck mark

Polyline and polyline

Check markCheck markCheck markCheck markCheck markCheck markCheck markCheck markCheck mark

Polyline and polygon

Check markCheck markCheck markCheck markCheck markCheck mark

Polygon and point

Check markCheck markCheck markCheck markCheck mark

Polygon and polyline

Check markCheck markCheck markCheck markCheck markCheck mark

Polygon and polygon

Check markCheck 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.

In the following image, the target features in green are outlined in 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 intersects.

In the following image, the target features in green are outlined in 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 opposite of the Within operator.

In the following image, the target features in green are outlined in 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 not empty 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 opposite of the Contains operator.

In the following image, the target features in green are outlined in 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.

In the following image, the target features in green are outlined in 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.

In the following image, the target features in green are outlined in red when they touch the purple features:

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.

In the following image, the target features in green are outlined in red when they overlap the purple features:

Spatial relationship type Overlaps

Planar Near and Geodesic Near

Conceptually, these operators buffer the target features using the specified distance and return all the target features that intersect the join features with the buffer applied.

The Geodesic Near operation is the same as Planar Near, except geodesic distance is used rather than planar distance. Choose this operator if your data covers a large geographic extent or the coordinate system of the inputs is geographic.

In the following image, the target features in green, with a near distance buffer (light green), are outlined in red when they are near the purple join features:

Spatial relationship type Near (Planar and Geodesic)