Skip to content

Instantly share code, notes, and snippets.

Created August 3, 2012 16:28
Show Gist options
  • Save anonymous/3249214 to your computer and use it in GitHub Desktop.
Save anonymous/3249214 to your computer and use it in GitHub Desktop.
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