-
Notifications
You must be signed in to change notification settings - Fork 0
/
Script-3-Model.py
34 lines (26 loc) · 1.88 KB
/
Script-3-Model.py
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
33
34
# -*- coding: utf-8 -*-
"""
Generated by ArcGIS ModelBuilder on : 2023-02-08 21:31:49
"""
import arcpy
def Model(): # Model
# To allow overwriting outputs change overwriteOutput option to True.
arcpy.env.overwriteOutput = False
CITIES = "CITIES"
intrstat = "intrstat"
# Process: Select (Select) (analysis)
intrstat_Select_2_4 = "C:\\Users\\akunna1\\Desktop\\GEOG 592\\Lab_3\\Lab_3_Akunna\\MyProject1.gdb\\intrstat_Select_2_4"
arcpy.analysis.Select(in_features=intrstat, out_feature_class=intrstat_Select_2_4, where_clause="ROUTE_NUM = 'I90'")
# Process: Buffer (Buffer) (analysis)
intrstat_Buffer_4 = "C:\\Users\\akunna1\\Desktop\\GEOG 592\\Lab_3\\Lab_3_Akunna\\MyProject1.gdb\\intrstat_Buffer_4"
arcpy.analysis.Buffer(in_features=intrstat_Select_2_4, out_feature_class=intrstat_Buffer_4, buffer_distance_or_field="30 Miles", line_side="FULL", line_end_type="ROUND", dissolve_option="NONE", dissolve_field=[], method="PLANAR")
# Process: Clip (Clip) (analysis)
CITIES_Clip_4 = "C:\\Users\\akunna1\\Desktop\\GEOG 592\\Lab_3\\Lab_3_Akunna\\MyProject1.gdb\\CITIES_Clip_4"
arcpy.analysis.Clip(in_features=CITIES, clip_features=intrstat_Buffer_4, out_feature_class=CITIES_Clip_4, cluster_tolerance="")
# Process: Summary Statistics (Summary Statistics) (analysis)
Sum_table_2_4 = "C:\\Users\\akunna1\\Desktop\\GEOG 592\\Lab_3\\Lab_3_Akunna\\MyProject1.gdb\\Sum_table_2_4"
arcpy.analysis.Statistics(in_table=CITIES_Clip_4, out_table=Sum_table_2_4, statistics_fields=[["POP1990", "SUM"], ["HISPANIC", "SUM"]], case_field=[], concatenation_separator="")
if __name__ == '__main__':
# Global Environment settings
with arcpy.EnvManager(scratchWorkspace=r"C:\Users\akunna1\Desktop\GEOG 592\Lab_3\Lab_3_Akunna\MyProject1.gdb", workspace=r"C:\Users\akunna1\Desktop\GEOG 592\Lab_3\Lab_3_Akunna\MyProject1.gdb"):
Model()