Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Review LK

Co-authored-by: linakrisztian <[email protected]>
  • Loading branch information
griembauer and linakrisztian authored Aug 15, 2024
1 parent 9de2b47 commit 279ab3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion i.sentinel_2.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2>DESCRIPTION</h2>
<li><a href="i.sentinel_2.sen2cor.html">i.sentinel_2.sen2cor</a>: runs atmospheric correction
on a single Sentinel-2 L1C scene using sen2cor</li>
<li><a href="i.sentinel_2.ndvidiff.html">i.sentinel_2.ndvidiff</a>: Calculates NDVI difference
maps from Sentinel-2 data</li>
maps from Sentinel-2 L2A data</li>

</ul>

Expand Down
4 changes: 2 additions & 2 deletions i.sentinel_2.ndvidiff/i.sentinel_2.ndvidiff.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h2>DESCRIPTION</h2>

<em>i.sentinel_2.ndvidiff</em> is a GRASS addon that calculates an NDVI difference map from Sentinel-2 data.
<em>i.sentinel_2.ndvidiff</em> is a GRASS addon that calculates an NDVI difference map from Sentinel-2 L2A data.

<p>
The goal of the addon is to compare the NDVI status from two time intervals for an AOI given by the vector map <em>aoi</em>. For each interval, <br>
Sentinel-2 data is imported from the local file system (using <a href="https://github.com/mundialis/t.sentinel">t.sentinel.import</a>), cloud-masked (using <a href="https://github.com/mundialis/t.sentinel">t.sentinel.mask</a>),<br>
Sentinel-2 L2A data is imported from the local file system (using <a href="https://github.com/mundialis/t.sentinel">t.sentinel.import</a>) given with` input_dir_first` and `input_dir_second`, cloud-masked (using <a href="https://github.com/mundialis/t.sentinel">t.sentinel.mask</a>),<br>
and temporally aggregated to receive one spectral band (using <a href="https://github.com/mundialis/t.rast.mosaic">t.rast.mosaic</a>) per time interval.
<p>
One NDVI map for each time interval as well as a difference map between the two are calculated. The user may define <br>
Expand Down
6 changes: 2 additions & 4 deletions i.sentinel_2.ndvidiff/i.sentinel_2.ndvidiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# AUTHOR(S): Guido Riembauer
# PURPOSE: Calculates NDVI difference maps from Sentinel-2 data
# COPYRIGHT: (C) 2024 by mundialis GmbH & Co. KG and the GRASS Development
# COPYRIGHT: (C) 2024 by mundialis GmbH & Co. KG
# Team
#
# This program is free software; you can redistribute it and/or modify
Expand All @@ -26,7 +26,6 @@
# % keyword: imagery
# % keyword: sentinel
# % keyword: ndvi
# % keyword: VHR
# %end

# %option G_OPT_M_DIR
Expand Down Expand Up @@ -161,7 +160,6 @@
import os
import grass.script as grass

# from grass_gis_helpers import general,cleanup

# initialize global variables
rm_vec = []
Expand Down Expand Up @@ -269,7 +267,7 @@ def main():

if clouds:
cloud_strds = f"{strds_name}_clouds_rast"
shadow_strds = f"{strds_name}_shadows"
shadow_strds = f"{strds_name}_shadows_rast"
rm_strds_w_rasters.append(cloud_strds)
rm_strds_w_rasters.append(shadow_strds)
grass.message(
Expand Down

0 comments on commit 279ab3e

Please sign in to comment.