I've never used Python scripting before and can't seem to figure out how to use an If statement in the Field Calculator tool.
I have a field called 'MAX_GRIDCODE' which returns the highest force a piece of infrastructure is exposed to. I need to use this number to calculate a simple estimate of damage in the field 'DI'.
The statements I need are:
If "Max_GRIDCODE" >0 and <=0.5 then "DI" = 1
If "Max_GRIDCODE" >0.5 and <=1 then "DI" = 2
If "Max_GRIDCODE" >1 and <=1.5 then "DI" = 3
If "Max_GRIDCODE" >1.5 and <=2 then "DI" = 4
If "Max_GRIDCODE" >2 then "DI" = 5
How do I code this using ArcGIS 10.2 for Desktop?