Skip to content

Conversation

@megannissel
Copy link
Contributor

@megannissel megannissel commented Dec 11, 2025

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.:

'POLYGON': [ogr.wkbPolygon, ogr.wkbPolygonM,
            ogr.wkbPolygonZM, ogr.wkbPolygon25D],
'MULTIPOLYGON': [ogr.wkbMultiPolygon, ogr.wkbMultiPolygonM,
                 ogr.wkbMultiPolygonZM, ogr.wkbMultiPolygon25D]

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 calling zonal_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

  • 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)

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.

MultiPolygonZ geometry type causes error in Pollination

1 participant