Using ArcMap 10.5, I'm trying to compare recommended fire regimes for different veg types (min/ max fire frequency) with actual burns from the past 10 years to see whether they are in or out of regime.... but I'm stumped on how to achieve this.
I have 2 layers:
- 'Since burnt' with attribute 'no. of years since burnt'
- 'Veg groups' with attributes 'veg type' (3 types), 'min freq' and 'max freq'
First, I spatial joined the 2 layers using 'Since burnt' as the target so now I have a table with the required fields (no of years since burnt, min freq and max freq) to do the calculation. My idea was to then add a field and populate it with 'over', 'under' or 'within' according to where the 'since burnt' value fits in the min/ max range.
With my limited knowledge of python, I came up with:
def calc(y1,y2,y3): #where y1=yrs since burnt, y2=max, y3=min if y1 > y2: return "OVER" elif y1 < y3: return "UNDER" else: return "WITHIN"
Of course this doesn't account for equal to, which I couldn't get to work. And I assume there's a much better way of using y2, y3 as a range.