Skip to main content

Hello,


Do you kow if Is it possible to configure a service of Landsat 8 images masking clouds/shadows by using the information of the Landsat8 quality assessment band?

If the answer is yes, any help in this regard would be very appreciated.

Thanks in advance.

Blanca

Check this FAQ:
https://www.sentinel-hub.com/faq/how-can-i-access-data-landsat-8-quality-assessment-band


Hi,

I’m also trying to make use of the BQA band to identify valid pixels in Landsat scenes.
I would like the values which are imported in the EOPatch to match the 16uint values of the BQA band, as you can download it for instance from the USGS EarthExplorer.
Is it possible at all?

Here is the request I’m executing:

add_bqa_l8 = L8L1CWCSInput(
layer=‘BQA-L8-L1C’,
feature=(FeatureType.MASK, ‘BQA’),
custom_url_params={CustomUrlParam.EVALSCRIPT: “return PBQA]”},
#image_format=MimeType.TIFF_d16,
resx=‘30m’, resy=‘30m’, maxcc=0.8
)

The result is an int32 numpy array whose values and their spatial distribution don’t match the original USGS values.
Setting the image_format to MimeType.TIFF_d16 seems also not to be the right solution. What I get is an array with the only values 0 and 65535.

I can’t figure out if the result I get is due to an error in my request or the problem concerns the way the BQA band values are clamped and stretched when they are output by the SentinelHub.
Do you have a hint?
Thank you in advance.


Getting original uint16 values should be possible with V3 script such as this (as EVALSCRIPT parameter):


//VERSION=3
function setup() {
return {
input: ["BQA"],
output: {
bands: 1,
sampleType: "UINT16"
}
};
}

function evaluatePixel(sample) {
return [sample.BQA];
}

Reply