<div dir="ltr"><div>Moritz, have you seen the reply on the bug rep? <a href="https://trac.osgeo.org/grass/ticket/3197" target="_blank">https://trac.osgeo.org/grass/<wbr>ticket/3197</a><br><br></div>Do you think the alternative r.univar2 could be used in your function?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 November 2016 at 10:01, Moritz Lennert <span dir="ltr"><<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 03/11/16 10:58, Moritz Lennert wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/11/16 17:15, Markus Metz wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Nov 2, 2016 at 3:47 PM, Moritz Lennert<br>
<<a href="mailto:mlennert@club.worldonline.be" target="_blank">mlennert@club.worldonline.be</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/11/16 11:05, James Duffy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I can't register with osgeo to submit a bug as no-one has replied with a<br>
'mantra' for me to do so... what a convoluted bug reporting system!<br>
<br>
And in your opinion Moritz, does it look like my workflow will not be<br>
possible unless I find a 64bit machine with a decent amount of RAM?<br>
</blockquote>
<br>
<br>
I'm not sure about the necessity of 64bit, but more RAM probably.<br>
<br>
IIUC, all the stats of all the zones are put into memory during the run of<br>
the module. Maybe a file-based store of the information might be possible<br>
which would avoid this memory usage, but I'm not sure.<br>
<br>
@MarkusM: could you have a look at this ? See<br>
<a href="https://lists.osgeo.org/pipermail/grass-user/2016-October/075493.html" rel="noreferrer" target="_blank">https://lists.osgeo.org/piperm<wbr>ail/grass-user/2016-October/<wbr>075493.html</a> for<br>
the beginning of the thread. In short: James seems to be hitting memory<br>
limits of r.univar and I'm wondering out loud whether there is something<br>
that could be done about this...<br>
</blockquote>
<br>
As Anna wrote, the -e flag increases memory consumption of r.univar<br>
considerably. A file based approach for extended stats of r.univar is<br>
difficult because the number of values per segment is initially<br>
unknown to r.univar, thus the amount of disk space needed for extended<br>
stats for each segment is unknown.<br>
<br>
I would rather use r.univar for standard stats and r.stats.quantile<br>
for extended stats. The options for raster_statistics of<br>
i.segment.stats would then reduce to "min, max, range, mean,<br>
mean_of_abs, stddev, variance, coeff_var, sum, sum_abs", and a new<br>
option, e.g. raster_percentiles could be added, accepting a list of<br>
percentiles which can be directly fed by i.segment.stats to<br>
r.stats.quantile percentiles=<list of percentiles>.<br>
</blockquote>
<br>
Ok, I'll look into this. The only disadvantage is that r.stats.quantile<br>
creates a new raster map for each percentile, which then have to be<br>
treated to extract the statistics, instead of allowing to print the<br>
results directly to a file. But I guess the overhead of that is worth<br>
the fact that it reduces memory usage.<br>
</blockquote>
<br></div></div>
Forget that, I just saw the -p option. Need new glasses, I guess ;-)<span class="HOEnZb"><font color="#888888"><br>
<br>
Moritz<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(39,78,19)"><span style="font-family:tahoma,sans-serif"><font size="4"><b>James Duffy</b></font><br>PhD Researcher<br>Environment and Sustainability Institute<br>Penryn Campus<br>University of Exeter<br>Penryn<br>Cornwall<br>TR10 9FE</span></span><br></div></div></div></div></div></div>
</div>