Setting recalc_transform=False when saving aligned raster on disk #659
victoriafoing
started this conversation in
General
Replies: 2 comments 1 reply
-
|
Can you provide a minimal re-producible example? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
If I align a raster to a reference raster (or even align it to itself) using the following: And then I save the raster with recalc_transform=False, its resolution matches that of the reference raster. But if I save the raster with recalc_transform=True, its resolution does not match that of the reference raster. I want the saved aligned raster to have the same bounds, resolution, and coordinates as the reference raster. Do I always have to set recalc_transform=False? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://corteva.github.io/rioxarray/stable/examples/reproject_match.html
I want to align a raster to another reference raster on the disk. When I use reproject_match to align a raster in memory, it has the same transform of the reference raster (e.g. bounds, crs, resolution). However, when I save the aligned raster with rio.to_raster(), it has a slightly different transform than the reference raster. Do I need to set recalc_transform=False when saving the aligned raster to make sure it is aligned with the reference raster?
Beta Was this translation helpful? Give feedback.
All reactions