cogeotiff / rio-tiler

User friendly Rasterio plugin to read raster datasets.
https://cogeotiff.github.io/rio-tiler/
BSD 3-Clause "New" or "Revised" License
517 stars 108 forks source link

Landsat 8 pansharpening returns bad data #94

Closed vincentsarago closed 5 years ago

vincentsarago commented 5 years ago

There is something strange going on with the pan option in rio-tiler.landsat8.tile https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/landsat8.py#L397-L417 Capture d’écran, le 2019-03-26 à 17 11 56 with pan-sharpening Capture d’écran, le 2019-03-26 à 17 11 59 without pan-sharpening

https://gist.github.com/vincentsarago/0ba79fbcfd9de7218a793e1e2c7c5823

vincentsarago commented 5 years ago

rio_pansharpen tests are failing with Rasterio 1.0.18 and python 3.7 which might be the explanation

8 failed, 14 passed, 1 warnings, 4 error in 16.68 seconds
platform darwin -- Python 3.7.0, pytest-3.10.1, py-1.6.0, pluggy-0.7.1 -- /venv/py37/bin/python3.7
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('rio-pansharpen/tests/.hypothesis/examples')
rootdir:rio-pansharpen, inifile:
plugins: cov-2.6.0, hypothesis-4.14.0
collected 26 items

test_cli.py::test_exception FAILED
test_cli.py::test_exception2 PASSED
test_cli.py::test_prompts_success1 PASSED
test_cli.py::test_prompt_success2 FAILED
test_cli.py::test_out_alpha_bands[--out-alpha-4] FAILED
test_cli.py::test_out_alpha_bands[--no-out-alpha-3] FAILED
test_cli.py::test_creation_opts FAILED
test_pansharp_unittest.py::test_calc_windows_customwindows ERROR
test_pansharp_unittest.py::test_pansharpen_worker_uint16 ERROR
test_pansharp_unittest.py::test_pansharpen_worker_uint8 ERROR
test_pansharp_unittest.py::test_pansharpen_worker_half_window ERROR
test_pansharp_unittest.py::test_reproject PASSED
test_pansharp_unittest.py::test_upsample FAILED
test_pansharp_unittest.py::test_brovey PASSED
test_property_based.py::test_calculateRatio PASSED
test_property_based.py::test_Brovey PASSED
test_property_based.py::test_fix_window_size PASSED
test_property_based.py::test_check_crs PASSED
test_property_based.py::test_create_apply_mask PASSED
test_property_based.py::test_simple_mask PASSED
test_property_based.py::test_pad_window PASSED
test_property_based.py::test_rescale PASSED
test_property_based.py::test_make_windows_full_block Falsifying example: test_make_windows_full_block(w=290, h=1972, blocksize=2)
Unreliable test timings! On an initial run, this test took 254.02ms, which exceeded the deadline of 200.00ms, but on a subsequent run it took 194.76 ms, which did not. If you expect this sort of variability in your test timings, consider turning deadlines off for this test by setting deadline=None.
FAILED
test_property_based.py::test_make_windows_last_block Falsifying example: test_make_windows_last_block(w=306, h=2499, blocksize=2)
FAILED
test_property_based.py::test_make_affine PASSED
test_property_based.py::test_half_window PASSED
vincentsarago commented 5 years ago

fixed in https://github.com/cogeotiff/rio-tiler/commit/9618f13c38d35225d1e2de2cf58b986c7f5c3986

will be shipped with version 1.2.1