<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div class="flex flex-grow flex-col gap-3">
<div class="min-h-[20px] flex items-start overflow-x-auto whitespace-pre-wrap break-words flex-col gap-4">
<div class="markdown prose w-full break-words dark:prose-invert light">
<p class="ContentPasted0">Hello, <br>
<br>
What I am trying to do is to generate a VRT file suitable for composing an RGB satellite image along with a cloud mask for that composition.</p>
<p class="ContentPasted0">I would like to include the following information in one VRT file<br>
:</p>
<ol>
<li class="ContentPasted0">Information about the path to the RGB image file</li><li class="ContentPasted0">Information about the path to the cloud mask file</li><li class="ContentPasted0">Marking/reclassifying pixels with a specified cloud value as "no data" (for the mask file, so that GDAL can properly mask them in the RGB composition)</li><li class="ContentPasted0">Indicating the cloud mask file as the alpha channel.</li></ol>
<p class="ContentPasted0">Is this possible? Currently, I'm attempting the following:
<br>
</p>
<p class="ContentPasted0">(python3.10) ubuntu@janek-test:~$ gdalbuildvrt /home/ubuntu/Desktop/alpha.vrt /eodata/Sentinel-2/MSI/L2A/2022/06/05/S2B_MSIL2A_20220605T083559_N0400_R064_T37TCN_20220605T103839.SAFE/GRANULE/L2A_T37TCN_A027403_20220605T083716/IMG_DATA/R60m/T37TCN_20220605T083559_TCI_60m.jp2
 -addalpha /eodata/Sentinel-2/MSI/L2A/2022/06/05/S2B_MSIL2A_20220605T083559_N0400_R064_T37TCN_20220605T103839.SAFE/GRANULE/L2A_T37TCN_A027403_20220605T083716/IMG_DATA/R60m/T37TCN_20220605T083559_SCL_60m.jp2 0...10...20...30...40...50...60...70...80...90...100
 - done. Warning 1: gdalbuildvrt does not support heterogeneous band numbers: expected 3, got 1. Skipping /eodata/Sentinel-2/MSI/L2A/2022/06/05/S2B_MSIL2A_20220605T083559_N0400_R064_T37TCN_20220605T103839.SAFE/GRANULE/L2A_T37TCN_A027403_20220605T083716/IMG_DATA/R60m/T37TCN_20220605T083559_SCL_60m.jp2
<br>
<br>
with visible poor results :(</p>
<p class="ContentPasted0">I would be very grateful for any advice or recommendation.<br>
Best,</p>
<p class="ContentPasted0">Marcin<br>
</p>
</div>
</div>
</div>
<br>
</div>
<div class="elementToProof">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<table style="margin-top:30px;margin-bottom:30px;width:95%">
<tbody>
<tr height="45">
<td>
<p></p>
</td>
</tr>
<tr>
<td><span style="font-family: "Open Sans Bold", sans-serif; font-size: 17px; color: rgb(255, 130, 38);"><b>Marcin Niemyjski</b></span><br>
<span style="font-family: "Open Sans", sans-serif; font-size: 13px; margin-bottom: 25px; color: rgb(71, 71, 71);">Junior Data Scientist</span>
<br>
<span style="font-family: "Open Sans", sans-serif; font-size: 13px; margin-bottom: 25px; color: rgb(71, 71, 71);">CloudFerro sp z o.o.</span>
<br>
</td>
</tr>
<tr>
<td><span style="font-family: "Open Sans", sans-serif; font-size: 12px; color: rgb(71, 71, 71);">office: Fabryczna 5</span>
<span style="font-family: "Open Sans", sans-serif; font-size: 12px; color: rgb(71, 71, 71);">
         <strong>m:</strong> </span><span style="font-family: "Open Sans", sans-serif; font-size: 12px; color: rgb(102, 102, 102);">+48 695 831 753</span><br>
<span style="font-family: "Open Sans", sans-serif; font-size: 12px; color: rgb(102, 102, 102);">00-446 Warszawa, Poland</span>
<span style="font-family: "Open Sans", sans-serif; font-size: 12px; text-decoration: none !important; color: rgb(0, 0, 0);">
   <strong>e:</strong></span> <a style="font-family: "Open Sans", sans-serif; font-size: 12px; text-decoration: none !important; color: rgb(0, 125, 197);">
<font style="font-family:Arial, Helvetica, sans-serif;text-decoration:none!important">mniemyjski@cloudferro.com</font></a>
<br>
</td>
</tr>
<tr>
<td><span><a href="https://cloudferro.com/"><img usemap="#image-map" src="https://i.imgur.com/jlLouj5.png"></a>
<map><area target="_blank" alt="Twitter" title="Twitter" href="https://twitter.com/CloudFerro" coords="602,96,621,117" shape="rect"><area target="_blank" alt="Facebook" title="Facebook" href="https://www.facebook.com/cloudferro/" coords="629,98,650,117" shape="rect"><area target="_blank" alt="Linkedin" title="Linkedin" href="https://www.linkedin.com/company/clfr/" coords="658,98,678,117" shape="rect"></map></span></td>
</tr>
</tbody>
</table>
<table id="pbpsiglinktable">
<tbody>
<tr>
<td><a href="https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature"><img data-outlook-trace="F:1|T:1" src="cid:48964d15-1c33-49b0-9330-d5379abfbdf5"></a></td>
<td></td>
<td><a href="https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature" style="text-decoration: none; color: rgb(0, 120, 212);">Book time to meet with me</a></td>
<td>
<table>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>