Clip Layer (GeoAnalytics Desktop)

Summary

Extracts input features from within specified polygons.

Illustration

Clip Layer tool illustration

Usage

  • Use Clip Layer to clip point, line, or polygon features.

  • Use this tool to cut out a piece of a feature class using one or more of the features from another feature class as a cookie cutter. This is particularly useful for creating a feature class—also referred to as a study area or an area of interest (AOI)—that contains a geographic subset of the features from another, larger feature class.

  • The analysis will clip features or portions of features that overlay the areas of interest.

  • The output result will contain input layer features that overlay clip layer polygons.

  • The output geometry type will be the same as the input features being clipped. For example, if you clip line features within a polygon, the output result will be lines.

  • All fields from the Input Layer parameter will be included in the output result. Fields from the Clip Layer parameter will not be included in the output.

  • You can improve performance of the Clip Layer tool by doing one or both of the following:

    • Set the extent environment so that you only analyze data of interest.
    • Use data that is local to where the analysis is being run.

  • This geoprocessing tool is powered by Spark. Analysis is completed on your desktop machine using multiple cores in parallel. See Considerations for GeoAnalytics Desktop tools to learn more about running analysis.

  • When running GeoAnalytics Desktop tools, the analysis is completed on your desktop machine. For optimal performance, data should be available on your desktop. If you are using a hosted feature layer, it is recommended that you use ArcGIS GeoAnalytics Server. If your data isn't local, it will take longer to run a tool. To use your ArcGIS GeoAnalytics Server to perform analysis, see GeoAnalytics Tools.

Parameters

LabelExplanationData Type
Input Layer

The dataset containing the point, line, or polygon features to be clipped.

Feature Layer
Clip Layer

The dataset containing the polygon features used to clip the input features.

Feature Layer
Output Feature Class

The output feature class with clipped features.

Feature Class

arcpy.geoanalytics.ClipLayer(input_layer, clip_layer, out_feature_class)
NameExplanationData Type
input_layer

The dataset containing the point, line, or polygon features to be clipped.

Feature Layer
clip_layer

The dataset containing the polygon features used to clip the input features.

Feature Layer
out_feature_class

The output feature class with clipped features.

Feature Class

Code sample

ClipLayer example (stand-alone script)

The following Python script demonstrates how to use the ClipLayer function.

#-------------------------------------------------------------------------------
# Name: ClipLayer.py
# Description: Clip USA Rivers to the extent of state boundaries.

# Import system modules
import arcpy

arcpy.env.workspace = "C:/data/USA.gdb"

# Set local variables
clipFeatures = "USA_Rivers"
studyArea = "Nebraska_Boundary"
out = "NebraskaRivers"

# Run Clip Layer
arcpy.gapro.ClipLayer(clipFeatures, studyArea, out)