Sorry Oyvind, somehow I missed your note about it being MG2.

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.

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.

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.

I will work on a patch to reinsert the NO_DATA_VALUE into the metadata.

Kirk.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Oyvind Idland
Sent: jeudi 26 mai 2011 01:16
To: [email protected]
Subject: Re: [gdal-dev] GDAL 1.8.0 and MrSid "no-data" values

Hi,

should I assume that this error is due to the DSDK 8.x version ?

-- Oyvind

On Mon, May 16, 2011 at 8:30 AM, Oyvind Idland 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

The file I'm using is actually MG2, using only 3 bands.

Note, thats its the same file I used for testing in 1.7.x aswell.


- Oyvind


On Fri, May 13, 2011 at 4:08 PM, Kirk McKelvey 
<[email protected]<mailto:[email protected]>> wrote:
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.

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Oyvind Idland
Sent: vendredi 13 mai 2011 04:28
To: [email protected]<mailto:[email protected]>
Subject: [gdal-dev] GDAL 1.8.0 and MrSid "no-data" values

Hi,

I just updated to 1.8.0 from 1.7, using the MrSid DSDK 8.0.

In order to handle transparency, i have until now used the metadata values from 
"IMAGE__NO_DATA_VALUE",
and simply masked away pixels.

After upgrading, the IMAGE__NO_DATA_VALUE yields nothing, neither is it listed 
when using gdalinfo.

The band->GetNoDataValue() doesn't give me any hints either.

Should I handle this in a different way ?


-- Oyvind


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to