So I was using this function called i.segment.uspo and I got this error
ERROR: Insufficient number of non-NULL cells in current region Traceback (most recent call last): File "/usr/lib/grass72/scripts/i.segment.uspo", line 935, in main() File "/usr/lib/grass72/scripts/i.segment.uspo", line 838, in main for mapname, lv, autocor, threshold, minsize in iter(result_queue.get, 'STOP'): ValueError: need more than 1 value to unpack
now both of my raster and vector are in the same coordinate reference system which is 2100. My vector data are polygons and where created in QGIS so they could represent different land-covers and my raster was clipped, again, in QGIS so that NULL values would be removed. Is there a way to fix that error?
EDIT
the code:
CATS="$(v.db.select -c map=train_vec columns=cat)"
for i in $CATS
do
where="cat=$i"
regionname="subset_uspo_gera_$i"
v.extract --overwrite input=train_vec type=area where=$where output=$regionname
g.region --overwrite vector=$regionname save=region_uspo_$i
step_gera=$step_gera"region_uspo_gera_corine_$i,"
i.segment.uspo --overwrite group=OBIAgera output=/home/user/Desktop/res/obiatest_$i.csv segment_map=best_gera_$i region=region_uspo_$i threshold_start=0.601 threshold_stop=0.901 threshold_step=0.001 minsizes=8 memory=4000 processes=4
r.to.vect --overwrite input=best_vec_"$i"_region_uspo_vec_corine_"$i"_rank1 output=temp_best_$i type=area
v.out.ogr --overwrite input=temp_best_$i type=area output=/home/user/Desktop/resaults/res_$i.shp
done
The error most likely comes from i.segment.uspo but I don't know if it's because of my training areas (basically the regions) or because of something else
P.S the code was based on a python algorithm which I decided to do it in shell script for my thesis.
EDIT 2 Here is the source code of the command and it stops somewhere around here:
837 if rg:
838 for mapname, lv, autocor, threshold, minsize in iter(result_queue.get, 'STOP'):
839 regional_maplist.append(mapname)
840 variancelist.append(lv)
841 autocorlist.append(autocor)
842 threshlist.append(threshold)
843 minsizelist.append(minsize)