I have about 6000 points that I need to run a computationally intensive analysis on. My thought process is to break this point layer up into six groups of 1000 points each. I'm trying to do this in ArcGIS ModelBuilder in 10.5 using the field calculator tool. The grouping doesn't really matter, but all of the other attributes to use (city, state, zip) will overwhelmingly put more points into one category and not the other 5 because they are spatially clustered. My plan was to use either the ObjectID, or the unique ID field I created (ObjectID number + letter "A")
My code is as follows:
def classify(OBJECTID) : if int(OBJECTID) >= 5000 : return 6 elif int(OBJECTID) >= 4000 and int(OBJECTID) <= 4999 : return 5 elif int(OBJECTID) >= 3000 and int(OBJECTID) <= 3999 : return 4 elif int(OBJECTID) >= 2000 and int(OBJECTID) <= 2999 : return 3 elif int(OBJECTID) >=1000 and int(OBJECTID) <= 1999 : return 2 else: return 1 classify(!Group_!)
However this code is giving all of my points a value of 1. I can't figure out why. I've also tried this with the
int() portions of code removed and tried using a range statement
int(OBJECTID) in range (4000, 4999): .
Can anyone help?