Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 . 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.

share|improve this question
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 Aug 21 '13 at 19:49
    
Other than @Paul comment (+1) the code looks fine to me. –  PolyGeo Aug 23 '13 at 3:44

1 Answer 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 ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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