-
Notifications
You must be signed in to change notification settings - Fork 370
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
GridGeoSampler: don't change stride of last patch #1329
Conversation
Are we sure this works? I thought that to read data including those outside the bounds of an image we have to pass dest = src.read(
indexes=band_indexes,
out_shape=out_shape,
window=from_bounds(*bounds, src.transform),
boundless=True
) |
Good catch! Without |
@@ -487,6 +487,7 @@ def _merge_files( | |||
indexes=band_indexes, | |||
out_shape=out_shape, | |||
window=from_bounds(*bounds, src.transform), | |||
boundless=True, | |||
) | |||
else: | |||
dest, _ = rasterio.merge.merge( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge
has no boundless
parameter, but doesn't need one. I confirmed that it properly samples outside the bounds of the file and uses nodata pixels for padding.
This introduces a serious bug. Changing the CRS of a dataset results in the following error when loading data:
The fix is to use |
Partially reverts #630. See #1245 for motivation.
@remtav