Hi Pedro,
I did the same for 5 pixels in the test raster I shared with you yesterday. The different seems to be a little bit greater. See the attached sheet. I don't know if the version of saga, 2.3.1 the mine vs 2.3.2 the yours could generate this error, or if the problem is in qgis process model. E. ________________________________ Da: Pedro Venâncio <pedrongvenan...@gmail.com> Inviato: mercoledì 31 maggio 2017 22:16 A: Eugenio Trumpy Cc: qgis-user; qgis-developer Oggetto: Re: [Qgis-user] Wrong result with Saga Raster calculator Hi Eugenio, I've created a sample processing model (attached), that works ok, except a small error in the result (decimals). For instance: Raster ID Pixel value Z_top_res a 1202,03510276 t_top_res b 53,6123428345 topo c1 -182,584899902 SAGA Result 1 c 15,1783676147 SAGA Result 2 d 31,9437332153 Diff Expected Result 1 15,1783679504 0,000000335741 Expected Result 2 31,9740872222 0,0303540069 Formula 1 ifelse(c1>0,-(0.0065*c1-16),(0.0045*c1+16)) 2 ifelse(a<500,0,((b-c)/a)*1000) Using SAGA GUI there is no error. Could this be because of some roundings in the input / output? (I'm sending for the developer's list also). Thanks! Best regards, Pedro Venâncio 2017-05-31 10:56 GMT+01:00 Eugenio Trumpy <frippe12...@hotmail.com<mailto:frippe12...@hotmail.com>>: Hi Pedro, thank you very much to have tested the computation with my test data! You are right, I checked again the computation and actually it works. However, I was using Saga raster calculation in a processing modeler, and one of the layer I share with you is the resulting from a previous computation. In other word the raster layer c=temp_recal.tif comes from a previous computation (raster calculator): ifelse(a>0,-(0.0065*a-16),(0.0045*a+16)) where a is the layer attached, and hence c of the previous formula is the resulting of this first computation. E. ________________________________ Da: Pedro Venâncio <pedrongvenan...@gmail.com<mailto:pedrongvenan...@gmail.com>> Inviato: mercoledì 31 maggio 2017 11:37 A: frippe12573; qgis-user Oggetto: Re: [Qgis-user] Wrong result with Saga Raster calculator Hi Eugenio, The result with SAGA Raster Calculator seems ok here, on QGIS 2.18.9, SAGA 2.3.2, both from OSGeo4W64 (result attached). Z_top_res.tif have values from 724.403 to 1423.553, and so, the first condition is never true. Then, it always make ((b-c)/a)*1000, and the result seems ok to me. Pedro 2017-05-31 10:19 GMT+01:00 frippe12573 <frippe12...@hotmail.com<mailto:frippe12...@hotmail.com>>: Hi Paolo, the raster have the same size and origin. The pixels are precisely overlapped. I tried also r.mapcalc, but I got a worst result. Here the output of the log: https://pastebin.com/jNyyzHgf E. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Wrong-result-with-Saga-Raster-calculator-tp5322429p5322442.html Sent from the QGIS - User mailing list archive at Nabble.com. _______________________________________________ Qgis-user mailing list qgis-u...@lists.osgeo.org<mailto:qgis-u...@lists.osgeo.org> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer