Hi Daniele, Even added this functionality to VRTs just recently, see
https://lists.osgeo.org/pipermail/gdal-dev/2020-December/053178.html I think it is slated for GDAL 3.3 but you could always build the bleeding edge. Patrick On Wed, Jan 27, 2021 at 3:50 AM Daniele Romagnoli < [email protected]> wrote: > Hi list, > 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. > 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. > > Now I need to create a single TIF from all of these images. > I have tried with gdalbuildvrt but it doesn't produce good result. > Checking the doc I saw this: > > > *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. * > > So I think it's expected and I have switched to gdal_merge.py. > 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: > - the inner group of N files get merged using the binary mask to a bigger > file. > - all the M bigger files get mosaicked again to a single huge file. > > I will spend some more time in testing different attempts. > In the meantime, do you have any suggestion or past experience on how to > deal with that? > 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). > > Thanks in advance. > Regards, > Daniele > > > > > -- > Regards, > Daniele Romagnoli > == > GeoServer Professional Services from the experts! Visit > http://goo.gl/it488V for more information. > == > > Ing. Daniele Romagnoli > Senior Software Engineer > > GeoSolutions S.A.S. > Via di Montramito 3/A > 55054 Massarosa (LU) > Italy > phone: +39 0584 962313 > fax: +39 0584 1660272 > > http://www.geo-solutions.it > http://twitter.com/geosolutions_it > > ------------------------------------------------------- > > 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. > > 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. > _______________________________________________ > gdal-dev mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
