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

2016-10-23 Thread Paolo Cavallini
Il 23/10/2016 10:44, Victor Olaya ha scritto:
> mmm, but Paolo's call already contains dtm*2, not dtm2. That's why i
> said that it looked correct to me.

AFAICT the syntax is of the type
dtm2=dtm*2
which I tested, and works. New description should help users, but the
command is still very cumbersome to use, see
https://hub.qgis.org/issues/6894#note-19
All the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

2016-10-23 Thread Victor Olaya
mmm, but Paolo's call already contains dtm*2, not dtm2. That's why i
said that it looked correct to me.

2016-10-23 7:46 GMT+02:00 Paolo Cavallini :
> Il 23/10/2016 07:44, Paolo Cavallini ha scritto:
>
>> thanks for the clarification. Description improved in:
>> https://github.com/qgis/QGIS/commit/66b66ed45020e54146e43a35a94e9d024467f7df
>
> If OK, please backport it where appropriate.
> Thanks.
>
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

2016-10-22 Thread Paolo Cavallini
Il 23/10/2016 07:44, Paolo Cavallini ha scritto:

> thanks for the clarification. Description improved in:
> https://github.com/qgis/QGIS/commit/66b66ed45020e54146e43a35a94e9d024467f7df

If OK, please backport it where appropriate.
Thanks.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

2016-10-22 Thread Paolo Cavallini
Il 22/10/2016 19:54, Pedro Venâncio ha scritto:
> Hi Paolo and Victor,
> 
> The expression needs to be in the form:
> 
> output_name = input_name [operation] [constant or another input_name]
> 
> So, in your case:
> 
> dtm2 = dtm*2
> 
> But it still has problems, specially in Windows:
> https://hub.qgis.org/issues/6894
> 
> It would be great to have r.mapcal full operational in Processing.

Hi all,
thanks for the clarification. Description improved in:
https://github.com/qgis/QGIS/commit/66b66ed45020e54146e43a35a94e9d024467f7df
Please improve it further if unclear.
I agree thatwe do need a fully functional, easier to use `r.mapcalc`.
All the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

2016-10-22 Thread Pedro Venâncio
Hi Paolo and Victor,

The expression needs to be in the form:

output_name = input_name [operation] [constant or another input_name]

So, in your case:

dtm2 = dtm*2

But it still has problems, specially in Windows:
https://hub.qgis.org/issues/6894

It would be great to have r.mapcal full operational in Processing.

Best regards,
Pedro Venâncio



2016-10-22 18:11 GMT+01:00 Victor Olaya :

> 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 :
> > 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=150
> > +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=IT=qgis,arcgis
> > ___
> > Qgis-developer mailing list
> > Qgis-developer@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer