Intersect (Analysis)

Computes a geometric intersection of the Input Features. Features or portions of features which overlap in all layers and/or feature classes will be written to the Output Feature Class.

Learn more about how Intersect works


Illustration

Intersect illustration

Usage tips

Syntax

Intersect_analysis (in_features, out_feature_class, join_attributes, cluster_tolerance, output_type)
Parameter Explanation Datatype
Input Features (Required)

A list of the input feature classes or layers. When the distance between features is less than the cluster tolerance, the features with the lower rank will snap to the feature with the higher rank. The highest rank is one. For more information, see Priority ranks and Geoprocessing tools. With ArcView and Editor licenses, the number of input feature classes or layers is limited to two.

(Feature Layer Long; Feature Layer Long;...)
Output Feature Class (Required)

The feature class to which the results will be written.

Feature Class
JoinAttributes (Optional)

Determines which attributes from the Input Features will be transferred to the Output Feature Class.

  • ALL—All the attributes from the Input Features will be transferred to the Output Feature Class. This is the default.
  • NO_FID—All the attributes except the FID from the Input Features will be transferred to the Output Feature Class.
  • ONLY_FID—Only the FID field from the Input Features will be transferred to the Output Feature Class.

String
XY Tolerance (Optional)

The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in X or Y (or both). You can set the value to be higher for data that has less coordinate accuracy and lower for datasets with extremely high accuracy.

Linear unit
Output Type (Optional)

Choose what type of intersection you want to find.

  • INPUT—The intersections returned will be the same geometry type as the Input Features with the lowest dimension geometry. If all inputs are polygons, the output feature class will contain polygons. If one or more of the inputs are lines and none of the inputs are points, the output will be line. If one or more of the inputs are points, the output feature class will contain points. This is the default.
  • LINE—Line intersections will be returned. This is only valid if none of the inputs are points.
  • POINT—Point intersections will be returned.

String
Data types for geoprocessing tool parameters

Script Example

# Purpose: Determine the type of vegetation within 100 meters of all stream crossings

# Create the Geoprocessor object
import arcgisscripting
gp = arcgisscripting.create()

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_analysis("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 meter 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()

See Also

  • Clip (Analysis)
  • Erase (Analysis)
  • Intersect (Coverage)
  • Union (Analysis)
  • Comparison of overlay tools
  • An overview of the overlay toolset