Ok, thanks. <br><br><br>-- Oyvind<br><br><div class="gmail_quote">On Fri, May 27, 2011 at 9:10 PM, Kirk McKelvey <span dir="ltr">&lt;<a href="mailto:kmckelvey@lizardtech.com">kmckelvey@lizardtech.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div link="blue" vlink="purple" lang="FR"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Sorry Oyvind, somehow I missed your note about it being MG2.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">I looked into this yesterday and it is indeed a difference in the v8 DSDK.  Image properties that are available through the API (such as the nodata value, dynamic range, etc.) are no longer being inserted into the metadata.  This means they do not get transcribed into the GDAL metadata during initialization of the MrSIDDataset either.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Meanwhile, it looks like MrSIDRasterBand::GetNoDataValue() was disconnected due to a difference in the way LizardTech and GDAL interpret NODATA (per-band vs. all-bands), so there is no longer a way to get at this info at all.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">For the moment the only suggestion I have is to reactivate the code in MrSIDRasterBand::MrSIDRasterBand() (approx. line 366ff in mrsiddataset.cpp) that sets the nodata value for the raster band.  You will of course have to deal with the different nodata semantics between LT and GDAL.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">I will work on a patch to reinsert the NO_DATA_VALUE into the metadata.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Kirk.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt" lang="EN-US">From:</span></b><span style="font-size:10.0pt" lang="EN-US"> <a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Oyvind Idland<br>
<b>Sent:</b> jeudi 26 mai 2011 01:16</span></p><div class="im"><br><b>To:</b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br></div><b>Subject:</b> Re: [gdal-dev] GDAL 1.8.0 and MrSid &quot;no-data&quot; values<p>
</p><div class="im"><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br><br>should I assume that this error is due to the DSDK 8.x version ?<br><br>-- Oyvind<br><br></p><div><p class="MsoNormal">
On Mon, May 16, 2011 at 8:30 AM, Oyvind Idland &lt;<a href="mailto:oyvind.idland@gmail.com" target="_blank">oyvind.idland@gmail.com</a>&gt; wrote:</p><p class="MsoNormal">Hi,<br><br>The file I&#39;m using is actually MG2, using only 3 bands. <br>
<br>Note, thats its the same file I used for testing in 1.7.x aswell.<br><span style="color:#888888"><br><br>- Oyvind</span></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br></p><div><p class="MsoNormal">
On Fri, May 13, 2011 at 4:08 PM, Kirk McKelvey &lt;<a href="mailto:kmckelvey@lizardtech.com" target="_blank">kmckelvey@lizardtech.com</a>&gt; wrote:</p><div><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Is this with MG3 or MG4 files?  MG4 uses an alpha channel instead of nodata, so what you describe would be expected in that case.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"> </span></p><p class="MsoNormal"><b><span style="font-size:10.0pt" lang="EN-US">From:</span></b><span style="font-size:10.0pt" lang="EN-US"> <a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Oyvind Idland<br>
<b>Sent:</b> vendredi 13 mai 2011 04:28<br><b>To:</b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br><b>Subject:</b> [gdal-dev] GDAL 1.8.0 and MrSid &quot;no-data&quot; values</span></p>
<div><div><p class="MsoNormal"> </p><p class="MsoNormal">Hi,<br><br>I just updated to 1.8.0 from 1.7, using the MrSid DSDK 8.0. <br><br>In order to handle transparency, i have until now used the metadata values from &quot;IMAGE__NO_DATA_VALUE&quot;, <br>
and simply masked away pixels.<br><br>After upgrading, the IMAGE__NO_DATA_VALUE yields nothing, neither is it listed when using gdalinfo.<br><br>The band-&gt;GetNoDataValue() doesn&#39;t give me any hints either.<br><br>Should I handle this in a different way ?<br>
<br><br>-- Oyvind</p></div></div></div></div></div><p class="MsoNormal"> </p></div></div></div><p class="MsoNormal"> </p></div></div></div></blockquote></div><br>