[GRASSLIST:810] Re: Eliminating negative values on raster image

Tim De Chant dechant at nature.berkeley.edu
Fri Apr 21 17:07:13 EDT 2006


Thanks, that worked like a charm.

On a somewhat unrelated note, are there any FOSS object-based  
classification systems out there?

Tim
__________________________________________
Tim De Chant
     University of California, Berkeley
     Environmental Science, Policy, and Management
     137 Mulford Hall #3114
     Berkeley, CA 94720-3114
     (510) 643-3910


On Apr 21, 2006, at 12:39 PM, Matthew Perry wrote:

> On 4/21/06, Tim De Chant <dechant at nature.berkeley.edu> wrote:
>> I have a raster map with negative values in it that I'd like to
>> eliminate.  I know the values should not be negative, and I'd like to
>> change any negative value to zero.  I have looked through the map
>> calculator (r.mapcalc) to see if I could create an expression that
>> would create such a map but haven't had any luck.  Could anyone help
>> me out with writing one?  Thanks.
>
>
> Here's the mapcalc that worked for me for this exact task:
>
> r.mapcalc "new = if(old < 0, 0, old)"
>
>
>
> --
> Matt Perry
> perrygeo at gmail.com
> http://www.perrygeo.net




More information about the grass-user mailing list