Question
Need assistance in getting this python 3.x code to run prefer notebook platform but not required . You can create your own data.gdb import arcpy
Need assistance in getting this python 3.x code to run prefer notebook platform but not required . You can create your own data.gdb
import arcpy
def Model1():
# To allow overwriting outputs change overwriteOutput option to True. arcpy.env.overwriteOutput = False
# Model Environment settings with arcpy.EnvManager(scratchWorkspace=r"C:\Users\BCOLLI24\OneDrive - DePaul University\Documents\ArcGIS\Projects\HW1\HW1.gdb", workspace=r"C:\Users\BCOLLI24\OneDrive - DePaul University\Documents\ArcGIS\Projects\HW1\HW1.gdb"): HW_1_csv = "HW_1.csv" #ArcGIS_World_Geocoding_Service = "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/ArcGIS World Geocoding Service"
# Process: Geocode Addresses (Geocode Addresses) (geocoding) HW_1_GeocodeAddresses = "C:\\Users\\BCOLLI24\\OneDrive - DePaul University\\Documents\\ArcGIS\\Projects\\HW1\\HW1.gdb\\HW_1_GeocodeAddresses" with arcpy.EnvManager(scratchWorkspace=r"C:\Users\BCOLLI24\OneDrive - DePaul University\Documents\ArcGIS\Projects\HW1\HW1.gdb", workspace=r"C:\Users\BCOLLI24\OneDrive - DePaul University\Documents\ArcGIS\Projects\HW1\HW1.gdb"): arcpy.geocoding.GeocodeAddresses(in_table=HW_1_csv, address_locator=ArcGIS_World_Geocoding_Service, in_address_fields="'Address or Place' Address VISIBLE NONE;Address2
# Process: Project (Project) (management) HW_1_GeocodeAddresses_Projec = "C:\\Users\\BCOLLI24\\OneDrive - DePaul University\\Documents\\ArcGIS\\Projects\\HW1\\HW1.gdb\\HW_1_GeocodeAddresses_Projec" with arcpy.EnvManager(scratchWorkspace=r"C:\Users\BCOLLI24\OneDrive - DePaul University\Documents\ArcGIS\Projects\HW1\HW1.gdb", workspace=r"C:\Users\BCOLLI24\OneDrive - DePaul University\Documents\ArcGIS\Projects\HW1\HW1.gdb"): arcpy.management.Project(in_dataset=HW_1_GeocodeAddresses, out_dataset=HW_1_GeocodeAddresses_Projec, out_coor_system="PROJCS['NAD_1983_2011_StatePlane_Illinois_West_FIPS_1202',GEOGCS['GCS_NAD_1983_2011',DATUM['D_NAD_1983_2011',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',700000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-90.16666666666667],PARAMETER['Scale_Factor',0.9999411764705882],PARAMETER['Latitude_Of_Origin',36.66666666666666],UNIT['Meter',1.0]]", transform_method=[], in_coor_system="", preserve_shape="NO_PRESERVE_SHAPE", max_deviation="", vertical="NO_VERTICAL")
# Process: Add XY Coordinates (Add XY Coordinates) (management) with arcpy.EnvManager(scratchWorkspace=r"C:\Users\BCOLLI24\HW1.gdb", workspace=r"C:\Users\BCOLLI24\HW1.gdb"): Updated_Input_Features = arcpy.management.AddXY(in_features=HW_1_GeocodeAddresses_Projec)[0]
if __name__ == '__main__':
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started