[GRASSLIST:2140] RE: r.reclass: how to reclass only part of the c
ategories
CHAN Kenneth
ken.chan at tenix.com
Sun Jul 22 21:49:12 EDT 2001
> Subject: [GRASSLIST:2131] r.reclass: how to reclass only part of the
> categories
>
> 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' ?
If you don't mind changing the "out of range" values to 0 instead to -1, you
can try something like:
r.rescale input=inputmap from=1,9000 output=outputmap to=1,9000
Ken.
More information about the grass-user
mailing list