If Spatial Relationship Is (ModelBuilder)

Summary

Evaluates whether the inputs have a specified spatial relationship.

Learn how If Spatial Relationship Is works in ModelBuilder

Usage

  • This tool is only available from the ModelBuilder ribbon for use in models. The tool is not available from the Geoprocessing pane or from Python.

  • The tool has two Boolean outputs, True and False. Based on the condition being evaluated, one of the two Boolean outputs is true and the other is false after the tool runs. These Boolean outputs must be set as a precondition to the downstream tools for those to execute if either of the preconditions is true.

Parameters

LabelExplanationData Type
Input Features

The input features to evaluate.

Feature Layer
Relationship
(Optional)

Specifies the spatial relationship to be evaluated.

  • IntersectThe features in the input layer will be selected if they intersect a selecting feature. This is the default.
  • Intersect 3DThe features in the input layer will be selected if they intersect a selecting feature in three-dimensional space (x, y, and z).
  • Within a distanceThe features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.
  • Within a distance geodesicThe features in the input layer will be selected if they are within a specified distance of a selecting feature. Distance between features will be calculated using a geodesic formula that takes into account the curvature of the spheroid and correctly handles data near and across the dateline and poles. Use the Search Distance parameter to specify the distance.
  • Within a distance 3DThe features in the input layer will be selected if they are within a specified distance of a selecting feature in three-dimensional space. Use the Search Distance parameter to specify the distance.
  • ContainsThe features in the input layer will be selected if they contain a selecting feature.
  • Completely containsThe features in the input layer will be selected if they completely contain a selecting feature.
  • Contains ClementiniThis spatial relationship yields the same results as Completely contains with the exception that if the selecting feature is entirely on the boundary of the input feature (no part is properly inside or outside), the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.
  • WithinThe features in the input layer will be selected if they are within a selecting feature.
  • Completely withinThe features in the input layer will be selected if they are completely within or contained by a selecting feature.
  • Within ClementiniThe result will be identical to Within with the exception that if the entirety of the feature in the input layer is on the boundary of the feature in the selecting layer, the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.
  • Are identical toThe features in the input layer will be selected if they are identical (in geometry) to a selecting feature.
  • Boundary touchesThe features in the input layer will be selected if they have a boundary that touches a selecting feature. When the input features are lines or polygons, the boundary of the input feature can only touch the boundary of the selecting feature, and no part of the input feature can cross the boundary of the selecting feature.
  • Share a line segment withThe features in the input layer will be selected if they share a line segment with a selecting feature. The input and selecting features must be line or polygon.
  • Crossed by the outline ofThe features in the input layer will be selected if they are crossed by the outline of a selecting feature. The input and selecting features must be lines or polygons. If polygons are used for the input or selecting layer, the polygon's boundary (line) will be used. Lines that cross at a point will be selected; lines that share a line segment will not be selected.
  • Have their center inThe features in the input layer will be selected if their center falls within a selecting feature. The center of the feature is calculated as follows: for polygon and multipoint, the geometry's centroid is used; for line input, the geometry's midpoint is used.
String
Selecting Features
(Optional)

The features in the Input Features parameter will be selected based on their relationship to the features from this layer or feature class.

Feature Layer
Search Distance
(Optional)

The distance that will be searched. This parameter is only valid if the Relationship parameter is set to Within a distance, Within a distance geodesic, Within a distance 3D, Intersect, Intersect 3D, Have their center in, or Contains.

If the Within a distance geodesic option is selected, use a linear unit such as kilometers or miles.

Linear Unit
Invert Spatial Relationship
(Optional)

Specifies whether the spatial relationship evaluation result or the opposite result will be used. For example, this parameter can be used to get a list of features that do not intersect or are not within a given distance of features in another dataset.

  • Unchecked—The query result will be used. This is the default.
  • Checked—The opposite of the query result will be used. If the Selection Type parameter is set, the reversal of the selection will occur before it is combined with existing selections.
Boolean
Selection Condition
(Optional)

Specifies the selection condition that will be used for the spatial relationship between the input and selecting features.

  • ExistsChecks if the spatial relationship exists between any features in the input and selecting features. This is the default.
  • No SelectionChecks if the spatial relationship does not exist between any of the input and selecting features.
  • All SelectedChecks if the spatial relationship exists for all features in the input features.
  • Is Equal toChecks if the number of input features with the spatial relationship is equal to the Count value.
  • Is BetweenChecks if the number of input features with the spatial relationship is between the Minimum Count value and Maximum Count value.
  • Is Less ThanChecks if the number of input features with the spatial relationship is less than the Count value.
  • Is Greater ThanChecks if the field value of the records matching the SQL expression is greater than the Count value.
  • Is Not Equal toChecks if the number of input features with the spatial relationship is not equal to the Count value.
String
Count
(Optional)

The integer count value.

Long
Minimum Count
(Optional)

The minimum integer count value.

Long
Maximum Count
(Optional)

The maximum integer count value.

Long

Derived Output

LabelExplanationData Type
True

If the specified criteria evaluates to True, this parameter will be set to True.

Boolean
False

If the specified criteria evaluates to False, this parameter will be set to True.

Boolean

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics