Commit b276be50 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed _ImageClassifier._label_unclassified_pixels() overwriting nodata values.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <>
parent 19fcd979
Pipeline #3888 failed with stage
in 2 minutes
......@@ -114,7 +114,11 @@ class _ImageClassifier(object):
raise ValueError(threshold)
cmap[distances > threshold] = label_unclassified
mask_unclassified = distances > threshold
if cmap_nodataVal is not None:
mask_unclassified = mask_unclassified & (cmap[:] != cmap_nodataVal)
cmap[mask_unclassified] = label_unclassified
cmap.unclassified_val = label_unclassified
return cmap
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment