Created
August 3, 2012 16:28
-
-
Save anonymous/3249214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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