This forum is shutting down! Please post new discussions at

Habitat Quality model

Dear InVEST team,

I would like to know whether raster threats can be generated started from a land cover raster. In fact, I have a land cover raster with various LULC types, among which cropland and urban areas: can I extract these LULC types and use them as raster threats?

If so, what is in your opinion the best way to do this with ArcGIS? I have been trying to use the tool "Extract by Attributes" by selecting cropland as attribute and in so doing generate a raster map with only the cropland areas. However, I keep on receiving an error message when using this tool. Do you have any thoughts on this?

Thank you!


  • RichRich Administrator, NatCap Staff
    Hi Riccardo, I'm not very familiar with Arcgis, but it should have a raster calculator. I suspect calculating a function like "landcover_raster==landcover_threat_id" would give you what you want.
  • swolnyswolny Member, NatCap Staff
    Yes, Riccardo, making threat rasters from the LULC is fine. Rich's suggestion should work, you'll end up with a raster of 0/1 where 1 is the LULC you want for your threat.

    I'm not sure what error message you're getting with Extract by Attributes, but yet another way to do it is to Reclassify such that all LULC types get a new value of NoData, except the one that you're turning into a threat raster. 

    ~ Stacie

  • Dear Rich and Stacie,

    Thank you so much for your help!

    I tried both methods and in the end I managed to create a threat raster for cropland using the Reclassify tool in ArcMap. I assigned the value of 1 to the four LULC types that refer to cropland and for all the other types I assigned NoData.

    After setting up the input tables I tried to run the Habitat Quality model, but I received this error message: "could not convert string to float". Do you have any idea why I get this message?

    Please find the log attached.

    Thank you in advance for your helpfulness!
  • RichRich Administrator, NatCap Staff
    Hi Riccardo, eyebaling the stacktrace it looks like it's crashing when the model is trying to parse out values in the sensitivity dictionary.  Can you make sure that none of your "LULC", "HABITAT", or "L_*" tables have anything other than numbers in them?  I think you might even get that error if there is a space too, so look for that!
Sign In or Register to comment.