Values in the LULC raster are not represented under the 'lucode' column of the Carbon Pools table

Hello,

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.

LULC_rastertable.csv (25.6 KB)
carbonPoolsCaribou.csv (440 Bytes)

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.

LULC values range

Any help would be greatly appreciated.

Thanks!

Log file:
InVEST-natcap.invest.carbon-log-2023-04-11–01_45_34.txt (5.6 KB)

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.

Hi @jonathan.pierre -

Yes, you will need to reclassify the raster to use the simplified classes and related codes, matching them to the biophysical table lucodes. InVEST does not make use of raster attribute tables.

~ Stacie

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.