Giter Site home page Giter Site logo

Comments (7)

CristianICS avatar CristianICS commented on September 28, 2024 1

That's right. First I defined the functions that allows the surface correction (spectralResponseFunction, toa_to_rad and surface_reflectance). Then I created a new function called conversion where:

  1. Calculates image's date and defines some variables as global in order to call them out of conversion function
  2. Groups jupyter's chunks metadata, atmospheric constituents and target altitude, plus 6S object
  3. Applied atmospheric correction in all wavebands and export to GEE asset

At the end, I filtered the Sentinel-2 collection and applied the function conversion over all images.

As the VIS-NIR image's bands was corrected separately, it took me around 5-7 seconds per image* (plus a high time lapse between the correction of the image and his addition to the asset). In discussions with teachers and students, I have realized that this code is a good choice for studies/applications that must have done quickly atmospheric corrections of GEE Sentinel-2 images prior to 28th March (only in TOA reflectance) in small/medium areas. In my thesis I figured out that differences between original BOA VIS-NIR bands in GEE (corrected with ESA tools) and 6S corrected bands was only 0.02 per one reflectance. In addition, some teachers showed interest in applied this code and 6S transformations in GIS lessons.

I attach a copy of the code (switch the extension by .py). As I mentioned, my code skills are low and maybe there are some errors.

* The images were clipped by 100.000 ha area.

from gee-atmcorr-s2.

CristianICS avatar CristianICS commented on September 28, 2024 1

Hi @samsammurphy,

I have rewritting the last attach process with @diegoalarc and we have integrated the proccess in the atmospheric.py. Now one can apply the loop within a new function (S2_L1C.conversion()).

Here is the new atmospheric.py (again, switch the extension by .py) and we hope you can use this to embedded in yours atmospheric.py if you consider it appropriate.

from gee-atmcorr-s2.

samsammurphy avatar samsammurphy commented on September 28, 2024

Hi @dorbodwolf,
Thanks for interest all those years ago. I am thinking of getting this repo to work again then would love to hand it over. Are you still interested?

from gee-atmcorr-s2.

dorbodwolf avatar dorbodwolf commented on September 28, 2024

Hi @dorbodwolf,
Thanks for interest all those years ago. I am thinking of getting this repo to work again then would love to hand it over. Are you still interested?
Hi @samsammurphy
The Py6S is used in my master's thesis in the year of 2018, its near 2 years passed, I am still interested with it, you can give more information about the subsequent development if that is convenient.

from gee-atmcorr-s2.

samsammurphy avatar samsammurphy commented on September 28, 2024

Hello,
Apologies for slowness on my end. I don't have any ideas on how to develop this repo further.. I really am sorry about not having seen your message much sooner.. if you have ideas and/or desire to work on it let me know.. (again sorry for the delay)

from gee-atmcorr-s2.

CristianICS avatar CristianICS commented on September 28, 2024

Hi @samsammurphy and @dorbodwolf,
I could suggest an idea. I have used your code in my master's thesis too (very gratefully) in order to correct automatically all Sentinel 2 images in a GEE collection. I'm not a code expert so I don't know If the approach that I followed was correct. It's the next:

Firstly I grouped the parts of the code metadata, atmospheric constituents, target altitude (km), 6S object and Atmospheric Correction in a function. Secondly I passed it over all Sentinel 2 collection, filtering at the end of the code, by for iteration. With this scope I corrected 35 images automatically considering the metadata of each image individually (despite of a little slowly).

Maybe this could inspire us or maybe not.

PD: I checked over your repo ee-atmcorr-timeseries but it didn't fit to my work.

from gee-atmcorr-s2.

samsammurphy avatar samsammurphy commented on September 28, 2024

Hi @CristianICS

Congratulations on adapting the code for your use case. It sounds like you calculated all of the relevant atmospheric parameters in advanced then sent them over to GEE. Cool idea!

A concern is that it will start to take a long time if there are a lot of images (as you mentioned). However maybe someone processing 100 images doesn't mind waiting 200 seconds*. if it is a one off project (e.g. a scientific study)?

* It took me around 2 seconds to execute a single run of 6S (the radiative transfer code used in this solution.

from gee-atmcorr-s2.

Related Issues (12)

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.