[GRASS-dev] [grass-code R][409] diversity func. in r.statistics

Martin Wegmann wegmann at biozentrum.uni-wuerzburg.de
Fri May 25 09:18:41 EDT 2007


On Thursday 24 May 2007 22:49:49 Glynn Clements wrote:
> grass-coder at wald.intevation.org wrote:
> > code R item #409, was opened at 2007-05-24 16:41
> > Status: Open
> > Priority: 3
> > Submitted By: Martin Wegmann (wegmann)
> > Assigned to: Nobody (None)
> > Summary: diversity func. in r.statistics
> > Issue status: None
> > GRASS component: raster
> > Operating system: Linux
> > Operating system version: debian
> >
> >
> > Initial Comment:
> > hello,
> >
> > it would be very handy to have the c_divr.c Funktion (Diversity of
> > values) in r.statistics.
> >
> > I already tried it with my very limited C skills but failed because
> > r.statistics is not like r.series pointing to lib/stats, which would
> > have maked it easier for me.
>
> Try the attached file (untested).

thanks - I implemented it and it works so far - but the ouput looks quite 
strange at the moment.

(spearfish)
r.mapcalc "cover = int(fields)"
r.statistics base=landuse cover=cover method=diversity output=test --o

shall I commit it to cvs, when it works or already now that you can test it?

Martin




More information about the grass-dev mailing list