I try to run the Habitat Quality model ( is the second time) the first time with another data that was ok. Now is the same study area buy the threats are different and now I have this error:
ValueError: (‘C:/Habitat_Calidad/Escenario_1\intermediate\autopistas_aligned_esc1.tif’, 1) has a row blocksize which can make this function run very slow, create a square blocksize using warp_raster or align_and_resize_raster_stack which creates square blocksizes by default.
And I don’t know how to fix it, could you help me?
Thanks for posting to the forums and welcome to the community.
This is an interesting error because it appears that the raster mentioned (autopistas_aligned_esc1.tif) would have already been run through one of our functions (align_and_resize_raster_stack) that should default to a square blocksize.
Would you mind sharing your data so we can investigate the issue? The data that would be useful would be your threat rasters, the current LULC raster, threats and sensitivity table. You can email them directly to ddenu @ stanford.edu or you can share via Google Drive or another file sharing service.
It looks like the issue is coming from the convolution kernel that is created based on the MAX_DIST column in the threats table. This column is in Kilometers and you had 1000 and 500 for the entries. This makes a very large kernel which is causing the problems. Is it possible you wanted a 1 KM and 0.5 KM max distance?
Can you try switching those max distances to 1 and 0.5, just to confirm the models works for you with those distances?