[GRASS-dev] [GRASS GIS] #3891: t.rast.algebra: if clause with two conditions does not work properly

GRASS GIS trac at osgeo.org
Thu Aug 15 06:18:59 PDT 2019


#3891: t.rast.algebra: if clause with two conditions does not work properly
--------------------------+---------------------------------------
  Reporter:  veroandreo   |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.8.0
 Component:  Temporal     |    Version:  unspecified
Resolution:               |   Keywords:  t.rast.algebra, r.mapcalc
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------------

Comment (by veroandreo):

 Ok, this is odd... If I replace the former command, with the following:

 {{{
 t.rast.algebra -n   expression="tmean_higher20_lower30 =
 if(lst_daily_celsius >= 20.0 && lst_daily_celsius <= 30.0, 1, null())"
 basename=tmean_higher20_lower30 suffix=gran nprocs=7 --o
 }}}

 i.e., putting 1 instead of leaving the value that the map has, all works
 fine... why does it fail to keep the value that was there originally if it
 meets the condition???

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3891#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list