Intersect

Title  Intersect

Summary

Executa interseção geométrica entre as feições de entrada.


Illustration

Intersect illustration Intersect illustration

Usage


Syntax

Parameter Explanation
out_feature_class (Optional)

The output feature class.

join_attributes (Optional)

Determines which attributes from the input features will be transferred to the output feature class.All attributes—All the attributes from the input features will be transferred to the output feature class. This is the default. All attributes except feature IDs—All the attributes except the FID from the input features will be transferred to the output feature class. Only feature IDs—Only the FID field from the input features will be transferred to the output feature class.

cluster_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).

output_type (Optional)

Choose what type of intersection you want to find.Same as 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. If the inputs are line or polygon, the output will be a multipoint feature class.

esri_out_feature_service_name (Optional)

The name of the optional feature service to create on the federated server containing the result of this tool. If no name is specified an output feature service will not be created.

Code Samples

Intersect example (Python window)

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


import arcpy
arcpy.env.workspace = "C:/data/RedRiver_basin.gdb"
arcpy.Intersect_analysis(["vegetation_stands", "road_buffer200m", "water_buffer100"], "mysites", "ALL")
arcpy.Intersect_analysis([["vegetation_stands", 2], ["road_buffer200m", 1], ["water_buffer100", 2]], "mysites_ranked", "ALL")
                    

Intersect example 2 (stand-alone script)

The following stand-alone script uses the Intersect function as part of a workflow with other analysis tools to determine the type of vegetation within 100 meters of all stream crossings.


#Name: VegRoadIntersect.py
# Purpose: Determine the type of vegetation within 100 meters of all stream crossings

# Import system modules
import arcpy
 
# Set the workspace (to avoid having to type in the full path to the data every time)
arcpy.env.workspace = "c:/data/data.gdb"    
    
# Process: Find all stream crossings (points)
inFeatures = ["roads", "streams"]
intersectOutput = "stream_crossings"
clusterTolerance = 1.5    
arcpy.Intersect_analysis(inFeatures, intersectOutput, "", clusterTolerance, "point")
 
# Process: Buffer all stream crossings by 100 meters
bufferOutput = "stream_crossings_100m"
bufferDist = "100 meters"
arcpy.Buffer_analysis(intersectOutput, bufferOutput, bufferDist)

# Process: Clip the vegetation feature class to stream_crossing_100m
clipInput = "vegetation"
clipOutput = "veg_within_100m_of_crossings"
arcpy.Clip_analysis(clipInput, bufferOutput, clipOutput)

# Process: Summarize how much (area) of each type of vegetation is found
# within 100 meter of the stream crossings
statsOutput = "veg_within_100m_of_crossings_stats"
statsFields = [["shape_area", "sum"]]
caseField = "veg_type"
arcpy.Statistics_analysis(clipOutput, statsOutput, statsFields, caseField)

                    

Tags

Credits

Use limitations