Closed axeldolce closed 2 weeks ago
Thanks @axeldolce!
Indeed, it looks that it was as simple as passing the resampling method to the function. I added new tests in test_multiraster
inspired by your example above to ensure this is now working fully with that change :slightly_smiling_face: in #601.
After review from other maintainers, I'll publish a new release with this bug fix.
Great, thanks!
Describe the bug The stack_rasters function performs an interpolation of integer types even when the Resampling.nearest method is specified.
To Reproduce To reproduce the behaviour one needs two integer Rasters with different bounds. Here is an example:
This will print out
where it is clear that some integer values have been interpolated as the values 3 and 4.
Expected behavior The excpected behaviour should be to apply the Resampling.nearest interpolation as requested. In fact, by looking at the code in the stack_rasters function, it seems that the resampling_method is ignored when performing the reprojection:
System:
Additional context No additional context to specify. I would just like to thank the maintainers of this repo. It is really useful when working on geospatial data and I hope it will get even more recognition.