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

i.sentinel_2.ndvidiff #10

Merged
merged 5 commits into from
Aug 15, 2024
Merged

i.sentinel_2.ndvidiff #10

merged 5 commits into from
Aug 15, 2024

Conversation

griembauer
Copy link
Member

@griembauer griembauer commented Aug 14, 2024

This PR adds an Addon i.sentinel_2.ndvidiff which

  • loads sentinel-2 data from two time intervals using t.sentinel.import
  • optionally applies cloud masking using t.sentinel.mask
  • aggregates all bands to one band per time interval using t.rast.mosaic

(----> perspectively, these three first tasks could be out-sourced to an own module to further increase reusability)

  • calculates the aggregated NDVI for each of the two time intervals and difference between the two time intervals
  • extracts areas of significant NDVI loss via threshold
  • optionally exports result data to target folder

Note:

@griembauer griembauer marked this pull request as ready for review August 15, 2024 06:45
Copy link
Contributor

@linakrisztian linakrisztian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice Addon, with a lot of functionalities, thanks!
Looks good to me, even though I did not tested it. I just have some very minor comments.

Maybe in another step, it would be nice to create some more functions, to make the code a little more structured and/or as you already mentioned out-source few parts to an own module to further increase reusability.
But nevertheless very nice addon:)

For cloud masking, the Sen2Cor cloud mask delivered with L2A data is combined with the output of <a href="https://github.com/mundialis/t.sentinel">t.sentinel.mask</a>.
<p>
The temporal aggregation method to be passed on to <a href="https://github.com/mundialis/t.rast.mosaic">t.rast.mosaic</a> can be defined via the <em>aggregation_method</em> option.<br>
Best results were achieved with <em>minimum</em> aggregation which reduces negative effects due to remaining clouds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is interesting. I always had the information, that maximum is best for reduction of cloud effects. But if you tested it, it's good to know that minimum is better

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it depends what it is aggregated. In this case, it is reflectance values - they are typically high in clouded areas so taking the minimum minimizes the risk of still having a cloud in there. If we aggregate NDVI values, it might make sense to take the maximum as clouds typically have low NDVI values.

Review LK

Co-authored-by: linakrisztian <106728040+linakrisztian@users.noreply.github.com>
@griembauer griembauer merged commit f62e6ec into main Aug 15, 2024
7 of 12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants