I have a point shapefile with two columns i want to process. The first column is aspect and the second is aspect_m60, there is only one row with the aspect of my point. I have tried to write a script in Python for ArcGIS 10.2.2 because i want to put it in my code but with no success. The code is this:
# Calculate Field
import arcpy
# Set environment settings
arcpy.env.workspace = "c:/W/Sik"
# Set local variables
inTable = "Point"
fieldName = "aspect_m60"
expression = "getCalc(!aspect!, !aspect_m60!)"
codeblock = """def getCalc(aspect, aspect_m60):
if (aspect < 60):
aspect_m60 = (aspect - 60) + 360
if (aspect = 60):
aspect_m60 = aspect - 60
else:
aspect_m60 = aspect - 60"""