[GRASSLIST:4466] Re: Rastervalueoutput for cover vectorfiles

Gordon Keith gordon.keith at csiro.au
Wed Sep 11 22:02:13 EDT 2002


On Thu, 12 Sep 2002 11:38, Martin Wegmann wrote:
> hello,
>
> I have a bit more than 100 polygons for which I want to extract the
> mean values of a rastermap behind it. The output should be: vector 1
> = mean rastervalue xy, vector 2 =  ... and so on.
> I started to do it with r.what and a calculator but I hope there is a
> easier way to do it.

What I do is:

    v.to.rast in=train_r out=train

    r.statistics base=train cover=raster method=average out=raster_avg
    r.stats -l raster_avg >> avg.txt



-- 

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

The command that Christ has given us is this:
whoever loves God must love his brother also.
  -- 1 John 4:21



More information about the grass-user mailing list