Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Juste one question, why don't you do dst.write(img) ? Commented Feb 22, 2023 at 9:46
  • well usually if I don't specifiy the shape and the specific band, it get mismatched / fail Commented Feb 22, 2023 at 10:04
  • You cannot have a mismatch between height/width/count if you specify them correctly : count=img.shape[0], height=img.shape[1], width=img.shape[2] Commented Feb 22, 2023 at 10:20
  • Ho, I just saw, but the driver should be "GTiff" -> rasterio.readthedocs.io/en/latest/… Commented Feb 22, 2023 at 10:34
  • thank you for this! that happened when I edited it from the original code, I have used GTiff originally :) Commented Feb 22, 2023 at 12:23