<div dir="ltr"><div>Hi Moritz, <br></div><div><br></div><div>Thanks for your answer :)</div><div><br></div><div>In smaller subsets (per cutlines tiles), it works just fine. <br></div><div>I will try later today or tomorrow to run it with grass76.</div><div><br></div><div>Best,</div><div>Vero<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 3 dic. 2019 a las 12:41, Moritz Lennert (<<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Vero,<br>
<br>
Le Mon, 2 Dec 2019 13:43:30 +0100,<br>
Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>> a écrit :<br>
<br>
> Hi,<br>
> <br>
> We are trying to use i.segment.stats for a map with 800000+ segments<br>
> and already in two different laptops, we get:<br>
> <br>
> bands=`g.list rast pat=IGUAZU_IMG_* sep=,`<br>
> RASTER_STATS=(min,max,range,mean,stddev,median,first_quart,third_quart,perc_90)<br>
> AREA_STATS=(area,perimeter,compact_circle,compact_square,fd)<br>
> <br>
> i.segment.stats -rc \<br>
>                  map=segments_full_region \<br>
>                  rasters=$bands \<br>
>                  raster_statistics=$RASTER_STATS \<br>
>                  area_measures=$AREA_STATS \<br>
>                  vectormap=segs_stats_map \<br>
>                  processes=4<br>
> Calculating geometry statistics...<br>
> Calculating statistics for raster maps...<br>
> Exception in thread Thread-3:<br>
> Traceback (most recent call last):<br>
>   File "/usr/lib/python3.6/threading.py", line 916, in<br>
> _bootstrap_inner self.run()<br>
>   File "/usr/lib/python3.6/threading.py", line 864, in run<br>
>     self._target(*self._args, **self._kwargs)<br>
>   File "/usr/lib/python3.6/multiprocessing/pool.py", line 463, in<br>
> _handle_results<br>
>     task = get()<br>
>   File "/usr/lib/python3.6/multiprocessing/connection.py", line 251,<br>
> in recv return _ForkingPickler.loads(buf.getbuffer())<br>
> TypeError: __init__() missing 3 required positional arguments:<br>
> 'module', 'code', and 'returncode'<br>
> <br>
> Does it have to do with memory? I used the module a month ago with<br>
> 500000+ segments and it worked just fine...<br>
<br>
I don't think memory is the issue, but I find the error message<br>
pretty cryptic, so wouldn't exclude altogether. Could it be some<br>
difference between Python 2 and 3 in the multiprocessing module ? Would<br>
it be possible for you try running it in Python 2 ?<br>
<br>
Maybe you could also try to run it on a smaller subset of the<br>
segmentation result ?<br>
<br>
Moritz<br>
<br>
<br>
-- <br>
Département Géosciences, Environnement et Société Université Libre de<br>
Bruxelles Bureau: S.DB.6.138<br>
CP 130/03<br>
Av. F.D. Roosevelt 50<br>
1050 Bruxelles<br>
Belgique<br>
<br>
tél. + 32 2 650.68.12 / 68.11 (secr.)<br>
fax  + 32 2 650.68.30 <br>
</blockquote></div>