On 11/02/2019 10:42, Tim Sutton wrote:
Hi

On 11 Feb 2019, at 10:38, Havard Tveite <havard.tve...@nmbu.no> wrote:

nodata + 1 = nodata
nodata * 1 = nodata
nodata AND 1 = nodata
nodata OR 1 = 1


It might be worth noting that in the GRASS mapcalc module, there's a special operator for these situations. From the manpage:

  • NULL-values in any arithmetic or logical operation should result in NULL. (however, &&& and ||| are treated specially, as described below).
  • The &&& and ||| operators observe the following axioms even when x is NULL:
    	x &&& false == false
    	false &&& x == false
    	x ||| true == true
    	true ||| x == true
    

Hmm yes, the OR case should return one!

Regards

Tim


 




---

Tim Sutton





_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
+972-523-665918

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to