1

I've a raster that have the pixels of this dimensions:

  • x 0.2282548198093489467 m
  • y 0.3594572165075641257 m

I need to clip this raster with a vector because I need a raster with the same extensions of vector.

I use QGIS 3.4 and the process Clip Raster by Mask Layer to do this. At the end of the process I have a raster with this pixels dimensions: 0.345 m.

Why happen this? I expect an output raster with the same pixels dimension of the input raster.

  • 2
    Did you enable the option Keep resolution of input raster? – Joseph Nov 13 at 11:14
  • I try to do this, image size is 30GB, it take many time to have an output. Anyway, I think is not logic this because if I need to resize my pixels I can do it using a specific option, otherwise, I select the mask and nothing else. – Massimiliano Moraca Nov 13 at 11:44
  • @Joseph you are right. If you answer my question I can vote you – Massimiliano Moraca Nov 13 at 12:21
1

From the GUI of the Clip raster by mask layer tool, you can enable the Keep resolution of input raster option to keep the size of the pixels used in the source file. You could also manually set the size using the option shown in the image (or use the -tr flag if using the command line):

Clip raster by mask layer interface

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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