The following 1 raster values do not have corresponding entries in the value map

What is the issue or question you have?

The Crop Pollination model won’t run. I keep getting this error message:
The following 1 raster values [0] from “F:\AA_CRP\Rasters\InVESTPollinationFinal.tif” do not have corresponding entries in the value map"

What do you expect to happen?

What have you tried so far?

My LULC raster has a “Value” field, which I have reproduced as “lucode”.
I’ve triple checked that this matches the lucode in the Biophysical Table.
There are other errors later in the log file, but I can’t get past this.

Upload the logfile using the :outbox_tray: button

InVEST-natcap.invest.pollination-log-2024-12-02–10_27_58.txt (7.0 KB)

Hi @shamajuju , thanks for posting your logfile and describing what you have tried so far.

The “Value” field of the raster (or the raster attribute table, more precisely) is not actually relevant here. The final error message is usually the most helpful one:

ValueError: Values in the LULC raster were found that are not represented under the ‘lucode’ column of the Biophysical table. The missing values found in the LULC raster but not the table are: [0].

Your raster contains at least one pixel with a value of 0, but 0 does not appear in the lucode column of the biophysical table.

You may choose one of these options:

  • add a row in the biophysical table with 0 as the lucode
  • reclassify the 0 pixels of the raster to a different code that is already in your biophysical table.
  • set 0 as the nodata value of the raster. This is often the best choice if the 0 pixels are meant to represent nodata. If a different value is already representing nodata, this may not be a good choice.

Thank you, Dave! That was the problem and consider me pleasantly surprised that it was such an easy fix!

Also, thanks for the tip about looking at the last error message - I totally got bogged down with ALL the error messages.

Thanks again!

Sam

1 Like

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