1

I am reclassifying 43 rasters in Grass r.reclass function and am getting the following error:

Processing algorithm 1/43…
Algorithm r.reclass starting…
Input parameters:
{'GRASS_RASTER_FORMAT_META': '',
'GRASS_RASTER_FORMAT_OPT': '',
'GRASS_REGION_CELLSIZE_PARAMETER': 0.0,
'GRASS_REGION_PARAMETER': None,
'input': 'NDWI_20160619',
'output': <QgsProcessingOutputLayerDefinition {'sink':C:/QGIS_Projects/Reclass_Results/reclass_NDWI_20160619.tif, 'createOptions': {}}>,
'rules': 'C:/Users/Steffan/Desktop/reclassrules.txt',
'txtrules': '-1 thru 0 = 0 LAND \n0 thru 1 = 1 WATER'}

g.region n=0.0 s=0.0 e=0.0 w=0.0 res=100.0
r.reclass input=rast_5c34701952bf13 rules="C:/Users/Steffan/AppData/Local/Temp/processing_5b7498a321e24a2e95e9076e4c4b05b3\5c3470487e14f5" output=outputac479b03fcc243a28f02487b7db35111 --overwrite
g.region raster=outputac479b03fcc243a28f02487b7db35111
r.out.gdal -t -m input="outputac479b03fcc243a28f02487b7db35111" output="C:\QGIS_Projects\Reclass_Results\reclass_NDWI_20160619.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Starting GRASS GIS...
Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 413, in processAlgorithm
Grass7Utils.executeGrass(self.commands, feedback, self.outputCommands)
File "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 386, in executeGrass
feedback.reportError(line.strip())
TypeError: reportError(self, error: str, fatalError: bool): not enough arguments

Batch execution completed in 0.23 seconds
  • The g.region call sets the computational region to 0 pixels... that will not help for r.reclass (and subsequent commands). How comes that it is of 0 size? – markusN Jan 9 at 21:05

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.