12-14-2018 09:32 PM
Hi, I have a raster created with machine learning in a spatial model, which consists of a few classes.
The class attribute is called Class_Names and I want to output the 'Tree' class only. Is there something similar to the Criteria operator that allows the user to filter by a specific class?
I tried Class Name to Pixel Values but I can't output this as a raster. Also, I can't use the Criteria operator as the input changes every time I run the model.
Solved! Go to Solution.
12-14-2018 05:47 AM
I didn't think this was going to work, but it does:
In my case the LULC thematic input has an attribute field called "Landuse" and one of those classes is "Lakes". In your instance you would substitute Class_Names and Tree. The output is a binary (u1) raster where 1 represents Lakes and 0 represents not-Lakes.
Hope that helps.
12-14-2018 05:59 AM
Note that the above model works because a raster stream within the Spatial Model can have a pixeltype of String. However you cannot create an output raster file with a pixeltype of String.
12-14-2018 06:54 AM - edited 12-14-2018 06:55 AM
Just wanted to check on Class Name to Pixel Values operator. It can also output one specified class. Attaching model here. Model also re-adds the color of a class and opacity for the background.