[gdal-dev] GDAL 1.8.0 and MrSid "no-data" values
Kirk McKelvey
kmckelvey at lizardtech.com
Fri May 27 15:10:48 EDT 2011
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: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Oyvind Idland
Sent: jeudi 26 mai 2011 01:16
To: gdal-dev at lists.osgeo.org
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 <oyvind.idland at gmail.com<mailto:oyvind.idland at gmail.com>> 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 <kmckelvey at lizardtech.com<mailto:kmckelvey at lizardtech.com>> 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: gdal-dev-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org> [mailto:gdal-dev-bounces at lists.osgeo.org<mailto:gdal-dev-bounces at lists.osgeo.org>] On Behalf Of Oyvind Idland
Sent: vendredi 13 mai 2011 04:28
To: gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110527/15ff25fb/attachment.html
More information about the gdal-dev
mailing list