Created
April 8, 2016 08:15
-
-
Save robintw/d2b6e8fd9ac3610ead823288e084f3e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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