Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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:

near:
    nearest neighbour resampling (default, fastest algorithm, worst interpolation quality). 
bilinear:
    bilinear resampling. 
cubic:
    cubic resampling. 
cubicspline:
    cubic spline resampling. 
lanczos:
    Lanczos windowed sinc resampling. 
average:
    average resampling, computes the average of all non-NODATA contributing pixels. (GDAL >= 1.10.0) 
mode:
    mode resampling, selects the value which appears most often of all the sampled points. (GDAL >= 1.10.0) 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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