[GRASS-user] Joining vectors by location

daniel mcinerney daniel.o.mcinerney at gmail.com
Mon Nov 21 10:23:29 EST 2011


Hi Daniel,

According to the documentation of [1] and previous discussions [2],
v.rast.stats2 should be a lot faster.

You should be able to change the BASECOLS variable in the script
to only output the sums, which might speed things up for you.

Hope that helps.

Regards,
Daniel.

[1] http://grass.osgeo.org/wiki/GRASS_AddOns#v.rast.stats2
[2]
http://osgeo-org.1803224.n2.nabble.com/faster-than-v-rast-stats-td6500105.html


On Mon, Nov 21, 2011 at 4:10 PM, Daniel Lee <lee at isi-solutions.org> wrote:

> Hi Daniel,
>
> Very cool name :)
>
> You should use v.rast.stats [1] as it "Calculates univariate statistics
>> from a raster map based on
>> vector polygons and uploads statistics to new attribute columns. " Should
>> be a more straight
>> forward approach.
>
>
> Thanks for the tip, but  v.rast.stats gives me all univariate statistics
> and takes a really long time (hours vs. seconds). I've got so many pixels
> that I get segmentation failures and in the end I only want the sums for
> each polygon. It also makes it a pain to delete the unneeded columns from
> the vector table afterwards. Or is there a way to only have v.rast.stats
> give me the sums?
>
> Thanks,
> Daniel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20111121/4c0a1f63/attachment-0001.html


More information about the grass-user mailing list