# Issue in DTM creation: MG2 mask has limitroph artifacts

**URL:** <https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771>\
**Category:** MAJA\
**Created:** [May 27, 2024, 4:35pm UTC](https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771 "2024-05-27T16:35:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Buratti](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@Robin\_Buratti](https://forum.orfeo-toolbox.org/u/Robin_Buratti)\
**Post date:** [May 27, 2024, 4:35pm UTC](https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771/1 "2024-05-27T16:35:41Z")

</div>

Hi,

I am using MAJA in the frame of the COPERNICUS HR-WSI project. In the frame of this project, we aim to use MAJA 4.8.0 with CAMS at a 120m coarse resolution as our atmospheric correction algorithm. To do so, we need to process the DTMs for all the processed tiles.  
The processed L2As are inputs for various processing routines, such as [LIS](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow), the snow detection algorithm developed at CESBIO.

When doing round robins on the 32TNS tile, we observed some strange doodle lines on the Fractional Snow Cover product illustrated below.

 ![FSC](https://forum.orfeo-toolbox.org/uploads/default/original/2X/0/005ab7e0dccde6a11b483583194dbf1d3c449538.png)  
_Detail of an FSC TOC on the 32TNS Sentinel-2 tile computed using LIS 1.11.0 on a L2A raster computed with MAJA 4.8.0 with CAMS at 120m_

After further inquiry, we sourced this issue from the slope mask of LIS, the input SWIR from MAJA (and the resulting NDSI).

Eventually, we tracked this issue up to the DTM ASP\_R2 mask at least for the slope mask as we know that LIS uses it in its process. We do not have more information on why these same alterations are visible on the SWIR band though. Additionally, this seems to come mainly from the ASP\_R2 mask as this artefact is not to be seen elsewhere, and provided that the ASP\_R1 mask, though describing the same information at a finer resolution, shows neither negative values - which ASP\_R2 does) nor limitroph artefacts.

We also noted that the negative values found in the ASP\_R2 mask are coincidental with the limitroph artefacts and the slope mask aberrations.

We wonder where these artefacts are sourced and if they will be taken care of in future releases.

Best regards

Robin BURATTI

---

<div class="post-metadata">

**Author:** ![Robin\_Buratti](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@Robin\_Buratti](https://forum.orfeo-toolbox.org/u/Robin_Buratti)\
**Post date:** [May 27, 2024, 4:37pm UTC](https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771/2 "2024-05-27T16:37:53Z")

</div>

[EDIT] I added the illustrations in reply as I am unallowed to add more than 1 embedded file as a new member.

![ezgif.com-added-text](https://forum.orfeo-toolbox.org/uploads/default/original/2X/0/049dbfb54c1d4bdff0946447f021d52b6613a435.gif)  
_Illustration GIF of the coincidental artefacts on the slope mask, the FSC TOC, the NDSI, and the SWIR band from MAJA_

---

<div class="post-metadata">

**Author:** ![Robin\_Buratti](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@Robin\_Buratti](https://forum.orfeo-toolbox.org/u/Robin_Buratti)\
**Post date:** [May 27, 2024, 4:41pm UTC](https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771/4 "2024-05-27T16:41:18Z")

</div>

![ASP_R2](https://forum.orfeo-toolbox.org/uploads/default/original/2X/f/f9b2f86ec520bd8f8fd051800a0df139b4e13d95.png)  
_ASP\_R2 mask with artefacts_

---

<div class="post-metadata">

**Author:** ![Robin\_Buratti](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@Robin\_Buratti](https://forum.orfeo-toolbox.org/u/Robin_Buratti)\
**Post date:** [May 27, 2024, 4:41pm UTC](https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771/5 "2024-05-27T16:41:48Z")

</div>

![ASP_R1](https://forum.orfeo-toolbox.org/uploads/default/original/2X/6/6d17f8c65525d28e539280f27cf36562b9072208.png)  
_ASP\_R1 mask without artefacts_

---

<div class="post-metadata">

**Author:** ![Robin\_Buratti](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/r/ccd318/32.png) [@Robin\_Buratti](https://forum.orfeo-toolbox.org/u/Robin_Buratti)\
**Post date:** [May 27, 2024, 4:42pm UTC](https://forum.orfeo-toolbox.org/t/issue-in-dtm-creation-mg2-mask-has-limitroph-artifacts/1771/6 "2024-05-27T16:42:22Z")

</div>

![ezgif.com-animated-gif-maker](https://forum.orfeo-toolbox.org/uploads/default/original/2X/8/85039d3d56932b1f0efa8e8638e5f33586350914.gif)  
_Illustration GIF of the negative values (red) in the ASP\_R2 mask and the slope mask (maroon)_
