0

I'm using worldview imagery downloaded from gbdx and I want to apply cloud mask for it. It's preferable to use ready-made layer or some python module/tool to create it. The demand for the method precision: it's allowable to cut clouded areas with some reserve (lose a part of useful information).

What should I try to consider?

I thought about some threshold, but perhaps it would be a bad idea.

2

This report uses the Forest Discrimination Index (FDI), described by Bunting and Lucas (2006) to create a mask. Essentially, the FDI for worldview2 is NIR2 - (RE + Blue), or band8 - (band6 + band2). You have to play around with the threshold, but here is a function I used in arcGIS Pro. One of the problems is that it will cut out buildings, roads, etc. For my purposes, I don't care. Others may not want this.

def CloudMask_WV_FDI(infile,threshold,outfile):
    """ this function attempts to mask clouds using the 
    forest discrimination index (FDI), as outlined in Bunting and
    Lucas (2006). """
    band8 = infile + "\\Band_8"
    band6 = infile + "\\Band_6"
    band2 = infile + "\\Band_2"
    outraster = arcpy.Raster(band8) - (arcpy.Raster(band6) + arcpy.Raster(band2))
    outraster2 = arcpy.sa.FocalStatistics(arcpy.Raster(outraster), "Rectangle 10 10 CELL", "MEAN", "DATA", 90)
    outraster2.save(r"FDI")
    del outraster,outraster2

    outraster = arcpy.sa.SetNull("FDI", 1, "VALUE <= -0.2")
    outraster2 = arcpy.sa.ExtractByMask(infile, outraster)
    outraster2.save(outfile)

    del outraster, outraster2
    arcpy.Delete_management("FDI")
    return("mask clouds complete")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.