<div dir="ltr">Hi Daniele,<div><br></div><div>Even added this functionality to VRTs just recently, see</div><div><br></div><div><a href="https://lists.osgeo.org/pipermail/gdal-dev/2020-December/053178.html">https://lists.osgeo.org/pipermail/gdal-dev/2020-December/053178.html</a><br></div><div><br></div><div>I think it is slated for GDAL 3.3 but you could always build the bleeding edge.</div><div><br></div><div>Patrick</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 27, 2021 at 3:50 AM Daniele Romagnoli <<a href="mailto:daniele.romagnoli@geo-solutions.it">daniele.romagnoli@geo-solutions.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi list,<div>I have some TIFF datasets with partially overlapping edges and embedded binary masks to keep into account which parts along the edges should be masked out.</div><div>When showing all the images on QGIS it looks good since the binary mask do its job by making the "black/white" overlapping edge masked out.</div><div><br></div><div>Now I need to create a single TIF from all of these images.</div><div>I have tried with gdalbuildvrt but it doesn't produce good result.</div><div>Checking the doc I saw this:</div><div><br></div><div><i><span style="color:rgb(64,64,64);font-family:Lato,proxima-nova,"Helvetica Neue",Arial,sans-serif;background-color:rgb(252,252,252)">If there is some amount of spatial overlapping between files [...] currently, alpha channel is not taken into account to do alpha compositing (so a source with alpha=0 appearing on top of another source will override is content). This might be changed in later versions.</span>  <br></i></div><div><i><br></i></div><div>So I think it's expected and I have switched to gdal_merge.py.</div><div>It works better since it does alpha compositing but it looks like the result doesn't preserve the binary mask which I still need since I have M groups of N files which I need to process in 2 passes:</div><div>- the inner group of N files get merged using the binary mask to a bigger file.</div><div>- all the M bigger files get mosaicked again to a single huge file.</div><div><br></div><div>I will spend some more time in testing different attempts.</div><div>In the meantime, do you have any suggestion or past experience on how to deal with that?</div><div>Side note: I have vague memory of gdal_merge being somehow memory bounded, throwing memory allocation errors when trying to compose big images. This is why in the past I was using gdalbuildvrt to do composition (without overlapping).</div><div><br></div><div>Thanks in advance.</div><div>Regards,</div><div>Daniele</div><div><br></div><div><br></div><div> <br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Regards,</div><div dir="ltr">Daniele Romagnoli</div><div dir="ltr">==</div><div dir="ltr">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</div><div dir="ltr">==</div><div dir="ltr"><br></div><div dir="ltr">Ing. Daniele Romagnoli</div><div dir="ltr">Senior Software Engineer</div><div dir="ltr"><br></div><div dir="ltr">GeoSolutions S.A.S.</div><div dir="ltr">Via di Montramito 3/A</div><div dir="ltr">55054  Massarosa (LU)</div><div dir="ltr">Italy</div><div dir="ltr">phone: +39 0584 962313</div><div dir="ltr">fax:      +39 0584 1660272</div><div dir="ltr"><br></div><div dir="ltr"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></div><div dir="ltr"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">-------------------------------------------------------</span></div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.</span></div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>