SamYosemite

Field classification using field calculator and python script

Discussion created by SamYosemite on Aug 29, 2012
Latest reply on Aug 29, 2012 by SamYosemite
Hi I'm trying to classify a field based on a land classification value in a different field.  I've searched around the forums, but haven't had any success building a working script. 

Pre-logic Script Code:
def Reclass( !LUCode!):
  if ( !LU_2005! = "AG")
    return "Pasture"
  if ( !LU_2005! = "ST")
    return "Urban" 


LUCode =
Reclass( !LUCODE!)

Any help would be greatly appreciated.

Thanks.

Outcomes