Crop Production Percentile Model

Hi,
I downloaded the ESRI 2020 land cover map for my area of interest and am attempting to construct the other input, the landcover to crop table csv, but I have no idea how to do so.

Any assistance would be greatly appreciated.

Thanks,
Anitha

Hi @aneetainvestvina, and welcome to the forum.

Have you looked at the sample data that comes with InVEST? Each model has sample data so you can see what it looks like, how it’s formatted, and you can use it as a template for your own data. By default, sample data is installed when you install InVEST (on Windows at least), else you can download it from the InVEST web page under “Individual Sample Datasets for InVEST”.

~ Stacie

1 Like

Hi Stacie,
Thank you for your response. I have the sample data, but I’m still curious about how the table was created. According to my understanding, the table must be built using the landcover map, but I have no idea how to accomplish it.

Hi @aneetainvestvina ,

The table can be built in Microsoft Excel, Google Sheets, or any spreadsheet program. When it’s ready, save it as a .CSV file. Our User Guide points out that “When saving the CSV file, be sure to save the file using one of the following encodings: ASCII, UTF-8 or Signed UTF-8. Using any other encoding (such as Latin-1) will result in incorrect text rendering in output files and could cause models to fail with an error.”

The landcover map only needs to be used as a guide to properly pair each Value from its attribute table with its respective lucode (and associated crop_name) in the table.

Does that make sense? Please refer to the lucodes in the sample table to see how they each match their respective Values in the sample landcover map’s attribute table.

-Jesse

1 Like

Hi Jesse,
Thanks for your response.
This is the part I am unable to decode" Please refer to the lucode s in the sample table to see how they each match their respective Value s in the sample landcover map’s attribute table.".
Is there a guide or video you would recommend? I have an ESRI Land cover map and I am unable to obtain the crop lucode.

Hi @aneetainvestvina -

If your land cover map is a raster, it probably already has integer values assigned to each land cover class, so you need to look at these in a GIS, and/or the map’s documentation, to find out those lucode values. If the land cover map is vector, then you’ll either need to assign integer lucodes yourself, or the GIS will probably assign integer values automatically when you convert it to raster.

We have a couple of video tutorials for working with biophysical tables in InVEST, which you can check out on our GIS for InVEST web page. They use the sediment model as an example, but a similar process applies for the Crop model.

~ Stacie

1 Like

Thank you for the detailed response, Stacie.
One more question about Monfreda datasets: will this be the same for my ESRI 2020 land cover input as well?

Hi @aneetainvestvina -

I don’t have experience using the Crop model, but the User Guide says that the Percentile model requires a mapping between your land cover map and the crops supported in the Monfreda dataset (parameter LULC To Crop Table). The land cover map can be from any source, and the lucodes themselves don’t matter, but each lucode must be mapped to one of the supported crop names.

~ Stacie

Thank you, Stacie.
I downloaded the 2020 land cover (.tiff) for Vietnam from ESRI and Mekong delta area shape file from another data source ,which is the subject of my research. I retrieved land cover for the Mekong area using QGIS’ extract by mask feature. And when I try to import this Mekong (.tiff) LULC file into my crop model, it refuses to accept.

Any assistance would be really helpful.

Hi @aneetainvestvina -

What happens when the crop model refuses to accept your LULC raster? Does it give an error? Please take a screenshot of the model window with the error message - thanks!

~ Stacie

Thank you, Stacie.
Please find attached the error screenshot and input land cover data.
MekongDelta.tif (89.1 KB)

When you click on the red X next to Land use/land cover map (or in the Run button), what does the error message say? That’s the important part.

~ Stacie

Ok. And the User Guide for this model says this:

Note that all GIS inputs must be in the same projected coordinate system and in linear meter units.

So you’ll need to check the coordinate system of the LULC layer, and if it does not have a projected (not geographic) coordinate system, you’ll need to reproject/warp it to have one that’s appropriate for your study area.

~ Stacie

1 Like

Thank you very much, Stacie. I was able to fix the.tiff file, but the result table contains 0 values for the crops.

Some people have reported this problem before and it has come down to mismatches between the codes the in the crop table and the codes in the landcover raster. For example:

Dave, thank you for the information. I’ve attached my input raster, which I downloaded from ESRI Landcover 2020 and tried to extract the Mekong Delta (Vietnam) area land cover raster using ArcGIS Clip/ExtractbyMask. Then, together with the attached table, they utilized this raster as an input to Invest. I tried 1 to 11 values for the rice crop, but they all resulted in a 0 in the results.
MekongDelta3.tif (251.8 KB)
landcover_to_crop_table.csv (26 Bytes)

Hi @aneetainvestvina , please compare your landcover raster to the one provided by the sample data. The model expects a raster with a single band, where the pixel values are integers that match the codes in the “lucode” column of the CSV file.

This Mekong raster has three bands that appear to be Red-Green-Blue bands. And the first band, which is the one used by the model has these values, none of which appear in the CSV:

If one of these numbers does truly represent rice landcover, then try changing the “lucode” value in your CSV to match that number.

1 Like

Hi Dave, thank you so much. I’m new to ArcGIS, thus I missed some important details. I’ll look at your suggestion and consult you if necessary.

Hi @aneetainvestvina -

Just a note that it is necessary to have some solid GIS skills in order to work with the inputs and outputs of InVEST. If you’re new to GIS, I strongly encourage you to take a class or tutorials, so you feel comfortable with the basics of rasters, vectors, attribute tables, coordinate systems, symbology, etc, before working with the models. We do have a few technical tutorials available that are specifically related to InVEST topics, which also may help.

~ Stacie