Skip to content

Commit

Permalink
u20 updated
Browse files Browse the repository at this point in the history
  • Loading branch information
landam committed Sep 5, 2021
1 parent 4fbe917 commit 8f1d4b0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
Binary file modified images/units/20/display-band-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/units/20/ndvi-legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion units/05.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ compute curvatures and partial derivatives.
.. figure:: ../images/units/05/slope.png
:class: middle

Slope computed from DTM in the current computational region.
Slope computed from DTM in the current computational region. Simple
legend can be added to map display by |grass-overlay-add| :sup:`Add
map elements` (*Add raster legend*) from Map Display toolbar.

Working with a mask
-------------------
Expand Down
60 changes: 28 additions & 32 deletions units/20.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[Part 2] Accessing Sentinel EO data
===================================

.. todo:: TO BE UPDATED

There are plenty of libraries or tools which allows downloading
Sentinel products from `Copernicus Open Access Hub
<https://scihub.copernicus.eu/>`__.
Expand Down Expand Up @@ -149,34 +147,35 @@ directory by :param:`-p` flag.
...
In example below import procedure will be limited to 4th and 8th bands
in 60m by :param:`pattern` option.
in 20m by :param:`pattern` option.

.. code-block:: bash
i.sentinel.import -p input=/home/odse/Downloads/t34sgh_20_60m pattern="B(04|8A)_60m"
i.sentinel.import -p input=/home/odse/Downloads/t34sgh_20_60m pattern="B(04|8A)_20m"
::
.../R60m/T34SGH_20210828T090549_B8A_60m.jp2 0 (EPSG: 32634)
.../R60m/T34SGH_20210828T090549_B04_60m.jp2 0 (EPSG: 32634)
.../R60m/T34SGH_20210624T090601_B04_60m.jp2 0 (EPSG: 32634)
.../R60m/T34SGH_20210624T090601_B8A_60m.jp2 0 (EPSG: 32634)
.../R60m/T34SGH_20210729T090559_B04_60m.jp2 0 (EPSG: 32634)
.../R60m/T34SGH_20210729T090559_B8A_60m.jp2 0 (EPSG: 32634)
.../R20m/T34SGH_20210828T090549_B8A_20m.jp2 0 (EPSG: 32634)
.../R20m/T34SGH_20210828T090549_B04_20m.jp2 0 (EPSG: 32634)
.../R20m/T34SGH_20210624T090601_B04_20m.jp2 0 (EPSG: 32634)
.../R20m/T34SGH_20210624T090601_B8A_20m.jp2 0 (EPSG: 32634)
.../R20m/T34SGH_20210729T090559_B04_20m.jp2 0 (EPSG: 32634)
.../R20m/T34SGH_20210729T090559_B8A_20m.jp2 0 (EPSG: 32634)
By default input data are imported into GRASS data format,
alternatively data can be linked if :param:`-l` is given. It is also
useful to import cloud mask vector features by :param:`-c` flag.

.. code-block:: bash
i.sentinel.import -l -c input=/home/odse/Downloads/t34sgh_20_60m pattern="B(04|8A)_60m"
i.sentinel.import -l -c input=/home/odse/Downloads/t34sgh_20_60m pattern="B(04|8A)_20m"
Lets copy our AOI (:map:`tile_5606_1km`) from *odse_workshop_2021*
location as described in :ref:`copy-map`.

.. figure:: ../images/units/20/display-band-4.png

:class: large

Visualization of 4th band. :ref:`Color table <color-table>` set to
``grey.eq`` (don't forget to set up computational

Expand All @@ -191,16 +190,24 @@ channels are required. In the case of Sentinel-2, it refers to 4th and
NDVI = (NIR - VIS) / (NIR + VIS)
Before computing let's set up computational region based on whole
Sentinel scene.

.. code-block:: bash
g.region raster=T34SGH_20210624T090601_B04_20m
NDVI can be computed by :grasscmd:`i.vi` tool which allows computing
various vegetation indices.

.. code-block:: bash
i.vi red=B04_10m output=ndvi viname=ndvi nir=B08_10m
i.vi red=T34SGH_20210624T090601_B04_20m output=ndvi viname=ndvi nir=T34SGH_20210624T090601_B8A_20m
Let's mask cloudy areas by a mask already provided by Sentinel
product. Note that masking as other raster processing is performed
only within the current computation region, see :doc:`04`.
Let's mask cloudy areas by a mask created by
:grasscmdaddons:`i.sentinel.import`. Note that masking as other raster
processing is performed only within the current computation region,
see :doc:`04`.

..
.. figure:: ../images/units/05/r-mask.png
Expand All @@ -209,20 +216,9 @@ only within the current computation region, see :doc:`04`.

.. code-block:: bash
r.mask -i vector=MaskFeature
r.mask vector=T34SGH_20210624T090601_MSK_CLOUDS -i
.. note:: Cloud mask provided by Sentinel products is not perfect, but
it is a good starting point for us. Consider to use
:grasscmdaddons:`i.sentinel.mask` or Fmask tools.

.. todo:: link to fmask

.. tip:: Also a simple legend can be added to map display by
|grass-overlay-add| :sup:`Add map elements` (*Add raster legend*)
from Map Display toolbar.

..
.. figure:: ../images/units/05/ndvi-vi.png
:class: middle
Final NDVI product with cloud mask applied with simple legend.
.. figure:: ../images/units/20/ndvi-legend.png
:class: middle

Final NDVI product with cloud mask applied with a legend.

0 comments on commit 8f1d4b0

Please sign in to comment.