[Qgis-developer] Processing r.mapcalc: unclear syntax

Victor Olaya volayaf at gmail.com
Sat Oct 22 10:11:29 PDT 2016


looks like the formula (dtm*2) is correctly passed to GRASS, but it
complains that is wrong. Are there changes in GRASS itself??

I am no GRASS expert, but i see nothing wrong in the way Processing is
creating the command line calls to GRASS.

2016-10-22 19:06 GMT+02:00 Paolo Cavallini <cavallini at faunalia.it>:
> Hi all,
> the interface and apparently syntax of Processing module for r.mapcalc
> has been changed. I cannot figura out how to make it run. I've tried
> various combinations, with no joy, see below.
> Thanks for any hint.
> All the best.
> ===
>  r.mapcalc - Raster map calculator....
> g.proj -c proj4="+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000
> +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
> +units=m +no_defs"
> r.in.gdal
> input=/home/paolo/Scrivania/analisi/QGIS_data/processing/more_backends/dtm.tif
> output=dtm --overwrite -o
> g.region -a n=4924820.77 s=4678320.77 e=1771747.23103 w=1554747.23103
> res=100.0
> r.mapcalc expression="dtm*2" --overwrite
> for r in $(g.list type=rast); do
> r.out.gdal input=${r}
> output=/tmp/processinge2680df22db7465e9478f93ec68fabac/cc5292235bab4755a251cba20fd0607f/${r}.tif
> createopt="TFW=YES,COMPRESS=LZW" --overwrite
> done
> Cleaning up temporary files...
> Sto avviando GRASS GIS...
> Sto eseguendo
> '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh'...
> Default region was updated to the new projection, but if you have
> multiple mapsets `g.region -d` should be run in each to update the
> region from the default
> Informazioni sulla proiezione aggiornate
> ATTENZIONE: La verifica della proiezione verrà ignorata
> Proceeding with import of 1 raster bands...
> Importing raster map ...
> 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
>
> syntax error, unexpected '*', expecting '('
> Parse error
> ERRORE: parse error
> 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
> Input raster map contains cells with NULL-value (no-data). The value
> -nan will be used to represent no-data values in the input map. You can
> specify a nodata value with the nodata option.
> Exporting raster data to GTiff format...
> ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF
> 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 completo. File created.
> Esecuzione di
> '/home/paolo/Scrivania/analisi/config/processing/grass7_batch_job.sh'
> terminata.
> Cleaning up temporary files...
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list