1

So I have a shapefile consisting of 1000 polygon records. I would want to reclassify one field "Value" into a new blank field named "New Value". As an example:

record = 1; value = 25.6
record = 2; value = 35.4
record = 3; value = 14.1
record = 4; value = 44.6
record = 5; value = 8.7
record = 6; value = 2.1
record = 7; value = 10.4
record = 8; value = 18.3
record = 9; value = 30.9
record = 10; value = 28.5

I want all records with records from 0 to 10 as new field with label "rice". Then 11 to 15 as "wheat", 15 to 25 as "corn", and the remaining unclassified records as "others".

To do this with ArcGIS Desktop, do I use the Field Calculator?

5

You will need to build an expression like the one in Writing If-Then Statement in ArcGIS Field Calculator using Python Parser? You need an if, elif, elif, else statement.

Set your language to Python in the Field Calculator.

Put this in the code block:

def rc(f):
  if 10 >= f >= 0:
    return "rice"
  elif 15 >= f >= 11:
    return "wheat"
  elif 25 >= f >= 16:
    return "corn"
  else:
    return "others"

put this in the expression box:

rc(ValueField)

Value field will be the field that holds the values you want to reclassify.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.