In fact I would always expect nodata. nodata is what it says: no data. How can 
one calculate or generate new values with one unknown term. Especially in the 
case of boolean.
Lets take an example from real life. You have the information of wet or not wet 
area. In the case of wet you have to reduce irrigation if not wet you must 
increase irrigation. In either cases you make a mistake, if you do the 
opposite. Without knowledge of the inputdata (and respecting the scale), 
someone getting the result could do a big mistake. Particularly if the action 
is highly cost intensive. Nodata need special treatment. One must be aware of 
the lack of data, and a model has rather to fail than false simulate the 
existing data. What if you process hundreds of raster sets and get always valid 
results. If some don't like nodata, he has to actively process the data in one 
way, either simulate valid data (and of course knows that he has to communicate 
that fact) or collect more precise data. Anything else is scientifically bad 
behaviour (to use a buzzword: fake data).

Cheers.

Stefan

> Havard Tveite <havard.tve...@nmbu.no> hat am 11. Februar 2019 um 10:20 
> geschrieben:
> 
> 
> nodata + 1 = nodata
> nodata * 1 = nodata
> nodata AND 1 = nodata
> nodata OR 1 = 1
> 
> nodata + 0 = nodata
> nodata * 0 = nodata
> nodata AND 0 = 0
> nodata OR 0 = nodata
> 
> Håvard
> 
> On 11. feb. 2019 09:47, st_kie...@web.de wrote:
> > I absolutely agree.
> > 
> > For the Discussion. nodata is a valuable information, and is getting lost 
> > when dealing as desired value. Although the OR part needs more Discussion. 
> > For consistency that has to be nodata as well.  What about nodata OR 0? In 
> > my opinion nodata always needs a discrete treatment to avoid generating 
> > fallcious information.
> > 
> > Cheers
> > 
> > Stefan
> > 
> >> Havard Tveite <havard.tve...@nmbu.no> hat am 11. Februar 2019 um 09:38 
> >> geschrieben:
> >>
> >>
> >> nodata + 1 = nodata
> >> nodata * 1 = nodata
> >> nodata AND 1 = nodata
> >> nodata OR 1 = 1
> >>
> >> Håvard
> >>
> >> On 11. feb. 2019 03:11, Nyall Dawson wrote:
> >>> Hey all,
> >>>
> >>> I'm seeking some feedback on whether our current handling of nodata
> >>> pixels in the raster calculator is correct, or (my suspicion) annoying
> >>> and limiting.
> >>>
> >>> Currently, we treat nodata pixels the same as a "NULL" value in SQL --
> >>> so ANY function or operation with nodata as an input results in a
> >>> nodata output.
> >>>
> >>> This means:
> >>>
> >>> - nodata + 1 = nodata
> >>> - nodata * 1 = nodata
> >>> - nodata AND 1 = nodata
> >>> - nodata OR 1 = nodata
> >>>
> >>> To me this is a mistake. I don't think we should treat nodata the same
> >>> as NULL, and I think for rasters then "nodata OR 1" should return 1.
> >>>
> >>> The end result of the current behaviour is that ANY nodata input
> >>> blocks processing of that pixel. So you can't do something like take
> >>> two raster files, and create an output showing where either input has
> >>> a 1 value (which I would expect raster1@1 OR raster2@1 to do).
> >>>
> >>> Otherwise, we need to have some concept of "coalesce" in the raster
> >>> calc. So then at least you could do:
> >>>
> >>>       coalesce(raster1@1, 0) OR coalesce(raster@1, 0) ....
> >>>
> >>>
> >>> Thoughts?
> >>>
> >>> Nyall
> >>> _______________________________________________
> >>> 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
> >>>
> >> _______________________________________________
> >> 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
> > _______________________________________________
> > 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
> > 
> _______________________________________________
> 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
_______________________________________________
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