Habitat Quality - creating threat rasters

Hello Everyone,
Please I will need the assistance in modelling habitat quality of a biosphere.
I have collected all the necessary data needed for the model I would like to request for step by step guidance to enable me finish the model on time.
Thank you

Hi @Elvis214,

Could you say more about the problem you’re having? Have you run the model but are running into errors? If so, could you upload your logfile which is saved in the workspace?


~ Doug

@Elvis214 I’ll also note that we have a training video on the Habitat Quality model on YouTube, in case it helps.

~ Stacie

1 Like

Hello @dcdenu4
I have tired to run the model and all the other parts were ok but I had errors in with the Threat Data which gives me an error that I have attached below.

Hello @swolny
I have watched the video but the part which talks about creating a threat raster is my difficulty at this moment.
Is it that I have to create a raster with the points I recorded the threats for the area the threats were found

Hi @Elvis214,

That’s right, you will need to have a threat raster for each of your identified threats. If you had a vector road network that was considered a threat, you would need to convert that vector into a raster using QGIS or ArcGIS or your preferred gis library.

If you have vector point data that identifies your threats, you will need to convert that point vector into a raster too. This is often done using a “rasterize” method that most tools will have.

Once you have your threat rasters you will need to add the raster file paths to your Threats Data CSV under the CUR_PATH column. The file path should be relative to the CSV as explained in the Users Guide

~ Doug

Thank you very much, I have my threats data as points so I will then convert them into raster files.
Please so if I have 4 threats and the threats are as follows: (Farms, Logging, settlements and erosion)
I will convert each points for the treats to raster and that will be my threats data.
so in all I will have 4 threats threats maps??

That’s right, you’ll have 4 threat rasters, one for each of: farms, logging, settlements, and erosion.

Please I have all the raster set, please how will I input into the InVEST model??

I’ll try to give an example of how to set up the file structure to make sure the model knows where those threat raster files are.

Let’s assume I have a directory: C:\Users\MyUser\HabitatQuality. I would then put my Threats.csv input in that directory. So I would have C:\Users\MyUser\HabitatQuality\Threats.csv.

In Threats.csv I would have a table that looked like this:

farms, 0.25, 0.75, linear, farms_threat.tif
logging, 0.25, 0.75, linear, logging_threat.tif
settlements, 0.25, 0.75, linear, settlements_threat.tif
erosion, 0.25, 0.75, linear, erosion_threat.tif

The threat rasters: farms_threat.tif, logging_threat.tif, settlements_threat.tif, and erosion_threat.tif would be stored in C:\Users\MyUser\HabitatQuality.

The users guide, which I linked to in an above post, goes into more detail on setting up the threats table and the threat raster paths. Hopefully that is a helpful example of A way to set up your files to get the model working.

~ Doug

Hi @Elvis214 -

Also a reminder that we provide sample data for each model, which you can use as an example for how yours should be structured. If you’re using the Workbench, under Settings there’s a link to download sample data.

~ Stacie

1 Like