[gdal-dev] Multiple processing options related to Cloud Masking in one VRT

Marcin Niemyjski mniemyjski at cloudferro.com
Wed Jul 19 02:01:44 PDT 2023


Hello,

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.

I would like to include the following information in one VRT file
:

  1.  Information about the path to the RGB image file
  2.  Information about the path to the cloud mask file
  3.  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)
  4.  Indicating the cloud mask file as the alpha channel.

Is this possible? Currently, I'm attempting the following:

(python3.10) ubuntu at 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

with visible poor results :(

I would be very grateful for any advice or recommendation.
Best,

Marcin



Marcin Niemyjski
Junior Data Scientist
CloudFerro sp z o.o.
office: Fabryczna 5          m: +48 695 831 753
00-446 Warszawa, Poland    e: mniemyjski at cloudferro.com
[https://i.imgur.com/jlLouj5.png]<https://cloudferro.com/>
[cid:48964d15-1c33-49b0-9330-d5379abfbdf5]<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>           Book time to meet with me<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230719/f048e301/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-xs0nzd04.png
Type: image/png
Size: 528 bytes
Desc: Outlook-xs0nzd04.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230719/f048e301/attachment.png>


More information about the gdal-dev mailing list