RE: Cell count in category value

----------

De: Justin Hickey <jhickey@impact1.hpcc.nectec.or.th>
A: grass@cecer.army.mil
Asunto: Re: Cell count in category value
Fecha: lunes 16 de febrero de 1998 12:25

Hi Vangelis

On Feb 16, 1:08am, Filippidis Vangelis wrote:
> Subject: Cell count in category value
>
> I used the r.slope.aspect command to get a slope map
> and i get with r.report the cell count for each category of
> slope.
> However, i want to use the cell count with r.mapcalc.
> Is there a way to assign the cell count for each category
> of slope, in the category value of the slope map (not by hand!!!)

I'm not sure if a grass command exists to do what you want, but one way

to do

this is to save the results of r.report as a file. Then write a script to

go

through the file and create a "rules" file mapping the slope values to

the

appropriate cell count for the r.reclass command. Then run r.reclass with

the

new "rules" file and you should have a raster map with the cell count

values

for each category. You may have to run r.resample after the r.reclass

command.

See the man pages of r.reclass for acceptable syntax for the "rules"

file.

Hope this helps.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

This E_mail isn't concerning with GRASS and LINUX anymore.

Don't send more messages.

Thanks!