0

I have been trying to batch rasterize a series of .shp files using QGIS for Mac OS X, and keep coming up against a strange problem.

I am using the QGIS 2.6.1 user interface, rather than calling library functions from elsewhere.

Processing->Toolbox lets me right-click on the [GDAL] Conversion->Rasterize (vector to raster) tool, and "Execute as batch process".

After selecting a few test input shape files, the appropriate attribute, defining a pretty low output resolution, and naming the output files, I am able to run the batch process. Everything seems to run perfectly, with no errors or bizarre messages in the log. However, the .tif files do not write. The defined output folder is just empty...

I have tried the same thing on a Windows machine, with the same files and parameters, and it writes the output files no problem.

Has anyone else got experience of this, or may know how to solve the problem?

Perhaps there is a bug in the Mac version. I would much rather get this solved than have to rely on a windows partition.

  • Look at the last line of file ../.qgis2/processing/processing.log in both cases if the application of the algorithm is the last action (or search for runalg('gdalogr:rasterize'). – gene Jan 8 '15 at 18:29
  • thank you for your comment gene. I'm afraid I can't find this file, or this particular filesystem reference, on my mac version of qgis. I will try and track down the logs are stored. Additionally, I have encountered the same problem (no tif files writing) after installing QGIS on my windows 7 desktop computer at home. I will try and check for the .log file on that machine when I get home, but I now think that perhaps I am missing some kind of driver or codec for writing geoTIFF files? – TheJacketlessWonder Jan 10 '15 at 15:08
  • IN MAC OS X, if you use the KyngChaos version , ./qgis2 folder is a hidden folder: /Users/you/.qgis2 – gene Jan 10 '15 at 15:14
  • Ah yes, thank you! I have found the log- when I try and rasterize using gdal, there is an error recorded in the log: "GDAL execution console output|Wrong value for -outsize parameters" But I'm defining an output size in pixels as 100x100. Could this be the cause of the problem? And how come it has worked on other machines? – TheJacketlessWonder Jan 12 '15 at 11:18
  • And sorry, no, the line runalg('gdalogr:rasterize') does not appear in the log anywhere. There are number of errors as well. I don't have the space to include all the output but, here is an edited summary: ERROR|Could not open OTB algorithm: /Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/otb/description/TrainImagesClassifier-svm.xml|*ParameterNumber|-elev.default|Default elevation|None|None|0 ERROR|Could not open OTB algorithm: TrainImagesClassifier-svm.xml ERROR|Could not load R script:Dotplot.rsx.| Problem with line "##Field=Field Layer" – TheJacketlessWonder Jan 13 '15 at 13:01

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.