Label | Explanation | Data Type |
Input Features | The features to be clipped. | Feature Layer |
Clip Features | The features to use to clip the input features. | Feature Layer |
Output Feature Class | The feature class to be created. | Feature Class |
XY Tolerance (Optional) | The minimum distance separating all feature coordinates as well as the distance a coordinate can move in X or Y (or both). Set the value higher for data with less coordinate accuracy and lower for data with extremely high accuracy. Caution:Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used. | Linear Unit |
Summary
Extracts input features that overlay the clip features.
Use this tool to cut out a piece of one feature class using one or more of the features in another feature class as a cookie cutter. This is particularly useful for creating a new feature class—also referred to as study area or area of interest (AOI)—that contains a geographic subset of the features in another, larger feature class.
An alternate tool is available for vector data clip operations. See the Clip tools for details.
Illustration
Usage
The Clip Features parameter values can be points, lines, and polygons, depending on the Input Features parameter type.
- When the Input Features are polygons, the Clip Features must also be polygons.
- When the Input Features are lines, the Clip Features can be lines or polygons. When clipping line features with line features, only the coincident lines or line segments are written to the output, as shown in the graphic below.
- When the Input Features are points, the Clip Features can be points, lines, or polygons. When clipping point features with point features, only the coincident points are written to the output, as shown in the graphic below. When clipping point features with line features, only the points that are coincident with the line features are written to the output.
The Output Feature Class parameter will contain all the attributes of the Input Features parameter.
Line features clipped by polygon features:
Point features clipped by polygon features:
Line features clipped with line features:
Point features clipped with point features:
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.PairwiseClip(in_features, clip_features, out_feature_class, {cluster_tolerance})
Name | Explanation | Data Type |
in_features | The features to be clipped. | Feature Layer |
clip_features | The features to use to clip the input features. | Feature Layer |
out_feature_class | The feature class to be created. | Feature Class |
cluster_tolerance (Optional) | The minimum distance separating all feature coordinates as well as the distance a coordinate can move in X or Y (or both). Set the value higher for data with less coordinate accuracy and lower for data with extremely high accuracy. Caution:Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used. | Linear Unit |
Code sample
The following Python window script demonstrates how to use the PairwiseClip function in immediate mode.
import arcpy
arcpy.env.workspace = "C:/data"
arcpy.PairwiseClip_analysis("majorrds.shp", "study_quads.shp",
"C:/output/studyarea.shp")
The following Python script demonstrates how to use the PairwiseClip function in a stand-alone script.
# Name: PairwiseClip_Example2.py
# Description: Clip major roads that fall within the study area.
# Import system modules
import arcpy
# Set workspace
arcpy.env.workspace = "C:/data"
# Set local variables
in_features = "majorrds.shp"
clip_features = "study_quads.shp"
out_feature_class = "C:/output/studyarea.shp"
# Execute Pairwise Clip
arcpy.PairwiseClip_analysis(in_features, clip_features, out_feature_class)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes