Spatial Operations

The spatial operations tool performs vector overlay operations and spatial predicate queries on area features.

Spatial Overlay Operations compare the area features in two layers, and combine or cut them into new geometries in the output layer based on the operation. This tool includes Intersection, Union, Difference, and Symmetrical Difference operations.

Spatial Predicate Operations find features in the first layer based on their spatial relationship to features in the second layer. The output is the features in first layer that match the query, in their original extent, without any cutting or dividing of features like in the Overlay operations. The predicate operations include Intersects, Overlaps, Touches, Contains, Equals, Within, Disjoint.

The Spatial Operations Scripting tab can perform the same operations in more complex contexts. This includes scripted building of subsets of the data based on attribute queries and stringing multiple operations together.

To open this tool press the Spatial Operations button from the Digitizer(Advanced) toolbar, or choose the option from the Analysis menu.

To perform a spatial operation do the following steps: 

  1. Navigate to the Spatial Operations tool in the Digitizer(Advanced) toolbar or Analysis menu.

  2. From the drop-downs specify the first layer and second layer that will be analyzed. If the layers are not currently visible (checked on in the Overlay Control Center) check the option Show disabled layers to view all loaded layers.

    Optionally, to perform a spatial operation on a subset of a layer, select a subset of the layer using the Digitizer tool or Attribute Editor. Then check the option for Only Selected Features.

  3. Specify how to handle invalid geometries, such as areas that are self intersecting or not fully closed.

  4. Finally name the output layer in the Layer box.

  5. A new intersection layer will be produced that finds the areas of intersection between the first and second layer.

Operations

Select the type of vector operation to perform on the two sets of areas.

Overlay Operations

The first four operations are spatial overlay operations. They will cut or transform the original geometry.

Intersection

An intersection operations finds the parts from layer 1 and layer 2 that share the same coverage. The result is new polygons showing all the areas of overlap between the two input layers, with attributes from both layers.

The Intersection operation creates a new layer consisting of just the overlapping regions (parts of the original features) in the two input layers. New features receive attributes from both layers.

See also Find Intersection of Two Area Features.

Union

A union finds all areas that occur in either layer 1, layer 2, or in both layers. This is a combination of all parts of features contained in either layer, which includes features in one layer OR the other.

The Union operation creates a new layer consisting of all regions from the two input layers. Regions that overlap are split from their containing features. Attributes of non-overlapping regions will come from their original layer; attributes from overlapping regions will come from the features that participated in the overlap.

See also Combine Features.

Difference

The difference operation is akin to the subtraction of layer 2 from layer 1. This operation will output the parts in layer 1 that are not covered by layer 2. Attributes for the new features are copied from their source features in the first input layer.

See also Cut Selected Area(s) from Another Area and Cut Selected Area(s) from all Overlapping Areas (Add Islands).

Symmetrical Difference

A symmetrical difference finds all regions exclusively in one layer OR the other, but not in both.

The Symmetric Difference operation creates a new layer consisting of areas of the non-overlapping regions in the first and second input layers; overlapping regions are removed. Attributes for features in the new layer are copied from their original feature, from either the first or second input layer.

EXAMPLES

Overlay Operations

The below examples use the following two layers as input:

Layer 1 Layer 2 Visual overlay of layer 1 and 2 with transparency

Results:

Intersection

Union

Difference

Symmetrical Difference

Predicates

Predicate operations perform queries on a set of features based on their topological relationship to another set of features. This will select features by location based on how they touch or overlap features in the second layer. These operations are closely related to Advanced Selection Options, which act on selected features only.

Related Topics Link IconRelated Topics

Intersects

The Intersects predicate returns the set of features from one layer that intersect features in another layer; this includes any amount of intersection and returns the original feature in its entirety.

EXAMPLE: Intersection vs Intersects

Using the same data as the example above, what is the difference between intersection and intersects? 

Input Layers Intersection Result Intersects Result

The intersects result returns the full extent of the original features, not just the area where the shared geometry exists. It is a query, rather than a overlay operation that modifies the input data. By contrast, the intersection operation cuts the original features to produce an output of new geometries covering just the area of intersection.

EXAMPLE

Predicates

The below examples use the following two layers as input:

Input Layer 1 Input Layer 2 Visual overlap of layers

 

EXAMPLE: Intersects

Result

This is the result of Layer 1 intersects Layer 2

Comparison

All of the purple features that share any overlap and/ or boundary are included in intersects result. The input in the bottom right (shown in gray hatch pattern) does not intersect Layer 2.

Overlaps

The Overlaps predicate returns the set of features from one layer that overlap features in another layer. Overlap means that the interiors of the features share some common area, but there are also interiors of both features not covered by the other feature.

EXAMPLE: Overlaps

Result

Only one feature in the input Layer 1 overlaps Layer 2

Comparison

All of the areas shown in gray do not overlap Layer 2 (orange).

Touches

The Touches predicate returns the set of features from one layer whose boundary intersects the boundary of a feature in another layer, but whose interiors do not overlap.

EXAMPLE: Touches

Results

These features from layer 1 touch a feature in layer 2.

Comparison

The touch predicate only includes features that have a boundary overlap, but no interior overlap. Toch

Contains

The Contains predicate returns the set of features from one layer that wholly contain a feature from another layer. Contain is the opposite of within, i.e. feature A contains feature B if and only if feature B is within feature A.

EXAMPLE: Contains

Result

These features in layer 1 contain features from layer 2.

Comparison

The features contain a feature from layer 2 have a feature entirely inside of them, or may share some boundary. Contains also includes features that are equal between the two layers. It does not include features that are within or overlap a feature in layer 2.

Equals

The Equals predicate returns the set of features from one layer that have an exact match with the geometry of a feature from another layer. This means the two boundaries, interiors and exteriors match.

EXAMPLE: Equals

Result

Only one feature in layer 1 is equal to a feature in layer 2.

Comparison

The features from layer 1 and layer 2 that are equal occupy the same space for the boundary and interior area. They may not necessarily have the exact same number of vertices defined along that boundary.

Within

The Within predicate returns the set of features from one layer that are wholly contained by a feature from another layer. A feature is within another feature if the interiors of the features intersect, but the interior of the within feature does not intersect the boundary of the containing feature. The two features can share some boundary.

EXAMPLE: Within

Results

The features in layer 1 that are within a feature in layer 2, and may or may not share a boundary.

Comparison

The feature in layer 1 must have the interior entirely inside of the feature in layer 2. Like contains, within also includes results where the features are equal.

Disjoint

The Disjoint predicate returns the set of features from one layer that do not intersect with any features from another layer. Disjoint features have no overlap between interior or boundary.

EXAMPLE: Disjoint

Results

Only one feature in Layer 1 is disjoint from Layer 2.

Comparison

The disjoint feature shown here shares no interior or boundary intersection with a feature in Layer 2. Features that touch at a single boundary point are not considered disjoint.