force 0 to exist in extractions, even if null
@@ -117,6 +117,8 @@ def extractions(inputfile, labels, output, chunksize, flag, n_cores: int = 1, ra
lbl_img = envi.open(lbl_file+'.hdr', lbl_file)
labels = lbl_img.read_band(0)
un_labels = np.unique(labels).tolist()
+ if 0 not in un_labels:
+ un_labels.insert(0,0)
nout = len(un_labels)
