Habitat Quality - Value Error encounted raster at ..../kernel/Agricultural_c could not be opened

Hi, there, I have been working on running the habitat quality model. An error occured which says :“ValueError: Raster at H:/xm/Habitat\intermediate\kernels\kernel_Agriculture_c.tif could not be opened”. It also seemed weired in that the model was running for too long (over 6 hours) for my study area (about 1000*3000 pixels). The log files and corresponding data are attached for your information. Thank you all in advance.


HQ.zip (353.5 KB)
InVEST-Habitat-Quality-log-2020-07-06–11_20_11.txt (5.7 KB)

1 Like

Hi There

That is very strange because I run the model for Habitat Risk Assessment and it only took like less than 20 minutes. Do you have enough RAM and space in your laptop? If you don’t have enough RAM and space. May be it will require many times to run the model.

InVEST is really sensitive. Please make sure the name of your raster data input is the same with the name written in your threat and your sensitivity table. Pay attention with Lower case/upper case/check whether it is the same name or not.

I think that your raster data input is written with “kernel_Agriculture_c”. However, i did not see “kernel_Agriculture” in your Threats_Data and Sensitivity csv table. You wrote it only “Agriculture” in the threat column.

Please check it again. Make sure everything is the same. Let me know if you still have error message.

Thank you

Hi @mag813,

Thanks for posting and providing the log file and data. In opening up your threat rasters it looks like the pixel size is very small:

Dimensions X: 2727 Y: 1208 Bands: 1
Origin 73.4395,39.8307
Pixel Size 0.01145502090243230228,-0.01145502090243230228

I see that the projection is :

CRS EPSG:32645 - WGS 84 / UTM zone 45N - Projected
Extent 73.439464264985,25.9930505943933383 : 104.6773062659180482,39.830715844531

The extents appear to be in Lat, Long still as opposed to being projected in meters. This makes me think that the pixel size is actually in decimal degrees. How did you go about projecting this data? Could you try reprojecting it in QGIS or ArcGIS to the desired projection? I believe in QGIS the process is found in raster - > projections -> warp.

Thanks,

Doug

Thank you for the help, Doug. It seems that I failed to tranform the raster units into meters previously and the projections were indeed in degrees. I followed your instructions to reproject the rasters and the model ran successfully! Thank you again for the consideration.

Thanks for your help. It turned out that my errors were resulted from the threat rasters were incorrectly projected (in degrees). The “kernel_Agriculture_c” was one of the files produced during the model running process. The model ran successfully after I reprojected all the rasters and it took only a few minutes.

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