Clip (Analysis) |
|
|
Release 9.1
Last modified August 15, 2005 |
Print all topics in : "Tools" |
Extracts input features that overlay the clip features.
Learn more about how Clip (Analysis) works
Illustration
Usage tips
The spatial reference of the Output Feature Class will be the same as the Input Features.
The following environment settings affect this tool: Cluster tolerance, Extent, M Domain, Configuration keyword, Coordinate system, Output has M values, Output spatial grid, Output has Z values, Default Z value, Output XY domain, and Output Z domain.
The Output Feature Class will have the attributes of the Input Features.
The Input Features may be any geometry type, but Clip Features must have polygon geometry.
Current map layers may be used to define Input Features and Clip Features. When using layers, only the currently selected features are used in the Clip operation.
Command line syntax
Introducing geoprocessing methods—Using dialog boxes and the command line
Clip_analysis <in_features> <clip_features> <out_feature_class> {cluster_tolerance}
| 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} |
Cluster tolerance is the distance range in which all vertices and boundaries in a feature class are considered identical or coincident. To minimize error, the cluster tolerance chosen should be as small as possible, depending on the precision level of your data. By default, the minimum possible tolerance value is calculated in the units of the spatial reference of the input. |
workspace E:\arcgis\ArcTutor\Geoprocessing\San_Diego Clip_analysis majorrds.shp study_quads.shp study_roads.shp
Scripting syntax
Introducing geoprocessing methods—Running a script
Clip_analysis (in_features, clip_features, out_feature_class, cluster_tolerance)
| Parameter | Explanation |
| in_features (Required) |
The features to be clipped. |
| clip_features (Required) |
The features used to clip the input features. |
| out_feature_class (Required) |
The feature class to be created. |
| cluster_tolerance (Optional) |
Cluster tolerance is the distance range in which all vertices and boundaries in a feature class are considered identical or coincident. To minimize error, the cluster tolerance chosen should be as small as possible, depending on the precision level of your data. By default, the minimum possible tolerance value is calculated in the units of the spatial reference of the input. |
#Purpose: Determine the type of vegetation within 100 meters of all stream crossings
#Create the Geoprocessor object
from win32com.client import Dispatch
gp = Dispatch("esriGeoprocessing.GPDispatch.1")
try:
#Set the workspace (to avoid having to type in the full path to the data every time)
gp.Workspace = "c:/projects/RedRiverBasin/data.mdb"
# Process: Find all stream crossings (points)
gp.Intersect("roads ; streams ", "stream_crossings", "#", 1.5, "point")
# Process: Buffer all stream crossings by 100 meters
gp.Buffer("stream_crossings","stream_crossings_100m", "100 meters")
# Process: Clip the vegetation feature class to stream_crossing_100m
gp.Clip("vegetation", "stream_crossings_100m", "veg_within_100m_of_crossings")
# Process: Summarize how much (area) of each type of vegetation is found within 100 meters of the stream crossings
gp.Statistics("veg_within_100m_of_crossings", "veg_within_100m_of_crossings_stats","shape_area sum","veg_type")
except:
#If an error occurred while running a tool print the messages
print gp.GetMessages()