Skip to main content
Tweeted twitter.com/StackGIS/status/1118801525667659776
edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

How to auto increment a Auto incrementing field based on groups within a feature class?

edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
deleted 21 characters in body
Source Link
Midavalo
  • 29.9k
  • 11
  • 51
  • 105

I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.

I assume it would be an alteration of this:

rec=0
def autoIncrement():
 global rec
 pStart = 1 
 pInterval = 1 
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

Thank you in advance!

I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.

I assume it would be an alteration of this:

rec=0
def autoIncrement():
 global rec
 pStart = 1 
 pInterval = 1 
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec

Thank you in advance!

I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.

I assume it would be an alteration of this:

rec=0
def autoIncrement():
 global rec
 pStart = 1 
 pInterval = 1 
 if (rec == 0): 
  rec = pStart 
 else: 
  rec = rec + pInterval 
 return rec
Source Link
Becks
  • 133
  • 1
  • 4
Loading