Created
November 24, 2013 01:40
-
-
Save hallahan/7622315 to your computer and use it in GitHub Desktop.
Trying to cut holes in B4 with the BQA band
This file contains 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
import os | |
import sys | |
import arcpy | |
import numpy | |
import math | |
from arcpy.sa import * | |
arcpy.CheckOutExtension('Spatial') | |
arcpy.env.overwriteOutput = True | |
cwd = os.getcwd() | |
inputPath = cwd + "\\input\\" | |
outputPath = cwd + "\\output\\" | |
bqa = inputPath + "bqa.tif" | |
b4 = inputPath + "b4.tif" | |
# holyImg = Raster(b4) * ( (Raster(bqa) != 61440) and (Raster(bqa) != 59424) and (Raster(bqa) != 57344) and (Raster(bqa) != 56320( and (Raster(bqa) != 53248) and (Raster(bqa) != 52256) ) | |
holyImg = Raster(b4) * (Raster(bqa) != 61440) | |
holyImg.save(outputPath + "holy.tif") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment