Skip To Content

Pairwise Intersect


Computes a pairwise intersection of the input features. Features or portions of features that overlap between the input feature layers and/or feature classes are written to the output feature class. Pairwise intersection refers to selecting one feature from the first input and intersecting it with all those features in the second input that it overlaps.

The Pairwise Intersect tool is similar to the Intersect tool in that geometric intersections are computed, but it is significantly different in that intersections are computed on pairs of features rather than all combinations of features. You may find this tool useful in situations where the Intersect tool results in an output with many more features than were input (for example, the inputs contained tens of thousands of features and the result is tens or hundreds of million features).

Learn more about how Pairwise Intersect works


Intersect illustration


  • Only two input feature classes are supported.

  • Input Features must be simple features: point, multipoint, line, or polygon. They cannot be complex features such as annotation features, dimension features, or network features.

  • Unlike the Intersect tool, ranks are not supported.

  • Input curve features will be densified in the output.

  • This tool relies on the input features having a spatial index. Use the Add Spatial Index tool to create a new index (particularly for shapefiles) or rebuild an existing index if there is any doubt about it being correct.

  • When your input features have M or Z values, only the M and Z values of the first feature class will be transferred to the output features. If the first feature class does not contain M or Z values, the output will not have M or Z values.

  • The Output Type can be that of the Input Features with the lowest dimension geometry or lower. For example, if all the inputs are polygons, the output could be polygon, line, or point. If one of the inputs is of type line and none are points, the output can be line or point. If any of the inputs are point, the Output Type can only be point.

  • The spatial reference of the output feature class will still be that of the first feature class in the Input Features parameter. See the topic Spatial reference and geoprocessing for more information.

  • This tool honors the Parallel Processing Factor environment. If the environment is not set (the default) or is set to 100, full parallel processing will be enabled and the tool will attempt to distribute the work to all the logical cores on the machine. Setting the environment to 0 will disable parallel processing. Specifying a factor between 1 and 99 will cause the tool to determine the percentage of logical cores to use by applying the formula ( Parallel Processing Factor / 100 * Logical Cores) rounded up to the nearest integer. If the result of this formula is 0 or 1 parallel processing will not be enabled.


PairwiseIntersect_analysis (in_features, out_feature_class, {join_attributes}, {cluster_tolerance}, {output_type})
ParameterExplanationData Type

The input feature classes or layers to intersect. Only two inputs are allowed.

Value Table

The output feature class.

Feature Class

Determines which attributes from the input features will be transferred to the output feature class.

  • ALLAll the attributes from the input features will be transferred to the output feature class. This is the default.
  • NO_FIDAll the attributes except the FID from the input features will be transferred to the output feature class.
  • ONLY_FIDOnly the FID field from the input features will be transferred to the output feature class.

The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in X or Y (or both).

Linear unit

Choose what type of intersection you want to find.

  • INPUTThe intersections returned will be the same geometry type as the input features with the lowest dimension geometry. If all inputs are polygons, the output feature class will contain polygons. If one or more of the inputs are lines and none of the inputs are points, the output will be lines. If one or more of the inputs are points, the output feature class will contain points. This is the default.
  • LINELine intersections will be returned. This is only valid if none of the inputs are points.
  • POINTPoint intersections will be returned. If the inputs are line or polygon, the output will be a multipoint feature class.

Code sample

PairwiseIntersect example 1 (Python window)

The following Python window script demonstrates how to use the PairwiseIntersect function in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/RedRiver_basin.gdb"
arcpy.PairwiseIntersect_analysis (["vegetation_stands", "road_buffer200m", "water_buffer100"], "mysites", "ALL")
PairwiseIntersect example 2 (stand-alone script)

Find the vegetation type that the streams are traveling through.

# Name:
# Purpose: Determine the vegetation type streams are traveling through.

# Import system modules
import arcpy

# Set the workspace (to avoid having to type in the full path to the data every time)
arcpy.env.workspace = "c:/data/data.gdb"    

# Process: Find all streams in each vegetation type
inFeatures = ["vegetation", "streams"]
intersectOutput = "streams_in_vegtype"
clusterTolerance = 1.5

arcpy.PairwiseIntersect_analysis(inFeatures, intersectOutput, "", clusterTolerance)

Licensing information

  • ArcGIS Desktop Basic: Limited
  • ArcGIS Desktop Standard: Limited
  • ArcGIS Desktop Advanced: Yes

Related topics