[GRASSLIST:8999] r.statistics vs v.rast.stats vs ??

David Finlayson david.p.finlayson at gmail.com
Thu Nov 10 19:46:08 EST 2005


I am trying to calculate statistics such as mean elevation, slope,
maximum drainage area etc for a very large number of small plots. The
plots are in a vector file and I have been trying to use v.rast.stats
on the various rasters that represent elevation, slope, drainage area,
etc.

The problem is that the rasters are very high resolution, the plots
are quite small, and I have more than 600 to process. If you look at
the code for v.rast.stats, it converts each plot into a raster to use
as a mask and then runs r.univar on the entire map (now mostly null
values), once for each statistic. In my situation it can take several
minutes for each plot. In other words hours for each of the above
rasters that I am interested in and more than 2 days for the whole
set.

Is there a more efficient way of calculating these statistics? I have
tried to use r.statistics and can't make sense of the inputs and
outputs. Alternatively, if I could control the region size in the
critical part of the v.rast.stats script I might be able to improve
the speed of the script.

Any ideas?

--
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA  98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays




More information about the grass-user mailing list