[GRASSLIST:2132] Re: r.reclass: how to reclass only part of the categories

Andrea Aime aaime at comune.modena.it
Fri Jul 20 06:39:45 EDT 2001

Well, if space is not an issue you can do the following:
newDEM = if(dem<9000,dem,null())

this will result in the original file for categories under
9000 and will nullify everything else... but beware it will
produce another raster file, with full disk occupation
associated, not a reclass file.
Hope this helps
Best regards
Andrea Aime

mlennert at club.worldonline.be wrote:
> Hello,
> I've downloaded some GLOBE DEM files, and I would like to use them in nviz.
> The problem is that some areas (such as the polders in Holland) have values
> around 65500, making it difficult to use the files in nviz due to the extreme
> differences in values. I would therefore like to reclass them in order to give
> them all a value of -1.
> Now r.reclass allows me to either use reclass rules, but then I would have to
> write a reclass rule for evey point between 0 and 9000 (the ones I want to
> keep the way they are) since if I don't do it, r.reclass will class them all
> as NULL. And if I use the r.reclass interface, I would have to do all the
> changes to -1 by hand.
> So my question: is there a reclass rule meaning something like 'leave 1 thru
> 9000 the way they are' ?
> Or: is there a way to tell nviz to not take into accont z values outside of a
> defined range ?
> Moritz

More information about the grass-user mailing list