Skip to content

HRA update to go along with pygeoprocessing #322#1882

Merged
emlys merged 5 commits intonatcap:mainfrom
emlys:task/test-update-pygeoprocessing-322
May 19, 2025
Merged

HRA update to go along with pygeoprocessing #322#1882
emlys merged 5 commits intonatcap:mainfrom
emlys:task/test-update-pygeoprocessing-322

Conversation

@emlys
Copy link
Copy Markdown
Member

@emlys emlys commented Apr 8, 2025

Description

Fixes #1881

The changes made in natcap/pygeoprocessing#428 caused an HRA test to fail, because HRA's geometry simplification function was always setting the vector geometry type to Unknown. pygeoprocessing.zonal_statistics will now require a type of Polygon or MultiPolygon, so this raised an error.

To resolve it, I am updating HRA to copy the geometry type over from the input vector. This may still be Unknown for habitat or stressor layers, but should always be Polygon or MultiPolygon for the AOI (which zonal_statistics is run on).

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
  • Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@emlys emlys requested a review from phargogh May 15, 2025 16:47
@emlys emlys self-assigned this May 15, 2025
@emlys emlys marked this pull request as ready for review May 15, 2025 16:47
Copy link
Copy Markdown
Member

@phargogh phargogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @emlys !

@phargogh
Copy link
Copy Markdown
Member

Hmm something seems to be a little funky with GHA. I'll let it cook a little longer and see if the actions complete. Otherwise, this change is so simple I'm happy to just merge.

@emlys
Copy link
Copy Markdown
Member Author

emlys commented May 19, 2025

I fixed a whitespace issue that was causing the HISTORY.rst check to fail. The ReadTheDocs failure seems unrelated, so I'm going to merge

@emlys emlys merged commit 4729000 into natcap:main May 19, 2025
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update HRA for pygeoprocessing zonal_stats geometry change

3 participants