<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:FR;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Sorry Oyvind, somehow I missed your note about it being MG2.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I will work on a patch to reinsert the NO_DATA_VALUE into the metadata.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kirk.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gdal-dev-bounces@lists.osgeo.org [mailto:gdal-dev-bounces@lists.osgeo.org] <b>On Behalf Of </b>Oyvind Idland<br><b>Sent:</b> jeudi 26 mai 2011 01:16<br><b>To:</b> gdal-dev@lists.osgeo.org<br><b>Subject:</b> Re: [gdal-dev] GDAL 1.8.0 and MrSid "no-data" values<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></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><o:p></o:p></p><div><p class=MsoNormal>On Mon, May 16, 2011 at 8:30 AM, Oyvind Idland <<a href="mailto:oyvind.idland@gmail.com">oyvind.idland@gmail.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal>Hi,<br><br>The file I'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><o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><o:p></o:p></p><div><p class=MsoNormal>On Fri, May 13, 2011 at 4:08 PM, Kirk McKelvey <<a href="mailto:kmckelvey@lizardtech.com" target="_blank">kmckelvey@lizardtech.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:10.0pt'>From:</span></b><span lang=EN-US style='font-size:10.0pt'> <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 "no-data" values</span><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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 "IMAGE__NO_DATA_VALUE", <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->GetNoDataValue() doesn't give me any hints either.<br><br>Should I handle this in a different way ?<br><br><br>-- Oyvind<o:p></o:p></p></div></div></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>