TransWikia.com

Using the pixel quality layers of the Landsat SR products to create cloud and water masks in R

Geographic Information Systems Asked by Nita Shashidharan on September 3, 2021

I tried to use the RStoolbox package function classifyQA to generate information on quality of the layers of interest, namely – cloud, cloud shadows, and water. I am unable to understand how to mask clouds and water using this function.

#One of the attempts

cloudMask(img,crop_pixelqaband_1992) # trying to use the pixel QA band provided by SR products to create a mask. I understand right now the code is not specific in pulling out only the cloud and cloud shadow data from the QA band layer.

Return error

Error in .local(x, ...) : invalid layer names # the function only seems to take blue and thermal bands

May be I am doing this wrong? Is there another way to do cloud and water masking using Landsat surface reflectance products that do not provide thermal bands in R? Can someone please suggest how one can go about carrying out masking for clouds and water in R using the pixel quality band of SR products?

One Answer

I was unable to figure this out. Since the scenes I am working with do not have any visible cloud cover in them, I don't need to fret about this. But I would like to know how it could be done. However, one easy way to deal with cloud cover could be adding training sites on visible cloud cover and then masking them out based on the cloud cover class developed during supervised classification.

Answered by Nita Shashidharan on September 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP