<div dir="ltr"><div>Hello guys,</div><div><br></div><div>I try to create conditional statement. When I running the formula in GRASS, there is error. Can someone help me to convert in GRASS formula format. The formula is something like :</div><div><br></div><div>if ( rgb.1 > 1810.877778) and ( rgb.1 < 23442.122222 ) and (rgb.2 > 673.148594) and (rgb.2 < 22729.389558) then 0 else if rgb.1 = 0 then 255 else 100</div><div><br></div><div>I have try, but with error. My false formula :</div>r.mapcalc --overwrite expression=awan = if ( rgb.1 > 1810.877778  &  rgb.1 < 23442.122222  &  rgb.2 > 673.148594  &  rgb.2 < 22729.389558 , 0) else if ( rgb.1 = 0, 255, 100)<br>syntax error, unexpected NAME, expecting $end<br>Parse error<br><div>ERROR: parse error</div><div><br></div><div>Any suggestion?</div><div><br></div><div>Regards,</div><div>mega<br></div></div>