Pollination: Remove outdated geometry check #2274
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2262
There's an open PGP issue and related PR for supporting additional geometries beyond Polygon and MultiPolygon in
zonal_statistics.The Pollination model itself has an additional geometry check that contradicts validation behavior, where the spec input geometry_types "POLYGON" and "MULTIPOLYGON" are mapped to several ogr types, i.e.:
I opted to remove the check (and the associated test based around it), since this should be caught by validation. If we think there's value in leaving the check (e.g. for CLI users who might not run validation beforehand), we could instead alter the check to use the same geometry list as validation. But it seems like we've been moving away from that in favor of encouraging folks to use the validation functionality (and this would be a redundant check).
One additional point: We may want to wait to merge this in until we do a PGP release that supports the expanded geometry list for
zonal_statistics. That said, if we were to merge this prior to an associated PGP release, this model would fail in a way that is consistent with every other model callingzonal_statistics. (HRA, for instance, will also fail if your AOI is a (Multi)Polygon25D/Z/ZM; the failure there will come from PGP itself since the model doesn't have an additional geom check outside of validation, where those geometry types are all allowed.)Checklist