1

I'm writing a script to treat some rasters. One of steps is a reclassification. So I use r.reclass from Grass. But unfortunately, it return a weird error message: IOError: [Errno 13] Permission denied: u'tmp15066743306927' like it's impossible for it to access this temporary file/folder.

Here is my script :

##rasterndvi=raster
##sortieR=output raster

from qgis.utils import iface
import sys, processing, os, glob, numpy
from qgis.core import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *

layer = QgsRasterLayer(rasterndvi)

extent = "%f,%f,%f,%f" %(layer.extent().xMinimum(), layer.extent().xMaximum(), layer.extent().yMinimum(), layer.extent().yMaximum())

print extent

outputs_GRASS7RNEIGHBORS_1=processing.runalg('grass7:r.neighbors', rasterndvi,0,25.0,True,False,'',extent,0.0,None)

layer = QgsRasterLayer(outputs_GRASS7RNEIGHBORS_1['output'])

extent = "%f,%f,%f,%f" %(layer.extent().xMinimum(), layer.extent().xMaximum(), layer.extent().yMinimum(), layer.extent().yMaximum())

print extent

outputs_GRASS7RRECLASS_1=processing.runalg('grass7:r.reclass', layer,'','0 thru 85 = 1\n85 thru 170 = 2\n170 thru 255 = 3',extent,0.0,sortieR)

Somebody can help me ?

  • Nobody can help me ? :/ – Tim C. Oct 2 '17 at 8:42

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.