<div dir="ltr"><div>Thanks Even</div><div><br></div><div>Doing that (multiband with minisblack and alpha), and interleave=band, when computing overviews there is a problem. I opened an issue that explains it.<br><a href="https://github.com/OSGeo/gdal/issues/3939">https://github.com/OSGeo/gdal/issues/3939</a></div><div>I tried a solution, but I think it is not the proper one.</div><div><br></div><div>Cheers.</div><div>Javier<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 5 Jun 2021 at 10:30, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</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">Javier,<br>
<br>
Le 05/06/2021 à 10:24, Javier Jimenez Shaw a écrit :<br>
> Hi<br>
><br>
> I am struggling to save my data in (Geo)TIFF files with the proper <br>
> creation options.<br>
> My data is not standard RGB(A), but a collection of bands like red, <br>
> green, (not necessarily blue), another type of red, near infrared, <br>
> etc, and Alpha. It can be uint8, uint16 or float.<br>
><br>
> I was using PHOTOMETRIC=MINISBLACK and ALPHA=YES, but now I am not <br>
> sure if this is the proper configuration. In addition to that, I am <br>
> setting a ColorInterpretation to the bands (many bands as <br>
> GCI_Undefined, like for Near Infrared. The alpha band is clear as <br>
> GCI_AlphaBand).<br>
This looks good. GDAL will potential write into its GDAL_METADATA XML <br>
tag custom band color interpretation if the very basic ones implied by <br>
only TIFF tags (Grey, Grey+Alpha, RGB, RGBA) don't fit your settings<br>
><br>
> The "extra samples" is obscure to me, I do not know how many bands <br>
> expects, and how many are "extra". <br>
> (<a href="https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html" rel="noreferrer" target="_blank">https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html</a> <br>
> <<a href="https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html" rel="noreferrer" target="_blank">https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html</a>>)<br>
You shouldn't worry too much about that tag. The GeoTIFF driver will <br>
take care of setting it. But basically if you use <br>
Photometric=MinIsBlack, then count(extra_samples) = number_bands - 1, or <br>
if you use Photometric=RGB, count(extra_samples) = number_bands - 3.<br>
><br>
> TIFF says "There is no default for PhotometricInterpretation, and it <br>
> is required. Do not rely on applications defaulting to what you want." <br>
> in <br>
> <a href="https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html" rel="noreferrer" target="_blank">https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html</a> <br>
> <<a href="https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html" rel="noreferrer" target="_blank">https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html</a>><br>
><br>
> How should I create my TIFFs?<br>
<br>
For what you describe, MinIsBlack is the appropriate Photometric value<br>
<br>
Even<br>
<br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
</blockquote></div>