- Terminology differences in ArcMap, ArcScene, and ArcGlobe
- Clementini spatial relationships
- Contrast of the three contains spatial relationships
- Contrast of the three within spatial relationships
- Legend for graphics
- Select point using point
- Select point using multipoint
- Select point using line
- Select point using polygon
- Select multipoint using point
- Select multipoint using multipoint
- Select multipoint using line
- Select multipoint using polygon
- Select line using point
- Select line using multipoint
- Select line using line
- Select line using polygon
- Select polygon using point
- Select polygon using multipoint
- Select polygon using line
- Select polygon using polygon
This topic covers examples and expected results of the various Relationship options available in the Select Layer By Location geoprocessing tool as well as the Spatial_Join geoprocessing tool.
The three flavors of WITHIN_A_DISTANCE spatial relationship included in these graphics.
For details on INTERSECT_3D and WITHIN_A_DISTANCE_3D relationships, see Select By Location 3D relationships.
Terminology differences in ArcMap, ArcScene, and ArcGlobe
This section only applies for ArcMap, ArcScene, and ArcGlobe. It does not apply to ArcGIS Pro.
The Select By Location dialog box found in the Selection menu in ArcMap, ArcScene, and ArcGlobe do not use the exact same term as the geoprocessing tool for describing the relationship. The table below contains the terminology mapping.
Geoprocessing tool | Selection\Select By Location |
---|---|
INTERSECT | Target layer features intersect the Source layer feature. |
INTERSECT_3D | Target layer features intersect (3d) the Source layer feature. |
WITHIN_A_DISTANCE_GEODESIC | This option is not available. |
WITHIN_A_DISTANCE | Target layer features are within a distance of the Source layer feature. |
WITHIN_A_DISTANCE_3D | Target layer features are within a distance of (3d) the Source layer feature. |
CONTAINS | Target layer features contains the Source layer feature. |
COMPLETELY_CONTAINS | Target layer features completely contains the Source layer feature. |
CONTAINS_CLEMENTINI | Target layer features contains (Clementini) the Source layer feature. |
WITHIN | Target layer features are within the Source layer feature. |
COMPLETELY_WITHIN | Target layer features are completely within the Source layer feature. |
WITHIN_CLEMENTINI | Target layer features are within (Clementini) the Source layer feature. |
ARE_IDENTICAL_TO | Target layer features are identical to the Source layer feature. |
BOUNDARY_TOUCHES | Target layer features touch the boundary of the Source layer feature. |
SHARE_A_LINE_SEGMENT_WITH | Target layer features share a line segment with the Source layer feature. |
CROSSED_BY_THE_OUTLINE_OF | Target layer features are crossed by the outline of the Source layer feature. |
HAVE_THEIR_CENTER_IN | Target layer features have their centroid in the Source layer feature. |
All details that follow are written using the terminology of the Select Layer By Location tool. However, these details also apply to the Spatial Join tool. The parameter names differ between the tools as follows:
- Select Layer By Location has Input Feature Layer; the Spatial Join equivalent is Target Features.
- Select Layer By Location has Selecting Features; the Spatial Join equivalent is Join Features.
- Select Layer By Location has Relationship; the Spatial Join equivalent is Match Option.
Clementini spatial relationships
WITHIN_CLEMENTINI and CONTAINS_CLEMENTINI refers to the within and contains spatial relationship as defined in the following paper: Clementini, Eliseo, Paolino Di Felice, and Peter van Oosterom, "A Small Set of Formal Topological Relationships Suitable for End-User Interaction," Proceedings of the Third International Symposium on Advances in Spatial Databases, 277–295, June 23–25, 1993.
Contrast of the three contains spatial relationships
Definition of boundary: For lines, the boundary is the two endpoints; for polygons, the boundary is the edge.
- CONTAINS—Selects features in the input feature layer that contain a feature in the selecting features layer. The selecting features can be inside as well as on the boundary of the input feature layer.
- COMPLETELY_CONTAINS—Selects features in the input feature layer that contain a feature in the selecting features layer, as long as the feature in the selecting features layer does not intersect the boundary of the input feature layer.
- CONTAINS_CLEMENTINI—The results are identical to CONTAINS with the one exception: if the feature in the selecting features layer is entirely on the boundary of the input feature layer, with no part of the contained feature properly inside the feature in the input feature layer, the input feature will not be selected. CLEMENTINI states that the boundary of a point is always empty, and the boundary of a line is the endpoints.
- CONTAINS and CONTAINS_CLEMENTINI produce identical results with point and multipoint input, and the selecting features are point or multipoint.
Contrast of the three within spatial relationships
- WITHIN—Selects features in the input feature layer within or contained by features in the selecting features layer.
- COMPLETELY_WITHIN—The result is identical to WITHIN except when the feature in the input feature layer intersects the boundary of the feature in the selecting features layer; then it is not selected.
- WITHIN_CLEMENTINI—The result is identical to WITHIN except when the entirety of the feature in the input feature layer is on the boundary of the feature in the selecting features layer. CLEMENTINI states that the boundary of a point is always empty, and the boundary of a line is the endpoints.
Legend for graphics
For all the examples below, the following legend applies:
- Input feature: green
- Input feature's center: red X
- Selecting feature: gray
The graphics are labeled A, B, C, and so on. Each relationship (INTERSECT, CONTAINS, and so on) that is valid for that combination of geometries is listed in the left column of the table. The geometric cases that would be selected for that relationship are listed in the right column of the table.
Select point using point
INTERSECT | A |
CONTAINS | A |
CONTAINS_CLEMENTINI | A |
WITHIN | A |
WITHIN_CLEMENTINI | A |
ARE_IDENTICAL_TO | A |
HAVE_THEIR_CENTER_IN | A |
Select point using multipoint
INTERSECT | A, C |
CONTAINS | A |
CONTAINS_CLEMENTINI | A |
WITHIN | A, C |
WITHIN_CLEMENTINI | A, C |
ARE_IDENTICAL_TO | A |
HAVE_THEIR_CENTER_IN | A, C |
Select point using line
INTERSECT | A, C |
WITHIN | A, C |
COMPLETELY_WITHIN | A |
WITHIN_CLEMENTINI | A |
HAVE_THEIR_CENTER_IN | A, C |
BOUNDARY_TOUCHES | C |
Select point using polygon
INTERSECT | A, C |
WITHIN | A, C |
COMPLETELY_WITHIN | A |
WITHIN_CLEMENTINI | A |
HAVE_THEIR_CENTER_IN | A, C |
BOUNDARY_TOUCHES | C |
Select multipoint using point
INTERSECT | A, C |
CONTAINS | A, C |
CONTAINS_CLEMENTINI | A, C |
WITHIN | A |
WITHIN_CLEMENTINI | A |
ARE_IDENTICAL_TO | A |
HAVE_THEIR_CENTER_IN | A, D |
Select multipoint using multipoint
INTERSECT | A, C, E, F |
CONTAINS | A, F |
CONTAINS_CLEMENTINI | A, F |
WITHIN | A, C |
WITHIN_CLEMENTINI | A, C |
ARE_IDENTICAL_TO | A |
HAVE_THEIR_CENTER_IN | A, D |
Select multipoint using line
INTERSECT | A, C, E, F |
WITHIN | A, C, E |
COMPLETELY_WITHIN | A |
WITHIN_CLEMENTINI | A, E |
HAVE_THEIR_CENTER_IN | A, D, E |
BOUNDARY_TOUCHES | C, E |
Select multipoint using polygon
INTERSECT | A, C, D, E, F |
WITHIN | A, C, D, E |
COMPLETELY_WITHIN | A |
WITHIN_CLEMENTINI | A, D, E |
HAVE_THEIR_CENTER_IN | A, B, C, E, F |
BOUNDARY_TOUCHES | C, E |
Select line using point
INTERSECT | A, C, D |
CONTAINS | A, C, D |
COMPLETELY_CONTAINS | A, D |
CONTAINS_CLEMENTINI | A, D |
HAVE_THEIR_CENTER_IN | D |
BOUNDARY_TOUCHES | C |
Select line using multipoint
INTERSECT | A, C, D, E |
CONTAINS | A, C, E |
COMPLETELY_CONTAINS | A |
CONTAINS_CLEMENTINI | A, E |
HAVE_THEIR_CENTER_IN | D |
BOUNDARY_TOUCHES | C, E |
Select line using line
INTERSECT | A, C, D, E, F, G, H, I, J |
CONTAINS | G, H |
COMPLETELY_CONTAINS | G |
CONTAINS_CLEMENTINI | G, H |
WITHIN | F, H |
COMPLETELY_WITHIN | F |
WITHIN_CLEMENTINI | F, H |
ARE_IDENTICAL_TO | H |
BOUNDARY_TOUCHES | C, E |
Select line using polygon
INTERSECT | A, C, D, E, F, G, H, I, J, K, L, M, N, O |
WITHIN | A, D, G, H, I, O |
COMPLETELY_WITHIN | A |
WITHIN_CLEMENTINI | A, D, G, H, I |
BOUNDARY_TOUCHES | F, G, H, I, K, L, M, N, O |
SHARE_A_LINE_SEGMENT_WITH | G, I, J, K, M, O |
CROSSED_BY_THE_OUTLINE_OF | C, E, H, L, N |
HAVE_THEIR_CENTER_IN | A, C, D, E, G, H, I, J, O |
Select polygon using point
INTERSECT | A, B |
CONTAINS | A, B |
COMPLETELY_CONTAINS | A |
CONTAINS_CLEMENTINI | A |
HAVE_THEIR_CENTER_IN | A, D |
BOUNDARY_TOUCHES | B |
Select polygon using multipoint
INTERSECT | A, B, C, E |
CONTAINS | A, B, E |
COMPLETELY_CONTAINS | A |
CONTAINS_CLEMENTINI | A, B |
HAVE_THEIR_CENTER_IN | A, D |
BOUNDARY_TOUCHES | E |
Select polygon using line
INTERSECT | A, C, D, E, F, G, H, I, J, K, L, M, N, O |
CONTAINS | A, D, G, H, I, O |
COMPLETELY_CONTAINS | A |
CONTAINS_CLEMENTINI | A, D, G, H, I |
BOUNDARY_TOUCHES | F, G, H, I, K, L, M, N, O |
SHARE_A_LINE_SEGMENT_WITH | G, I, J, K, M, O |
CROSSED_BY_THE_OUTLINE_OF | C, E, H, L, N |
HAVE_THEIR_CENTER_IN | E, I, L |
Select polygon using polygon
INTERSECT | A, C, D, E, F, G, H, I, J, K, M |
CONTAINS | C, E, H, M |
COMPLETELY_CONTAINS | C |
CONTAINS_CLEMENTINI | C, E, H, M |
WITHIN | F, G, H, M |
COMPLETELY_WITHIN | F |
WITHIN_CLEMENTINI | F, G, H, M |
ARE_IDENTICAL_TO | H, M |
BOUNDARY_TOUCHES | D, E, G, H, I, J, M |
SHARE_A_LINE_SEGMENT_WITH | D, H, I, M |
CROSSED_BY_THE_OUTLINE_OF | A, E, G, J, K |
HAVE_THEIR_CENTER_IN | C, E, F, G, H, K, L |