<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 class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You know I like to complicate things 🙂</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm mostly worried about not compatibility between our format and others.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So, I'm doing that. At least is not so difficult to pack in subdatasets and make another iteration to translate them.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
People just remember about the -sds option if want to translate all subdatasets.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for your opinions.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Even Rouault <even.rouault@spatialys.com><br>
<b>Enviat el:</b> dimecres, 21 de maig de 2025 21:04<br>
<b>Per a:</b> Abel Pau <a.pau@creaf.cat>; gdal-dev <gdal-dev@lists.osgeo.org><br>
<b>Tema:</b> Re: [gdal-dev] NODATA values in diferents bands in a DataSet</font>
<div> </div>
</div>
<div>
<p><br>
</p>
<div class="x_moz-cite-prefix">Le 21/05/2025 à 20:53, Abel Pau a écrit :<br>
</div>
<blockquote type="cite"><style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div class="x_elementToProof" style="margin-top:1em; margin-bottom:1em; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Okay, thanks!</div>
<div class="x_elementToProof" style="margin-top:1em; margin-bottom:1em; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
So the interpretation we are aiming for is option <b>a)</b>:<br>
Each band is treated independently, and each one has its own NODATA value. The NODATA value of one band is unrelated to that of the others.</div>
<div class="x_elementToProof" style="margin-top:1em; margin-bottom:1em; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
That said, the question is whether this behavior is consistently supported across all formats, or if it only works this way in our custom implementation.<br>
</div>
</blockquote>
<p>GDAL core (and most algorithms) should work fine, but if you want to convert to GeoTIFF or COG, they only support the same nodata value for all bands (although we could potentially extend the GDAL_NODATA tag to support one value per band, but that would
be debate for another thread), and the same band type for all bands.<br>
</p>
<p><br>
</p>
<blockquote type="cite">
<div class="x_elementToProof" style="margin-top:1em; margin-bottom:1em; font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
If not, perhaps the more robust approach would be to separate bands with different NODATA values into different subdatasets.</div>
</blockquote>
<p>That's a possibility indeed. I'm not sure any implemented format has done such effort, but there is nothing inherently wrong if you want to do that.<br>
</p>
<br>
<pre class="x_moz-signature" cols="72">--
<a class="x_moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</body>
</html>