Feature request #21251

Set output file resolution option and CRS options to Processing Clip Raster to Mask Layer - ClipRasterByMask.py

Added by Pedro Venâncio almost 4 years ago. Updated over 3 years ago.

Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Easy fix?:No Copied to github as #:29069


This is a feature request to add the output file resolution option to Clip Raster to Mask Layer. This was possible in QGIS 2.18 Raster -> Extraction -> Clipper, but not in the Processing implementation of gdalwarp.

I also propose the introduction of -s_srs and -t_srs options, to overcome this issue, that will only be fixed in GDAL 2.4.1:



I'm making a proposal patch, but please make a review, because it is fully functional, but the code can be not too polite.

The only problem I see is, as they are QgsProcessingParameterBoolean (and not radio buttons), a user can check both KEEP_RESOLUTION and SET_RESOLUTION at the same time. Is there any form to put them mutually exclusive in Processing? If not, I think a user needs to know what is doing when activate an option that is, by default, unselected.

Thank you very much!

ClipRasterByMask.py Magnifier (10.5 KB) Pedro Venâncio, 2019-02-13 11:57 AM

ClipRasterByMask.py Magnifier - Added -multi option (11.1 KB) Pedro Venâncio, 2019-02-13 03:50 PM


#1 Updated by Giovanni Manghi almost 4 years ago

works fine here (tested on Windows only), are you comfortable submitting a pull request on Github?

#2 Updated by Pedro Venâncio almost 4 years ago

This version of the patch adds the -multi option, already added to master by Giovanni.

This way should work in master and 3.4.4 without problems.

#3 Updated by Pedro Venâncio almost 4 years ago

Giovanni Manghi wrote:

works fine here (tested on Windows only), are you comfortable submitting a pull request on Github?

I've not the environment prepared to that at this moment, so if you can do it ASAP, please do Giovanni.


#4 Updated by Giovanni Manghi over 3 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

The patch was merged into 3.6 and master, while for 3.4 was closed is not really a bug fix.

Anyway here https://github.com/qgis/QGIS/pull/9445 a few comments were made, and possibly this could lead to tweak the already committed patches to 3.6 and master.

Also available in: Atom PDF