I have performed a DEM extraction using the clipper tool in QGIS 1.9.0 Master, using a mask layer, the original resolution of the DEM is 20x20 but in the resultant DEM the new resolution is 19.98x19.98. Both in meters.

Is it normal? How can I prevent QGIS clipper tool to change the pixel size?

2 Answers 2


In newer QGIS versions (I tested it only in QGIS 2.6) you can set the resolution when you save a raster via "save as" (quite similiar with ArcMap)


For the raster extraction using a masklayer QGIS will call the command gdalwarp. This command will resample your file (it will not simply cut of some pixels at the side). Therefore it is normal that your file size will be different. You can change the resampling method with a command behind the gdal command for example "-r near" if you want to use the near resampling method.

Apparently you will not have this problem if you use the grass command r.mask. I do not know if this is true, but here is some more info on this: http://grasswiki.osgeo.org/wiki/Cropping_maps

You can find more information on the resampling with gdal in the gdal documentation: http://www.gdal.org/gdalwarp.html

-r resampling_method: Resampling method to use. Available methods are:

    nearest neighbour resampling (default, fastest algorithm, worst interpolation quality). 
    bilinear resampling. 
    cubic resampling. 
    cubic spline resampling. 
    Lanczos windowed sinc resampling. 
    average resampling, computes the average of all non-NODATA contributing pixels. (GDAL >= 1.10.0) 
    mode resampling, selects the value which appears most often of all the sampled points. (GDAL >= 1.10.0) 

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.