[GRASS-user] v.rast.stats over a large vector file

Markus Metz markus.metz.giswork at googlemail.com
Fri Nov 26 07:41:00 EST 2010


On Fri, Nov 26, 2010 at 12:32 PM,  <razmjooeis at faunalia.co.uk> wrote:
> Dear list
>
> I am trying to run v.rast.stats for a large vector file. It contains
> around 700000 buildings representing buildings.
>
> here is my g.region info
> g.region -p
> projection: 99 (Transverse Mercator)
> zone:       0
> datum:      osgb36
> ellipsoid:  airy
> north:      183010.45829976
> south:      153516.19024768
> west:       513122.49174945
> east:       555953.95182415
> nsres:      4.99987592
> ewres:      5.00017045
> rows:       5899
> cols:       8566
> cells:      50530834
>
> THe problem I am having is the process is extremely slow. It has done 150
> features out of 700000 areas after 2 hours.
> I need just the average raster value within each building (feature).
> My questions are:
> - Is there something I can do to speed up the process?
> - Is there a way just to get the average value rather than the whole set
> of statistical parameters (I am not even using -e option)
>
You could try v.rast.stats2 from grass-addons, it should complete in
less than 1 hour. When using v.rast.stats2 and grass 6.4, you also
need r,univar.zonal from grass-addons (not needed for grass 6.5).

Markus M


More information about the grass-user mailing list