0

Trying to compare with gdal info on both images, nothing seems been different but when trying preview images on QGIS with same band settings value, the image seems to be altered.

Command use for that : gdal_translate input.tif output.tif -of COG -co BLOCKSIZE=512 -co RESAMPLING=BILINEAR -co COMPRESS=DEFLATE -co NUM-THREADS=25 -co BIGTIFF=YES

Tested on GDAL 3.2.2 Linux OS package and also with Docker images Alpine with GDAL 3.3.2 Any idea why my image is not just optimized but altered ?

Orginal Data

COG translated data

QGIS band settings

6
  • You ask to use RESAMPLING=BILINEAR. What if you NEAREST instead?
    – user30184
    Commented Sep 21, 2021 at 9:33
  • Usually NEAREST is good but this DEM seems displaying some square effect at very high resolution. BILINEAR fix that by homogenous render.
    – Bad Wolf
    Commented Sep 21, 2021 at 10:19
  • But you told that you do not want to alter data. Nearest should not alter anything if you do not re-project, as with your command.
    – user30184
    Commented Sep 21, 2021 at 10:30
  • Thanks for pointing that. I gonna retry without that but when I tried to preview into QGIS by changing nearest to bilinear render, nothing was altered.
    – Bad Wolf
    Commented Sep 21, 2021 at 10:34
  • 1
    Can you check that this happens as well as full resolution and is not an artefact of the overview generation process? E.g. subtract one raster from the other.
    – Jose
    Commented Sep 21, 2021 at 11:35

1 Answer 1

0

So thanks to @user30187 and @Jose !

I've done a test without BILINEAR and not exactly same visual result but not much more looking as the non COG Tif file. So it wasn't that.

When zooming, I've got exactly the same data as the original tif file. It's kind of "an on the fly simplification" for vector data.

Tips with QGIS : when loading the bilinear COG file QGIS render stay with nearest that cause some artefact in the graphic render. So by switching to bilinear render QGIS, everything is ok.

Many thanks for your precious help !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.