-
Notifications
You must be signed in to change notification settings - Fork 0
/
constraint_area_buffer
32 lines (23 loc) · 1.06 KB
/
constraint_area_buffer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import arcpy
# Script arguments
Clearings = arcpy.GetParameterAsText(0)
Output_Table = arcpy.GetParameterAsText(1)
layers_string = arcpy.GetParameterAsText(2)
input_list = layers_string.split(";")
buff_size = arcpy.GetParameterAsText(3)
# Allow us to use the same output name several times, particularly for intermediate results (e.g, buffer)
arcpy.env.overwriteOutput = True
# Process: Buffer
Buffered_Clearings = arcpy.Buffer_analysis(Clearings, "Buffered_Clearings", buff_size, "FULL", "ROUND", "ALL", "")
# Iterate through input layers list
for infc in input_list:
arcpy.AddMessage("Processing: " + infc)
tab_name = Output_Table + "_" + infc
# Set up a list for the feature classes to be intersected
InputFCs = [Buffered_Clearings, infc]
arcpy.AddMessage(" Intersect...")
# Process: Intersect
Impacted_OGMA = arcpy.Intersect_analysis(InputFCs, "Impacted_OGMA", "ALL", "", "INPUT")
arcpy.AddMessage(" Summarize...")
# Process: Summary Statistics
arcpy.Statistics_analysis(Impacted_OGMA, tab_name, "Shape_Area SUM", "#")