[GRASS-user] change the cell value of a geotiff
hamish_b at yahoo.com
Wed Jan 20 21:31:19 EST 2010
>>> I have a geotiff now, and some cells have a
>>> not-expected value, so I want to Interpolation them, and I notice
>>> that there is a command named r.fillnull, however the cell
>>> to be changed is not null, so I want to :
> > try r.null.
> | Range of data: min =
> -1267650600228229401496703205376.000000 max = 4 |
> 2)then I use r.null to set the null value to null:
> r.null setnull=-1.26765060022823e+030
> 3) I use the r.info again to see if it is changed :
> r.info -r map=aaa at PERMANENT
> It seems that the valuse are not changed to
> I wonder why?
probably due to floating point precision issues (why Glynn recommended
to use a range instead of an exact value, see
So going back to the r.mapcalc method, except use less-than some minimum
value instead of trying to do an exact equality:
r.mapcalc "clean_map = if( dirty_map < -9999, null(), dirty_map)"
if (this is true), then (set it to this), otherwise (set it to this)
More information about the grass-user