Skip to content

Commit

Permalink
convert from bool to uint8 before writing output (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillins authored Mar 11, 2024
1 parent c880096 commit 866ee42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fmask/fmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ def cloudFinalPass(info, inputs, outputs, otherargs):
# they set a pixel to cloud if 5 or more of its 3x3 neighbours is cloud.
# This little incantation will do exactly the same.
bufferedCloudmask = (uniform_filter(cloudmask * 2.0, size=3) >= 1.0)
# convert to int so we can write it with GDAL
bufferedCloudmask = bufferedCloudmask.astype(numpy.uint8)

bufferedCloudmask[nullmask] = 0

Expand Down

0 comments on commit 866ee42

Please sign in to comment.