[GRASS-user] help to use r.mapcalc with decimal/binary (modis
	data)
    Glynn Clements 
    glynn at gclements.plus.com
       
    Sun May 27 19:14:05 EDT 2007
    
    
  
Hamish wrote:
> > Oops; I could have sworn that r.mapcalc understood hex. Sorry; you'll
> > need to use decimal values, e.g.
> > 
> > r.mapcalc MASK="if(sur_refl_qc_250 & 240 == 176 , 1, null())"
> 
> so r.mapcalc can do bitwise & |? (nothing about that in the help pages)
Damn, no, that neither.
Third attempt:
	r.mapcalc MASK="if((sur_refl_qc_250 / 16) % 16 == 11 , 1, null())"
I'll look at adding the missing functionality to r.mapcalc.
-- 
Glynn Clements <glynn at gclements.plus.com>
    
    
More information about the grass-user
mailing list