Do you know how to fix this value error?: ValueError: Values in the LULC raster were found that are not represented under the ‘lucode’ column of the Carbon Pools table.
I am using my own data but here is the attribute table of my raster LULC and the carbon pool file I am using (in attachments). I am not able to share the raster file as it exceeds the allowed file size upload of this forum. I’d be happy to share it if that would help better identify a solution. Any suggestions on how to reduce the file size is welcomed as well.
I suspect the error happens because ArcGIS Pro automatically generates an ‘OID’ column and maybe InVEST can’t manage to identify the ‘lucode’ column.
InVEST mentions that ‘The missing values found in the LULC raster but not the table are: [ 21 30 71 2000 6021].’ but these values aren’t land use and land cover classes in my dataset.
Note that the original raster included other fields that I have tried hiding and deleting from the Fields View on the table prior to exporting from ArcGIS. In the table it looked like it worked, but it seems that this didn’t change the file from using the ‘lucode’ as the ‘value’ field. See a screenshot of my values after deleting unnecessary fields. I may need to run a reclassify tool or change the fields name in my raster.
Hi @jonathan.pierre , thanks for posting your question. I think if you search this forum with the phrase from the error message, you will find some helpful posts.
These values were indeed found as pixel values in the raster. Raster attribute tables are not always guaranteed to include all the unique values in the raster, and the raster attribute table is not read by InVEST at all. The model is simply matching the pixel values it finds in the raster with the values in the lucode column of the carbon pools table. And these values are not present in the table. You could either reclassify the raster to assign these values to one of the lucodes that you are using, or you could add rows to the carbon pools table for these values.
Hi @dave, thanks for the reply. Yes, I had noticed that there were other helpful posts and I looked them up before posting my question. They did help me to fix bugs that I got during my first tries. My situation might be a bit different, I think.
I have several fields in the raster I’m using, two of which classify land use pixels. One is detailed classification (9000+ classes) and another is simplified (9 classes). I’m trying to use the field containing the simplified version that I sent you in the last message. I was hoping that it didn’t find pixel values such as ‘[ 21 30 71 2000 6021]’. From what I see, the file still uses the 9000 values.
I believe I will have to try to reclassify the raster to assign these values based on the simplified classification before running the model.