Closed dluks closed 11 months ago
When generating coordinates, it is important to remember that the coordinates represent the center of the grid cell. That means you have to adjust by resolution/2 from the outer bounds.
🤦♂️ Of course. I had a feeling it was user error. That solved the issue. Thanks!
I'm trying to create an ideal synthetic placeholder dataset to use as a target for reprojecting some real datasets using
reproject_match
. I'm not sure if this is a bug or simply user error/misunderstanding, but it's giving me a minor headache. As much as I try to eliminate float-precision errors with rounding and an even division of the desired resolution into the coordinates, I can't seem to escape them when inspecting them usingdataset.rio.resolution()
.Problem description
Despite doing everything in my power to create a clean grid uncontaminated with float-precision errors, the resulting resolution still comes out imperfect (I would have expected a simple (0.01, -0.01)):
Environment Information