Skip to content

Instantly share code, notes, and snippets.

@robintw
Created April 8, 2016 08:15
Show Gist options
  • Save robintw/d2b6e8fd9ac3610ead823288e084f3e0 to your computer and use it in GitHub Desktop.
Save robintw/d2b6e8fd9ac3610ead823288e084f3e0 to your computer and use it in GitHub Desktop.
byte = bin(maskArray[y][x])[2:].rjust(16, '0')
if byte == "1111111111111111":
outFile.write("-9999 ")
elif byte[14:] == "00":
outFile.write("1 ")
elif byte[14:] == "01":
outFile.write("2 ")
elif byte[14:] == "10":
outFile.write("3 ")
elif byte[14:] == "11":
outFile.write("4 ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment