[GRASS-user] improve v.rast.stats speed?

Maris Nartiss maris.gis at gmail.com
Thu Feb 19 07:33:08 EST 2009


Hello,
when I first implemented r.lake as a script, it took more than a day
to finish single run on powerfull P4 box. After I rewrote it in C, now
it takes seconds on my slow laptop. Calling r.mapcalc every time
involves opening files, reading raster and NULL values etc. If it can
be done only once, it will increase performance a lot.
I have not looked into that module - no idea how to write C version.
After reading development documentation, example modules and source,
if You still have some questions - ask in dev list.

Best wishes,
Maris.

2009/2/19, G. Allegri <giohappy at gmail.com>:
> Hello list.
> Yesterday I needed to use v.rast.stats on a 1793 areas covering a
> 4415x6632 raster (with resolution 50m/pixel). I've used it without
> extended statistics but the processing time was, with an euphemism,
> very very long. After 5 hours it wasn't finished yet. As I needed it
> for today morning I've decided to reproduce it with ArcGIS: 40
> seconds. I've tried to investigate what was going wrong, the
> bottleneck, but at the end I suppose that it's a problem of the script
> itself (the looping chain of r.mapcalc and r.univar, the creation and
> deletion of the MASK in each loop).
> Is there any way to improve the performance of v.rast.stats? Should we
> rewrite it in C and avoid the use of MASKs?
>
> I must say that this has been a shock for my collegues seeing this
> impressive performance differences... And I would like to contribute
> in healing them! :)
>
> Giovanni
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list