[GIS] Clipping a raster without pixel displacement / shifting

clipqgisraster

I'm not sure I'm writing in the right place. I looked for for answer for this question and didn't find any topic related to.

PROBLEM: when I clipped a raster either by extent or mask layer it results in a raster where the first pixel starts align to the first corner I gave. As a consequence my whole raster is shifted keeping the pixel values (probably nearst neighborhood). I also tried saving as and defining map canvas extent.

Best Answer

I figured out that they GDAL algorithm in the toolbox worked. Although it use the same command (if you pay attention on the console call at the bottom) the arguments order results in a different output. By selecting both option:

  • Crop the extent of the target dataset to the extent of the cutline
  • Keep resolution of output raster