Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # import arcpy and set path
- import arcpy
- import numpy
- path = 'C:/Users/Something Wicked/Desktop/Work/Python/Python Scripts/Python Code Project/Sumner County Files'
- arcpy.env.workspace = path
- #Update Feature Class
- COUNTY = 'Sumner_County'
- FEATURE = 'SumnerGCS83_joined'
- UTheme = arcpy.da.UpdateCursor((FEATURE + '.shp'), ['THEME1','THEME2','THEME3','THEME4']) # You're trying to convert to string text that's already a string str('.shp')
- for row in UTheme:
- if row == 1:
- row = 'Early Exploration'
- elif row == 2:
- row = 'Early Settlement'
- elif row == 3:
- row = 'Agriculture'
- elif row == 4:
- row = ' '
- elif row == 5:
- row = 'Transportation'
- elif row == 6:
- row = 'Religion/Philosophy Movements & Leaders'
- elif row == 7:
- row = 'Political/Government'
- elif row == 8:
- row = 'Military Affairs'
- elif row == 9:
- row = 'Education'
- elif row == 10:
- row = 'Science & Technology'
- elif row == 11:
- row = 'Art & Technology'
- elif row == 11:
- row = 'Society & Customs'
- elif row == 13:
- row = 'Humanitarian'
- elif row == 99:
- row = 'Other'
- # Update the cursor with the updated list
- cursor.updateRow(row)
- del UTheme
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement