Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with FMask when using Collection 2 Level 2 LANDAST Images for L8 and L9 #25

Open
a1t1d1 opened this issue Mar 18, 2022 · 1 comment

Comments

@a1t1d1
Copy link

a1t1d1 commented Mar 18, 2022

When we are trying to run current FMask tool on current LANDSAT 8 images we are getting the following error:


Error

Dimensions of arrays being concatenated are not consistent.
Error in => Fmask_4_6.m at line 57

OK

Also FMask puts the following messages into the console:

Fmask 4.6 start ...
Cloud/cloud shadow/snow dilated by 2/5/0 pixels.
Cloud probability threshold of 22.50%.
Load or calculate TOA reflectances.
Error using horzcat
Dimensions of arrays being concatenated are not consistent.

Error in lndhdrread (line 287)

Error in nd2toarbt (line 33)

Error in LoadData (line 113)

Error in autoFmask (line 122)

Error in Fmask_4_6 (line 57)

MATLAB:catenate:dimensionMismatch

It's pretty simple to reproduce this issue even without any METRIC involving. Here are the steps:

  1. Download any images bundle we need to use in METRIC (Collection 2 Level 2). It can be done manually in USGS EarthExplorer (https://earthexplorer.usgs.gov/). Also it can be done using the API Url directly, for example https://landsatlook.usgs.gov/gen-bundle?landsat_product_id=LC08_L2SP_039037_20220305_20220314_02_T1&requestSignature=eyJjb250YWN0SWQiOjE3MTQyNTgsImRvd25sb2FkSWQiOjE0Mjg1MjgxNywiZGF0ZUdlbmVyYXRlZCI6IjIwMjItMDMtMThUMTE6MzY6NTYtMDU6MDAiLCJzaWduYXR1cmUiOiIkNSQkVGFMMjgwTy5qVzBoMHgwemtQWGZFQlRRSnJBUlRiT0FuSXFwdTNvTUdsOSJ9.

  2. Extract all the files from the downloaded archive into the separate folder.

  3. Launch FMask tool in this folder. It can be launched without parameters or with the following parameters: "C:\Program Files\GERS\Fmask_4_6\application\Fmask_4_6.exe" 2 5 0 22.5

We have investigated the FMask code and it looks like it cannot find some files. For example it could seek for band 9 image, but there is no such image in these bundles.

@qsly09
Copy link
Contributor

qsly09 commented Mar 18, 2022

Hi,

Only the Landsat Level-1 data, rather than Level-2 surface reflectance product, can be processed by Fmask. Thanks.

Best,

Shi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants