Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import arcpy
from arcpy import env
env.workspace = "C:\UtahAddressModel\SouthJordan_July2012"
rows = arcpy.UpdateCursor("SJC_AddressPts")
for row in rows:
if row.getValue("TYPE") == "CHURCH":
row.setValue("TYPE_D", "REL")
elif row.getValue("TYPE") == "COMMERCIAL":
row.setValue("TYPE_D", "BUS")
elif row.getValue("TYPE") == "VACANT" or row.getValue("TYPE") == "OPEN SPACE":
row.setValue("TYPE_D", "LAND")
elif row.getValue("TYPE") == "PUBLIC":
row.setValue("TYPE_D", "GOV")
elif row.getValue("TYPE") == "RESIDENTIAL":
row.setValue("TYPE_D", "RES")
elif row.getValue("TYPE") == "SCHOOL":
row.setValue("TYPE_D", "ED")
else:
row.setValue("TYPE_D", "OTHER")
rows.updateRow(row)
del row, rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment