07-16-2018 05:13 AM
I trust you are well.
I am building a spatial model on Crop vigour ( see attached)
In the model id like to categorize NDVI as follows;
-1.0 to - 0.2 Deep Water
-0.1 to 0.1 Rocks/sand/snow
0.2 to 0.5 Shrubs/Grasslands/Senescing crops
0.6 to 0.9 Dense Vegetation
As in this section here, however as i run the model - the only categorize the image is classified in are the first two.- deep water and barren rock.
Is there a better way to classify? rather than using the catogery operator?
Solved! Go to Solution.
07-16-2018 07:48 AM - edited 07-16-2018 08:19 AM
The way you've built the model, the Criteria statements all produce class 1 for the locations that meet the criteria. So the Add operation only ever adds 1 to 0 and therefore produces 1. So you only have classes 0 and 1 produced.
What you really want to do is use a single Criteria to evaluate all 4 criteria as one and produce 4 (really 5) classes. Like this:
Do you really want the extra Raster Outputs?
Let me tidy up the model and send it back.
07-16-2018 07:48 AM
You would need to define your classes within a one Criteria operator, like in a model below
To add new class condition use an "Add a new class row" button in Criteria dialog window, like below:
07-16-2018 08:06 AM
There was also a problem with the attribute tables - you only had 4 rows, whereas you have (potentially) 5 output classes (Class 0, 1, 2, 3, and 4). So I fixed those too,. The attached model should do the trick (but I did not test it since I don't have your data).
12-19-2018 12:56 AM - edited 12-19-2018 12:58 AM
I am trying to reclassify an NDWI image to create a Water Mask, using SPATIAL MODELER. If I use the Criteria operator, I may create different classes, spicifiying the range of values, but as far as I understand in this post there is no field where you add the new pixel values. I mean, I need my new image have:
How can I do that?
12-19-2018 06:21 AM - edited 12-19-2018 06:25 AM
I'm actually working on a model that calculates dNBR and then categorizes the index into Burn Severity classes (six of them, 0 to 5). It also names and assigns colors to the classes, but you may not need to do that bit. This is what I'm using:
Great thing about this is that you can Preview the model, vary the threshold values and see the results in real-time. Once you're happy with the thresholds you can click Run and spend the time to produce an output file.
12-19-2018 06:29 AM - edited 12-19-2018 06:32 AM
Or ... if you look back at Marina's post above, the Criteria operator's CellArray has a Class column, That's where you specify the output DN value (class value) that you want for pixels which meet that criteria.
In my example it's the Valuen ports on the Conditional operator whch set the output DN values.
Either way works.
12-20-2018 05:32 AM
In case anyone's interested, the full set of Burn Indices models is now posted in the Spatial Modeler Tutorials section: