DOC: Create destfile with proper dictionary (#2583)

The dictionary was updated but the src dictionary was being used. Because of that the iteration wasn't using the blocks
This commit is contained in:
Pedro Alves Quilici Coutinho 2022-09-02 17:10:13 -03:00 committed by GitHub
parent f113302baf
commit 32e3cde8ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ def main(infile, outfile, num_workers=4):
profile = src.profile
profile.update(blockxsize=128, blockysize=128, tiled=True)
with rasterio.open(outfile, "w", **src.profile) as dst:
with rasterio.open(outfile, "w", **profile) as dst:
windows = [window for ij, window in dst.block_windows()]
# We cannot write to the same file from multiple threads