First - I know this post has insufficient detail for someone to answer my question directly but wanted to initiate a conversation and see what information might be most useful.
I’ve been working with the HRA on a large study area of coastal wetlands in the Great Lakes. The model works as expected given the stressor inputs we have. The stressors are: 1) location of agricultural land; 2) location of developed land; 3) location of roads; 4) location of public access sites.
We are trying to develop hypothetical scenarios to evaluate the impact of land cover (and other) changes on coastal wetlands. Two of these scenarios are increased agricultural land extent and increased developed land extent. This is where the HRA outputs are confusing - the results for the “baseline” and “scenario” runs are identical even as a float data type.
To create the scenarios I artificially modified the land cover dataset to have more of those land cover types. When looking at the input datasets they are clearly not identical
Thanks for posting. It would be helpful to see the logfile from both of these runs, could you upload them here please? It’s also fairly likely that we’ll need to get your input data in order to reproduce and explain this. So it couldn’t hurt to package that up into a zip folder and share a link, here or in a private message to me.
In the meantime, something else to explore would be digging into the intermediate results of the ‘scenario’ and identify which intermediate outputs are not what you would expect. In other words, are all of the intermediate files identical to the ‘baseline’ files when they shouldn’t be, or only some.
Hi Dave - thanks for the quick reply. I’m trying to get things together after some very crazy holiday weeks. Wanted to make sure you knew that I saw your message and am working to get the necessary files together.
The logfiles from the runs are attached here. I did have an error message show up for the second run seemingly related to the zonal statistics calculations, but the output tif files were produced. Maybe that’s one of the issues?
InVEST-Habitat-Risk-Assessment-log-2019-12-16–07_43_01.txt (60.6 KB)
InVEST-Habitat-Risk-Assessment-log-2019-12-16–08_04_03.txt (61.2 KB)
Hi @b.rosenberg_ERG if this is still an issue, I think troubleshooting will require seeing your input data for each run as well. It’s also worth looking inside each of the CSV file inputs for the different scenarios and confirm that they do in fact point to different sets of GIS data.
From your logs, I can see that you used a different workspace directory for each scenario. That’s a good idea, and it makes it very hard to explain how the results could be identical unless the input data were also mistakenly identical.
Continuing the discussion from Identical HRA Outputs - Different Inputs: Any thoughts?:
Hi @dave. Apologies for the long delay (on travel). I’m having trouble getting the system to upload my zip folder. It is large (~360MB) so maybe that’s the issue? I put it on Google Drive here so you could download - https://drive.google.com/open?id=1mYNPNpfWcFn4kgfgYi7Q85gGuEHga5bG.
I’ve put together a zip folder with all of the input and output files for each of the three runs I did. All of them have identical results.
Run 1 = “Baseline” (using existing, unmodified datasets)
Run 2 = Increased development scenario
Run 3 = Increased agriculture scenario
There is a separate folder for each run and within each folder there is an “input” folder that houses the habitat and stressor files as well as a unique set of input CSVs. From those you should be able to navigate within the input files and confirm that they are in fact different.
FYI - the way I determined that the results were identical was by calculating a new raster equal to the difference between Run 1/Run 2 and Run 1/Run 3. The resulting raster included only cells with a value of 0.
I went through and double checked each of these and the input stressor files (for developed or agricultural land) are in fact different, yet the output files are identical. I also checked the CSVs to make sure it wasn’t a simple file path issue and that doesn’t appear to be the case either.
Please let me know if you have any more questions or need more info. I’m happy to split these files up if this is difficult to navigate.
Thanks for all your help!
Hey @b.rosenberg_ERG thanks for following up. While I’ll let @dave continue to investigate this thread, we JUST released a new version of InVEST ( InVEST 3.8 Download ). This has been many months in the making and includes lots of fixes and enhancements, including some for HRA. It would be really helpful if you could update to this latest version and confirm that you’re still having the same issue.
Hi @b.rosenberg_ERG, thanks for sharing your data. I looked at a couple of the stressor layers, and it seems like the issue lies there.
Specifically, the development and agriculture stressor layers seem to include a very large polygon that essentially overlaps the entire AOI. It looks like it could be the result of a buffer that was maybe much larger than intended? With such a large buffer applied, two different layers could come out covering almost exactly the same area. The first thing the model does with these inputs is rasterize them, so these two inputs are identical from the model’s perspective.
By the way, it would be pretty interesting if you see something different when you look at these layers in a GIS. They are pretty hefty and take a moment to render, at least for me. I mapped them with QGIS.
Thanks, Dave. There are technically two polygons in each of those stressor layers - one with a value of 0 and one with a value of 1. The reason for that is because they were converted from an original land cover raster where I defined each land cover type (ag or developed) as a “1” and everything else as “0”.
I was under the impression that the model would treat the polygons with a value of 0 as “NoData” and only consider the areas where the value was 1. Sounds like this might not be the case. If I delete the polygon with a value of 0 then it will only include polygons where there is ag/developed land. Is that what the model is looking for?
Appreciate your help.
Yes, that is what the model is looking for. The relevant info from the User’s Guide is not as prominent as it should be, but here it is:
“If a raster file is used, it needs to contain values of 0s and 1s, where 1s represent the existence of a habitat or a stressor, and 0s represent non-existence of a habitat or a stressor. If a value other than 0 or 1 is entered, it will be treated as 0. If a vector file is used, all the features in that vector are considered as the existence of a habitat or a stressor.”
Glad we got this figured out!