2

I am using ArcGIS 10.1 and ModelBuilder. I am not familiar with Python.

My question is very similar to ReClassify Vector Data Between Values using ArcGIS Desktop? . However that question is about reclassification using the values from one other field.

I have experience of using this type of reclassification within the Calculate Value Tool.

However I wish to base a reclassification on the values from more than one source data field. For example from two fields - "Land" and "WellYield". ideally I'd like to be able to run classifications from 2 or 3 source fields.

I know the following code is wrong because i have not defined the "Land" field.

e.g.

parser: Python

    Expression:
    Reclass(!WELL_YIELD!, !Land!)

    Code Block:
    def Reclass(WellYield, Land):
      if (WellYield == 'Make'and Land == 'Natural'):
        return 'Greenspace'
      elif (WellYield =='Multiple'  and Land == 'Natural'):
        return 'Not Greenspace'

Any help or tips on the correct code would be much appreciated.

I have just been testing some outputs by trial and error.

The above code seems to work now for classifying by different data fields. I will test further by three fields.

Any insights or advice would still be appreciated.

2
  • 1
    You might want to and an else statement in case there are instances where land is natural but wellyield isn't make or multiple.
    – Paul
    Commented Aug 21, 2013 at 19:49
  • Other than @Paul comment (+1) the code looks fine to me.
    – PolyGeo
    Commented Aug 23, 2013 at 3:44

1 Answer 1

1

In Model Builder You can use Insert -> Iterators -> Feature selection where you select "group by" fields. It works like combine function for raster data. As output you have Value that you can use as a name of the output : outputlayer_%Value%. It creates layers like : outputlayer_Make_Natural outputlayer_Multiple_Natural ...

Your Answer

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

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