test_reproject_resampling: Add another value for mode.#3293
test_reproject_resampling: Add another value for mode.#3293sgillies merged 2 commits intorasterio:mainfrom
Conversation
Change triggered by OSGeo/gdal@b68bf74
Warper: Fixes related to mode resampling
|
This change is a result of the weighting of partially-covered pixels? |
|
Maybe? I haven't looked closely at what triggered the change. |
|
I've been digging into this (always terrified that I've broken something!) But I have reproduced the new value of 438002 in "vanilla" GDAL and I think the changes make sense. Unlike with a categorical raster, in this reprojection there are many different source pixel values associated with a given destination pixel value. When these pixels were weighted equally, the first pixel encountered was assigned as the mode. Now that source pixels are not weighted equally, the outcome is different for most pixels. |
|
Someone somewhere someday will be hugely appreciative of that test as it stops them from doing something catastrophic, but hard to catch. And we will never know that your test saved millions of lives or some such. I am thinking of some of the weird bugs in CPUs, core libraries, compilers, etc. Like the time I had to tell a team to stop using the fast-math compiler flag... |
* test_reproject_resampling: Add another value for mode. Change triggered by OSGeo/gdal@b68bf74 * test_reproject_resampling_alpha: Change in mode
* test_reproject_resampling: Add another value for mode. Change triggered by OSGeo/gdal@b68bf74 * test_reproject_resampling_alpha: Change in mode
Change triggered by OSGeo/gdal@b68bf74