Clip

Titleā€ƒ Clip

Summary

Geoprocessing tool that extracts input features that overlay the clip features.


Illustration

Clip graphic Clip illustration

Usage


Syntax

Parameter Explanation
in_features

The features to be clipped.

clip_features

The features used to clip the input features.

out_feature_class

The feature class to be created.

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 to be higher for data with less coordinate accuracy and lower for data with extremely high accuracy.

Code Samples

Clip example (Python window)

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


import arcpy
from arcpy import env

env.workspace = "C:/data"
arcpy.Clip_analysis("majorrds.shp", "study_quads.shp", "C:/output/studyarea.shp")
                    

Clip example 2 (stand-alone Python script)

The following Python script demonstrates how to use the Clip function in a stand-alone script.


# Name: Clip_Example2.py
# Description: Clip major roads that fall within the study area. 

# Import system modules
import arcpy
from arcpy import env

# Set workspace
env.workspace = "C:/data"

# Set local variables
in_features = "majorrds.shp"
clip_features = "study_quads.shp"
out_feature_class = "C:/output/studyarea.shp"
xy_tolerance = ""

# Execute Clip
arcpy.Clip_analysis(in_features, clip_features, out_feature_class, xy_tolerance)

    
                    

Tags

Credits

Use limitations