-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HRA regression when rasterizing spatial criteria #1120
Comments
Only habitats and stressors should now be rasterized with ALL_TOUCHED=TRUE. Spatial criteria vectors should not be. RE:natcap#1120
@phargogh Do you think there is a reason these were different in 3.9? Otherwise it might be nice make them consistent, if it wouldn't ruffle too many feathers. |
Oh, whoops, maybe I misinterpreted. My suggestion is probably exactly what was ruffling the feathers in the first place. Nevermind. |
Yeah, the change in rasterization behavior is what was ruffling feathers in the forums thread, and this change was by accident. If there was a deliberate reason to have these cases be handled differently, I can't find a reference for it in the source code or the user's guide, and all the references to rasterization I can find in the original InVEST 3.3.0 use a consistent What do you think? Looking back at the very first version of HRA, the ArcGIS edition of HRA used pixel centerpoints to determine whether a pixel is rasterized (at least as of ArcGIS 10.1). GDAL uses Bresenham's line algorithm in addition to centerpoint checking (source). So we've been all over the place, historically, with our rasterization methodologies. |
I'm in favor of making the rasterization internally consistent; using the same My take is that the new HRA represents a correction rather than a regression. |
I just took a quick look at the sample data. It seems commonplace for the footprint of a spatial criteria layer to exactly match the footprint of either a habitat or stressor. So I could imagine that rasterizing with different rules could result in a problem where, after rasterizing, a pixel on the margin might have presence of both the habitat & stressor, but would be missing the spatial criteria rating associated with that habitat-stressor pair. |
A user on the forums noticed a difference in how spatial criteria were being represented between InVEST 3.9 (former HRA) and InVEST 3.12 (the new HRA implementation), specifically around how input vectors are being rasterized.
After digging into this for a while, it appears that the InVEST 3.9 implementation makes the following distinction that I missed when rewriting HRA:
ALL_TOUCHED=TRUE
ALL_TOUCHED=FALSE
The current HRA does not make this distinction, but probably should, at least for backwards compatibility.
For what it's worth, I could not find this distinction in the InVEST 3.3.0 HRA.
The text was updated successfully, but these errors were encountered: