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:
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:||Equals||Intersects||Contains||Within||Crosses||Touches||Overlaps||Near|
Point and point
Point and polyline
Point and polygon
Polyline and point
Polyline and polyline
Polyline and polygon
Polygon and point
Polygon and polyline
Polygon and polygon
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.
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.
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.
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.
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.
A target feature touches a join feature if they have an intersecting vertex, but the features do not overlap.
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.
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.