I created a fishnet grid and need to give the individual polygons ID values based on their associated property names and location relative to each other.
I was able to achieve the above results with the following code that I adapted from a previously asked question.
rec=0
def autoIncrement(string_prefix):
global rec
pStart = 1 #adjust start value, if req'd
pInterval = 1 #adjust interval value, if req'd
if (rec == 0):
rec = pStart
else:
rec = rec + pInterval
return string_prefix + str(rec)
autoIncrement('AP')
However, I cant figure out how to relate it to the Y_Coordinates instead of the OBJECTID.