Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default resampling to bilinear instead of nearest in reproject #275

Merged
merged 4 commits into from
Aug 12, 2022

Conversation

adehecq
Copy link
Member

@adehecq adehecq commented Aug 12, 2022

I think 'nearest' should not be the default resampling algorithm in reproject. For non integer warping, it will create artificial shifts between the two rasters.
Bilinear is the safest option as it is relatively fast, preserves range and will have an effect even for subpixel shifts.
Any thought against that?

@rhugonnet
Copy link
Member

Fully agree. Maybe it should only be "nearest" when the dtype is boolean?

@adehecq
Copy link
Member Author

adehecq commented Aug 12, 2022

Fully agree. Maybe it should only be "nearest" when the dtype is boolean?

Yes I agree, but boolean types do not exist with GTiff, so there's no need for that specific case. Anyway, bilinear would yield the same result, it would just be longer...

@adehecq adehecq merged commit 4ff47e0 into GlacioHack:main Aug 12, 2022
@adehecq adehecq deleted the resampling_bil branch August 12, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants