Chris Carleton wrote:

> ###the problematic r.mapcalc operation is below###
> subprocess.call([
>       "r.mapcalc",
>       "B = if(!isnull(A) && temp_rast_focus_ <= B,A,B"])

1. Don't use the same map for both input and output.

2. If either temp_rast_focus_ or B are null, the result will be null. 

Except for specific cases, nulls propagate, i.e. if any operand is
null the result will be null. isnull() is an exception, but && isn't
(i.e. "0 && null()" is null, not 0). You might want to use the &&&
operator instead, which satisfies "0 &&& x == 0" and "x &&& 0 == 0"
even when x is null.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to