Clip Layer (GeoAnalytics)

Summary

Extracts input features from within specified polygons.

Illustration

Clip Layer workflow diagram

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 ArcGIS GeoAnalytics Server. Analysis is completed on your GeoAnalytics Server, and results are stored in your content in ArcGIS Enterprise.

  • When running GeoAnalytics Server tools, the analysis is completed on the GeoAnalytics Server. For optimal performance, make data available to the GeoAnalytics Server through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Server will be moved to your GeoAnalytics Server before analysis begins. This means that it will take longer to run a tool, and in some cases, moving the data from ArcGIS Pro to your GeoAnalytics Server may fail. The threshold for failure depends on your network speeds, as well as the size and complexity of the data. Therefore, it is recommended that you always share your data or create a big data file share.

    Learn more about sharing data to your portal

    Learn more about creating a big data file share through Server Manager

Parameters

LabelExplanationData Type
Input Layer

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

Feature Set
Clip Layer

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

Feature Set
Output Name
(Optional)

The name of the output feature service.

String
Data Store
(Optional)

Specifies the ArcGIS Data Store where the output will be saved. The default is Spatiotemporal big data store. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.

  • Spatiotemporal big data store —Output will be stored in a spatiotemporal big data store. This is the default.
  • Relational data store —Output will be stored in a relational data store.
String

Derived Output

LabelExplanationData Type
Output Feature Class

The clipped output.

Feature Set

arcpy.geoanalytics.ClipLayer(input_layer, clip_layer, {output_name}, {data_store})
NameExplanationData Type
input_layer

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

Feature Set
clip_layer

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

Feature Set
output_name
(Optional)

The name of the output feature service.

String
data_store
(Optional)

Specifies the ArcGIS Data Store where the output will be saved. The default is SPATIOTEMPORAL_DATA_STORE. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.

  • SPATIOTEMPORAL_DATA_STOREOutput will be stored in a spatiotemporal big data store. This is the default.
  • RELATIONAL_DATA_STOREOutput will be stored in a relational data store.
String

Derived Output

NameExplanationData Type
output

The clipped output.

Feature Set

Code sample

ClipLayer example (stand-alone script)

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

#-------------------------------------------------------------------------------
# Name: ClipLayer.py
# Description: Clip USA Rivers to the extent of state boundaries.
# Results can be found in your Portal

# Requirements: ArcGIS GeoAnalytics Server

# Import system modules
import arcpy

# Set local variables
clipFeatures = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA_Rivers/FeatureServer/0"
studyArea = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Nebraska_Boundary/FeatureServer/0"
outFS = "NebraskaRivers"
dataStore = "RELATIONAL_DATA_STORE"

# Execute Clip Layer
arcpy.geoanalytics.ClipLayer(clipFeatures, studyArea, outFS, dataStore)

Environments

Output Coordinate System

The coordinate system that will be used for analysis. Analysis will be completed in the input coordinate system unless specified by this parameter. For GeoAnalytics Tools, final results will be stored in the spatiotemporal data store in WGS84.

Licensing information

  • Basic: Requires ArcGIS GeoAnalytics Server
  • Standard: Requires ArcGIS GeoAnalytics Server
  • Advanced: Requires ArcGIS GeoAnalytics Server

Related topics