Applying Threshold values to NDVI
By samyj in ERDAS Software Forum
Hello
I have created two NDVI's of the same area at different points in time. I am bit stuck with what formula to use in the spatial modeller to apply threshold values. Ideally from each of my NDVI's i want to have an a number of output images e.g. one showing just the pixels with values from 0.75 - 1, and then another image of just the pixels of values between 0.5 - 0.74 and so on. I wonder if anyone could tell me if this is possible in spatial modeller and if so how?
Thanks
----------------------------------
You were sent this email because you opted to receive email notifications when someone created a new thread, or replied to a topic within this forum, ERDAS Software Forum.
To unsubscribe:
Re: Applying Threshold values to NDVI
By Arto Vuorela in ERDAS Software Forum
An NDVI image as input, create many functions (circles), each having a statement like EITHER $n1_ndvi IF ($n1_ndvi >=0.5 AND $n1_ndvi <0.75) OR 0 OTHERWISE and each having an output image of its own.
----------------------------------
You were sent this email because you opted to receive email notifications when someone responded to this thread.
By Donn Rodekohr in ERDAS Software Forum
Samyl,
Taking Arto's logic one step farther would be to use the CONDITIONAL statement in model maker. Conditional allows you to define multiple values rather than the 2 that are defined with an EITHER statement. For example:
Input file: $n1_ndvi with a data range of -1 to +1
CONDITIONAL {
($n1_ndvi <= -0.75) 10,
($n1_ndvi <= -0.50) 20,
($n1_ndvi <= -.25 ) 30,
...
($n1_ndvi <= .75) 100,
($n1_ndvi <= 1.0) 110}
Output file: $n2_ndvi_thresh
Conditional looks at the sequence of conditions, (those statements within the parenthesis) and assigns the value immediately following the closing parenthesis to the FIRST statement that is TRUE. You do not have to bracket the values, just organize the statement to form the brackets. In the example above, an NDVI value of -0.33 would be assigned a value of 30 since the first statement that would be true would be where ($n1_ndvi <= -.25 )
If you have multiple input files you can have nested criteria, for example
($n1_ndvi1 <= -.25 AND $n2_ndvi2 <= -.37) 30,
This statement would assign a threshold value to a pixel based upon two different NDVI's that have different data ranges.
The key is to understand how to assign the threshold values and have it clearly defined.