[Gdal-dev] Strange NoData value from a MrSID image

Peng Gao pgao at esri.com
Wed Jun 22 10:58:03 EDT 2005


> -----Original Message-----
> From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]
> Sent: Wednesday, June 22, 2005 7:33 AM
> To: Peng Gao
> Cc: gdal-dev at remotesensing.org
> Subject: Re: [Gdal-dev] Strange NoData value from a MrSID image
> 
> On 6/22/05, Peng Gao <pgao at esri.com> wrote:
> > GDAL returns a strange NoData value (-1.2197742815800439e-012) from
> > one of my mrSID images. The image is 8-bit and has 3 bands.
> 
> Peng,
> 
> Have you checked the image with mrsidinfo to see if that value
> is what the mrsid internals also report?  Can you supply an example
> file?  Some formats use impossible nodata values to indicate that
> there is no nodata value.  Perhaps such a bogus value was carried
> into a Mrsid file.
> 

The following are output from mrsidinfo. It seems the nodata value is
0. If it's the case, then GDAL returned value is close. However, one
thing I noticed is that MrSID calls it NoData Color instead of
NoData value. It could mean that a pixel is NoData only if all three
values
are 0. This is different from GDAL's interpretation of NoData value.
This
could explain why my image doesn't display correctly (All black text 
become NoData).

C:\GDAL\codec\DSDK\bin>mrsidinfo
\\archive\CRData\ArcGIS\DataSources\DataSources
Raster\RasterDB\11877\erdrg.sid
mrsidinfo: (c) 2004 LizardTech, Inc. All rights reserved.

basic image info:
  format:            MRSID
  width:             7382
  height:            9305
  nband:             3
  color space:       RGB
  datatype:          uint8
  precision:         8
  dyn range min:     (natural)
  dyn range max:     (natural)
  background color:  (72, 255, 200)
  nodata color:      (0, 0, 0)
  metadata records:  36

geo coordinate info:
  X UL:              748980
  Y UL:              4.32085e+006
  X res:             1.5287
  Y res:             -1.5287
  X rot:             0
  Y rot:             0

geo points (pixel centers):
  upper left:        (748979.965101, 4320850.825793)
  upper right:       (760263.331028, 4320850.825793)
  lower left:        (748979.965101, 4306627.761631)
  lower right:       (760263.331028, 4306627.761631)
  center:            (754621.648064, 4313739.293712)

MrSID image info:
  number of levels:  8
  is locked:         false
  file version:      1.0.1.

MrSID/MG2-specific image info:
  is dithered:       false


C:\GDAL\codec\DSDK\bin>



More information about the Gdal-dev mailing list