[GRASS5] s.cellstats in 5.7?

Has s.cellstats been ported to vectors under 5.7 yet?

I can't see it under the list of man pages and I'm still running 5.7.0 which
doesn't seem to have it.

Regards
Gordon

--

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

Heavier-than-air flying machines are impossible.
--Lord Kelvin, president, Royal Society, 1895.

Has s.cellstats been ported to vectors under 5.7 yet?

I can't see it under the list of man pages and I'm still running 5.7.0
which doesn't seem to have it.

Try v.univar (newer than 5.7.0).

Hamish

On Wed, 10 Nov 2004 17:37, Hamish wrote:

> Has s.cellstats been ported to vectors under 5.7 yet?

Try v.univar (newer than 5.7.0).

From the online man page looks like s.univar which just calculates the stats
for the whole vector.

s.cellstats calculates the stats for each cell in the current region and
creates a site file with one site per cell and one attribute per statistic. I
don't see an output option in v.univar.

Specifically I've got a points vector file (old style sites) and I'd like a
raster where the value in each cell is the number of points that the vector
had that fall within the cell.

In 5.3 I could do:
s.cellstats in=sites out=count stats=n
s.to.rast in=count out=nrast

Does v.univar support this?

Regards
Gordon

--

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

Heavier-than-air flying machines are impossible.
--Lord Kelvin, president, Royal Society, 1895.

v.neighbors can calc number of cells in given radius,
not exactly what you want, but it could be also useful.

Radim

Gordon Keith wrote:

On Wed, 10 Nov 2004 17:37, Hamish wrote:

Has s.cellstats been ported to vectors under 5.7 yet?

Try v.univar (newer than 5.7.0).

From the online man page looks like s.univar which just calculates the stats

for the whole vector.

s.cellstats calculates the stats for each cell in the current region and creates a site file with one site per cell and one attribute per statistic. I don't see an output option in v.univar.

Specifically I've got a points vector file (old style sites) and I'd like a raster where the value in each cell is the number of points that the vector had that fall within the cell.

In 5.3 I could do: s.cellstats in=sites out=count stats=n
s.to.rast in=count out=nrast

Does v.univar support this?

Regards
Gordon

> Specifically I've got a points vector file (old style sites) and I'd
> like a raster where the value in each cell is the number of points
> that the vector had that fall within the cell.
>
> In 5.3 I could do:
> s.cellstats in=sites out=count stats=n
> s.to.rast in=count out=nrast
>
> Does v.univar support this?

v.neighbors can calc number of cells in given radius,
not exactly what you want, but it could be also useful.

Resolution would have to be very small...

some ideas:

v.kernel will produce a raster density map.

I seem to rememeber when Paul updated s.surf.idw the new method binned
the points first.. maybe this could be adapted.. (long shot)

another idea to show areas of high and low point coverage:

r.cost then r.mapcalc*res to make distance to nearest point map; smooth
with r.neighbors-mean with a big search window. Not a density map per
se, but if you make a fine grid it may give the meaning you are looking
for.

or write a new module?

Hamish

On Thu, 11 Nov 2004 19:33, Hamish wrote:

or write a new module?

So how much work is it likely to be to port s.cellstats to v.cellstats?
(I'm also likely to want other stats such as median)

Regards
Gordon

--

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

The main thing is keep the main thing the main thing.

> or write a new module?

So how much work is it likely to be to port s.cellstats to
v.cellstats?

depends on how good a C programmer you are :wink:
(or the quality of the person you can bribe)

(I'm also likely to want other stats such as median)

r.univar (and r.series) would be a good place to start. I don't think
it would be very hard.. there are several ways to do it, the question is
which is the most efficient.

Hamish