Label | Explanation | Data Type |
Input Features | The input feature classes or layers to intersect. Only two inputs are allowed. | Value Table |
Output Feature Class | The output feature class. | Feature Class |
Join Attributes (Optional) | Specifies which attributes from the input features will be transferred to the output feature class.
| String |
XY Tolerance (Optional) | 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). Caution:Changing this parameter's value may cause failure or unexpected results. It is recommended that you do not modify this parameter. It has been removed from view on the tool dialog box. By default, the input feature class's spatial reference x,y tolerance property is used. | Linear Unit |
Output Type (Optional) | Specifies the type of intersections that will be returned.
| String |
Summary
Computes a pairwise intersection of the input features. Features or portions of features that overlap between the input feature layers 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 the features in the second input that it overlaps.
An alternate tool is available for intersect operations. See the Intersect tool documentation for details.
The Pairwise Intersect tool is similar to the Intersect tool in that geometric intersections are computed, but it is different in that intersections are computed on pairs of features rather than all combinations of features.
Illustration
Usage
Only two input feature classes are supported.
The Input Features parameter value 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.
By default, curve features from the input will be densified in the output. To support curves in the output, use the Maintain Curve Segments environment.
This tool relies on the input features having a spatial index. Use the Add Spatial Index tool to create an index (particularly for shapefiles) or rebuild an existing index if there is any doubt about it being correct.
When the 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 contain m- or z-values.
The spatial reference of the output feature class will be that of the first feature class in the Input Features parameter. See 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 identify 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.
Parameters
arcpy.analysis.PairwiseIntersect(in_features, out_feature_class, {join_attributes}, {cluster_tolerance}, {output_type})
Name | Explanation | Data Type |
in_features [in_features,...] | The input feature classes or layers to intersect. Only two inputs are allowed. | Value Table |
out_feature_class | The output feature class. | Feature Class |
join_attributes (Optional) | Specifies which attributes from the input features will be transferred to the output feature class.
| String |
cluster_tolerance (Optional) | 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). Caution:Changing this parameter's value may cause failure or unexpected results. It is recommended that you do not modify this parameter. It has been removed from view on the tool dialog box. By default, the input feature class's spatial reference x,y tolerance property is used. | Linear Unit |
output_type (Optional) | Specifies the type of intersections that will be returned.
| String |
Code sample
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.analysis.PairwiseIntersect(["vegetation_stands", "road_buffer200m", "water_buffer100"],
"mysites", "ALL")
Find the vegetation type that the streams are traveling through.
# Name: StreamsInVegetationIntersect.py
# 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"
arcpy.analysis.PairwiseIntersect(inFeatures, intersectOutput)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes