Processing modeler: GDAL "clip raster by mask layer" tool

I have a raster layer that I wish to be clipped by a polygon layer (buffer zone). I intend to repeat to process many times in a more elaborate sequence for my project thus I aim to build an automated process in QGIS's processing modeler. When running the process, I get the following error message:

"Error executing algorithm Clip raster by mask layer 'NoneType' object has no attribute 'GetGeoTransform'"

NOTE: this is only the clipping sequence. You can see the log here:qgis processing modeler gdal raster clip error

Any ideas on how to solve this? The GDAL tool "raster clipper" works fine when I use it without the processing modeler.

  • Does it run to completion if you uncheck the box "Keep resolution of output raster"? In the plugin source, GetGeoTransform is called only if that's checked: github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/… – Jeff G Jun 13 '16 at 20:57
  • I wonder if you're hitting this bug hub.qgis.org/issues/13174 because the INPUT logged to screen is itself a temporary output. Are you on Windows? What version of the Processing plugin? – Jeff G Jun 13 '16 at 20:57
  • @JeffG thanks for the help. I've unchecked "Keep resolution of output raster" and the process ran further, but I've hit an other error in the end: the output layer could not be generated. According to the log, It seems like it could not compute the bounding box of the cutline. As for my OS, I'm using Windows 10, QGIS 2.12.3 and the GdalTools plugin is 1.2.29. Perhaps I should update it? – Ninja Tuna Jun 14 '16 at 20:27
  • Can't hurt to try to upgrade but I don't see anything obvious that would make me suspect a relevant bug was fixed between your version and now. The other thing I'd try is see if this same error surfaces with a different/unrelated raster and shapefile -- just to confirm nothing's screwy with the specific data sources you're using. – Jeff G Jun 15 '16 at 13:31

Your Answer

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

Browse other questions tagged or ask your own question.