Comments (8)
This will not work. The Level-2A product does not include the Cirrus band, which is fairly important in the Sentinel version of the algorithm.
from python-fmask.
The package works fine with Sentinel-2A.
If you have a problem, please give full details.
- The command you are running which causes problems
- The error message you get
- The version of python-fmask
- The commands you used to install it.
from python-fmask.
Thanks for your help.
See the answers above:
- The command you are running which causes problems
- The error message you get
~/workspace/python-fmask$ fmask_sentinel2Stacked.py -o cloud2A.img --safedir ./img_files/S2A_MSIL2A_20200111T125301_N0213_R052_T24LXN_20200111T144307.SAFE
Traceback (most recent call last):
File "/home/diogo/.ve/fmask/bin/fmask_sentinel2Stacked.py", line 22, in <module>
sentinel2Stacked.mainRoutine()
File "/home/diogo/.ve/fmask/lib/python3.8/site-packages/fmask/cmdline/sentinel2Stacked.py", line 285, in mainRoutine
resampledBands = makeStackAndAngles(cmdargs)
File "/home/diogo/.ve/fmask/lib/python3.8/site-packages/fmask/cmdline/sentinel2Stacked.py", line 165, in makeStackAndAngles
cmdargs.granuledir = findGranuleDir(cmdargs.safedir)
File "/home/diogo/.ve/fmask/lib/python3.8/site-packages/fmask/cmdline/sentinel2Stacked.py", line 251, in findGranuleDir
raise fmaskerrors.FmaskFileError("Unable to find GRANULE sub-directory {}".format(granuleDirPattern))
fmask.fmaskerrors.FmaskFileError: Unable to find GRANULE sub-directory ./img_files/S2A_MSIL2A_20200111T125301_N0213_R052_T24LXN_20200111T144307.SAFE/GRANULE/L1C_*
-
The version of python-fmask
0.5.4 -
The commands you used to install it.
python setup.py build
python setup.py install
from python-fmask.
The Fmask algorithm only works with the Level-1C data from ESA. It requires all of the bands available in that.
The file you are using is the Level-2A data. You will need to download the L1C product in order to run python-fmask. At the moment, there is no way to adapt it to work with L2A.
The code and documentation was written before the L2A product existed, but your question has raised a good point. I should add to the documentation to make this clearer, and try to add an error message about it.
thank you.
from python-fmask.
I debug the code and what I saw is that the sentinel2Stacked.py has some problems in order to find files. From Level 1C to 2A the difference is that GRANULE folder organize files by pixel resolution. So, if there is not things, theoretically speaking, in order to run in Level 2A I believe that change the input from sentinel2Stacked.py will fix the problem. What do you think about it?
from python-fmask.
The band that you are talking is B10 - SWIR - CIRRUS with 20 meters? I can see it in .SAFE folder.
from python-fmask.
I cannot see band 10. The one highlighted in the screenshot is band 11.
If you read here https://sentinel.esa.int/web/sentinel/user-guides/sentinel-2-msi/processing-levels/level-2 it also says explicitly that the cirrus band is omitted from the surface reflectance product, as it does not contain surface information.
from python-fmask.
Ohhh God. Am I becoming crazy?
Yes. For fure. It wasn't there.
Thks
from python-fmask.
Related Issues (20)
- Using Fmask HOT 7
- python-fmask and google colab HOT 1
- A proposal to adapt Fmask for use in Google Earth Engine HOT 5
- can not run version 0.5.5 HOT 4
- Add support for Landsat Collection 2 HOT 9
- Terraced artefacts in Fmask cloud shadow data HOT 12
- Cloud shadow extrapolation to scene edge HOT 1
- Copernicus Sentinel-2 Major Products Upgrade on 2021/10/26 HOT 4
- Does python-fmask also need the auxiliary data๏ผ HOT 4
- Output file are colored with one colour HOT 1
- Add Sentinel-2 run with TOA feature back
- Default Landsat cloud and shadow dilations used by `python-fmask`? HOT 2
- About applying the generated mask back to the RGB file HOT 1
- dummy question
- Extract the snow/ice and water mask out from output .tif file HOT 1
- Can I run fmask on tiff files? HOT 2
- cannot import name '_fillminima' from 'fmask' HOT 2
- About the results HOT 3
- Unable to move the cache, Access denied 0x5 HOT 6
- Pure latency measure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-fmask.