1

I am trying to assign consecutive numbers to a numbers field using Field Calculator so that all my 500 features have unique label values, however some features have multiple polygons and therefore have two or more rows in the attribute table. in this case I need those features to have the same numerical value. i have another field with the names of all features that i would like to base this numbering system off of. So, i need a unique label for all unique features starting from 1 to the end.

How should i go about doing this?

jbchurchill
4,49924 silver badges41 bronze badges
asked Jun 9, 2016 at 19:44
2
  • 1
    Please edit your question to provide an example of the numbering convention you want to achieve. You say you have 500 features, but then you say each feature may have multiple polygons, so you actually have more than 500 features. Be specific about what is the basis for your numbering, and the grouping that you want to use to restart the count. Commented Jun 9, 2016 at 20:11
  • 2
    Summarise your table on this field. Add field to result and populate it with consecutive numbers. Join to parent etc Commented Jun 9, 2016 at 20:20

1 Answer 1

1

I would somehow get a list of all the unique values. There are a few ways to do this. You can do it with Excel or Access or in ArcGis you can use the Find Identical tool to isolate the duplicates.

arcpy.FindIdentical_management('your_layer', r"C:\OUTPUT.gdb\dupe_table", "FLDWITHDUPES", output_record_option="ONLY_DUPLICATES")

You don't need to use the above code snippet. The tool is in the "Data Management" toolbox.

Once you have a list of unique values put them in a spreadsheet. Add a column for your numeric identifier and copy them down so they go up in number for each unique name. Then you can perform a "Join" using the Name field as the join field.

answered Jun 9, 2016 at 20:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.