0

Using grass tool 'r.series' (average of 2 raster files) with QGIS 2.18.28 works correctly. If I use this tool in QGIS 3.4.4 I get an error message:

Processing algorithm… Algorithm 'r.series' starting… Input parameters: { '-n' : False, 'GRASS_RASTER_FORMAT_META' : '', 'GRASS_RASTER_FORMAT_OPT' : '', 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'input' : ['C:/temp/Raster1.tif','C:/temp/Raster2.tif'], 'method' : [0], 'output' : 'C:/Users/xxxx/AppData/Local/Temp/processing_618d89e6582c4df6bf31a66282de5b94/680d6bb22b2f4433a9f1c16faa65163a/output.tif', 'quantile' : '', 'range' : [0,0], 'weights' : '' }

g.proj -c proj4="+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
r.external input="C:\temp\Raster1.tif" band=1 output="rast_5c53fef7e75ac4" --overwrite -o
r.external input="C:\temp\Raster2.tif" band=1 output="rast_5c53fef7e75ac5" --overwrite -o
g.region n=5740005.091 s=5734489.7695 e=646558.1389 w=640036.9643 res=4.99897995049501
r.series input=rast_5c53fef7e75ac4,rast_5c53fef7e75ac5 method="average" range="0,0" output=outputa1488afaf51e44ffb0265b0eda47ed94 --overwrite
g.region raster=outputa1488afaf51e44ffb0265b0eda47ed94
r.out.gdal -t -m input="outputa1488afaf51e44ffb0265b0eda47ed94" output="C:\Users\xxxx\AppData\Local\Temp\processing_618d89e6582c4df6bf31a66282de5b94\680d6bb22b2f4433a9f1c16faa65163a\output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows nicht möglich.
Executing <C:\Users\xxxx\AppData\Local\Temp\processing_618d89e6582c4df6bf31a66282de5b94\grassdata\grass_batch_job.cmd> ...
C:\OSGEO4~1\bin>chcp 1252 1>NUL
C:\OSGEO4~1\bin>g.proj -c proj4="+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
Die Standard Region wurde auf die neue Projektion aktualisiert. Wenn Sie aber mehrere Mapsets haben, sollten Sie `g.region -d` in jedem ausführen, um die Einstellungen von der Standardregion zu übernehmen.
Projektionsinformationen aktualisiert
C:\OSGEO4~1\bin>r.external input="C:\temp\Raster1.tif" band=1 output="rast_5c53fef7e75ac4" --overwrite -o
Übersteuere die Überprüfung der Projektion.
Reading band 1 of 1...
Link to raster map <rast_5c53fef7e75ac4> created.
C:\OSGEO4~1\bin>r.external input="C:\temp\Raster2.tif" band=1 output="rast_5c53fef7e75ac5" --overwrite -o
Übersteuere die Überprüfung der Projektion.
Reading band 1 of 1...
Link to raster map <rast_5c53fef7e75ac5> created.
C:\OSGEO4~1\bin>g.region n=5740005.091 s=5734489.7695 e=646558.1389 w=640036.9643 res=4.99897995049501
C:\OSGEO4~1\bin>r.series input=rast_5c53fef7e75ac4,rast_5c53fef7e75ac5 method="average" range="0,0" output=outputa1488afaf51e44ffb0265b0eda47ed94 --overwrite
0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100
C:\OSGEO4~1\bin>g.region raster=outputa1488afaf51e44ffb0265b0eda47ed94
C:\OSGEO4~1\bin>r.out.gdal -t -m input="outputa1488afaf51e44ffb0265b0eda47ed94" output="C:\Users\xxxx\AppData\Local\Temp\processing_618d89e6582c4df6bf31a66282de5b94\680d6bb22b2f4433a9f1c16faa65163a\output.tif" format="GTiff" createopt="TFW=YES,COMPRESS=LZW" --overwrite
ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.
Checking GDAL data type and nodata value...
2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100
Using GDAL data type <Float64>
Die Eingabe-Rasterkarte enthält Zellen mit dem NULL-Wert (no-data). Der Wert -1.#IND wird verwendet, um NoData-Werte in der Eingabekarte zu kennzeichnen. Sie können NoData-Wert mit dem Parameter nodata bestimmen.
Exporting raster data to GTiff format...
2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100
r.out.gdal komplett. File <C:\Users\xxxx\AppData\Local\Temp\processing_618d89e6582c4df6bf31a66282de5b94\680d6bb22b2f4433a9f1c16faa65163a\output.tif> created.
C:\OSGEO4~1\bin>exit
Execution of <C:\Users\xxxx\AppData\Local\Temp\processing_618d89e6582c4df6bf31a66282de5b94\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
Execution completed in 3.13 seconds
Results:
{'output': <QgsProcessingOutputLayerDefinition {'sink':C:/Users/xxxx/AppData/Local/Temp/processing_618d89e6582c4df6bf31a66282de5b94/680d6bb22b2f4433a9f1c16faa65163a/output.tif, 'createOptions': {'fileEncoding': 'System'}}>}

Loading resulting layers
Algorithm 'r.series' finished 

Can anyone reproduce this issue?

3
  • The color table can't be written in a GeoTIFF file if it has not Byte or UInt16 format for the pixel values. But you don't need a color table if you are not working with pixel values as colours. r.series command works fine, is r.gdal.out command in the r.series algorithm wich tell that error. Your output is well generated? Jan 31, 2019 at 16:20
  • There is no output...that is the issue. I don't care about the colour table.
    – Pimpel
    Jan 31, 2019 at 17:21
  • Can you edit your question adding the complete log output? (as preformatted text ) Jan 31, 2019 at 17:26

1 Answer 1

2

The command says that the output is there: C:\Users\xxxx\AppData\Local\Temp\processing_618d89e6582c4df6bf31a66282de5b94\680d6bb22b2f4433a9f1c16faa65163a\output.tif

and loaded to the canvas:
Loading resulting layers
Algorithm 'r.series' finished

Don't worry about the color table error, that's not the problem.

It's possible that the output will be a raster without data, because the range to average is from 0 to 0. It's also possible that 0 to 0 should mean no range. Consider it a bug in the algorithm and report it.

Meanwhile, if you want a raster output with values, set a range within which the input values should be taken into account for the calculation of the average.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.