You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move VRT DstRect negative-size check before overlap continue (#1737)
Address Copilot review feedback on #1742:
1. The negative-size branch in the resample-cap guard was unreachable.
A negative xSize/ySize makes dst_*1 < dst_*0 so the source was
already skipped by the overlap `continue`. Reject the malformed
sizes before the overlap math with a tailored error message
("negative size") rather than reusing the pixel-budget message.
2. test_max_pixels_kwarg_raises_cap and test_dstrect_at_cap_succeeds
did not actually exercise the override -- they used DstRects well
under the default cap and never passed max_pixels=. Restructure
each to first assert rejection under a tiny max_pixels then assert
success when the cap is bumped, using the same VRT across both
calls. Use a 10x10 VRT raster so the output buffer stays well
under _check_dimensions while the resample intermediate is what
the cap actually bites on.
3. Add test_negative_dstrect_y_size_rejected for symmetric coverage.
0 commit comments