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

G. Allegri giohappy at gmail.com
Thu Feb 19 10:29:09 EST 2009


The rasterizing method gives comparable performances to ArcGIS. I
confirm that it does the same.
The bottleneck is the r.univar limitation to CELL. I have to
investigate why, as it is based on r.stats which works with
DCELL/FCELL too

The final join would be an improvement respect to Zonal Statistics in
ArcGIS which simply produce a dbf with OIDs from polygon IDs but
doesn't merge it into the original vectorial.


2009/2/19 Markus Metz <markus.metz.giswork at googlemail.com>:
>
>
> Markus Neteler wrote:
>>
>> On Thu, Feb 19, 2009 at 2:20 PM, G. Allegri <giohappy at gmail.com> wrote:
>>
>>>
>>> Thanks for the ideas.
>>> I've just tried Starspan but it's performance is still too slow. I've
>>> let it run for 15 minutes...
>>>
>>
>> Can you please try GRASS 7?
>> grass70/scripts/v.rast.stats/v.rast.stats.py
>>
>
> grass70/scripts/v.rast.stats/v.rast.stats.py also uses r.mapcalc in every
> pass:
>
> for i in cats:
>   ...
>   grass.mapcalc("MASK = if(...)
>
> if v.rast.stats is faster in grass7, then probably because of improved
> raster libs. A speed increase from >5 hours to 40 seconds is unlikely since
> grass.mapcalc is still called 1793 times (assuming each area has a unique
> category) for a region with 4415x6632 cells...
>
>


More information about the grass-user mailing list