Git Product home page Git Product logo

Comments (8)

neilflood avatar neilflood commented on July 17, 2024 1

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.

neilflood avatar neilflood commented on July 17, 2024

The package works fine with Sentinel-2A.

If you have a problem, please give full details.

  1. The command you are running which causes problems
  2. The error message you get
  3. The version of python-fmask
  4. The commands you used to install it.

from python-fmask.

diogocaribe avatar diogocaribe commented on July 17, 2024

Thanks for your help.

See the answers above:

  1. The command you are running which causes problems
  2. 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_*
  1. The version of python-fmask
    0.5.4

  2. The commands you used to install it.
    python setup.py build
    python setup.py install

from python-fmask.

neilflood avatar neilflood commented on July 17, 2024

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.

diogocaribe avatar diogocaribe commented on July 17, 2024

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.

diogocaribe avatar diogocaribe commented on July 17, 2024

The band that you are talking is B10 - SWIR - CIRRUS with 20 meters? I can see it in .SAFE folder.

Screenshot from 2020-03-17 18-08-55

from python-fmask.

neilflood avatar neilflood commented on July 17, 2024

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.

diogocaribe avatar diogocaribe commented on July 17, 2024

Ohhh God. Am I becoming crazy?
Yes. For fure. It wasn't there.
Thks

from python-fmask.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.