[Gdal-dev] JP2MrSID internal overviews problem

Sheykhet, Rostic rsheykhet at sanz.com
Thu Oct 20 13:28:44 EDT 2005


Hi Frank,

The previous issue has gone away, but a slightly different problem still
occurs:

	MrSIDRasterBand::IRasterIO(): Failed to load image.
	specified scene out of range of image [50014]
======================================================
GDAL Overview Band information from the debugger:			
	nBand	1	int
	nRasterXSize	94	int
	nRasterYSize	75	int
	eDataType	GDT_Byte	GDALDataType
	eAccess	GA_ReadOnly	GDALAccess
	nBlockXSize	94	int
	nBlockYSize	75	int
	nBlocksPerRow	0	int
	nBlocksPerColumn	0	int
	bSubBlockingActive	0	int
	nSubBlocksPerRow	0	int
	nSubBlocksPerColumn	0	int
+	papoBlocks	0x00000000	GDALRasterBlock * *
	nBlockReads	0	int
	bForceCachedIO	0	int
====================================================

Again, I am accessing an overview directly and issuing a 
RasterIO(GF_Read,0,0,94,75,buffer,119,95,GDT_Byte,0,0).
I would guess that the things of interest are 
	a) I am requesting the full extent of overview
      b) I am requesting a scaled version of the image

Thank you for your help.

Rostic


-----Original Message-----
From: Sheykhet, Rostic 
Sent: Tuesday, October 18, 2005 12:59 PM
To: 'Frank Warmerdam'
Cc: gdal-dev at lists.maptools.org
Subject: RE: [Gdal-dev] JP2MrSID internal overviews problem

That took care of it. 

Thanks a lot

Rostic


-----Original Message-----
From: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com] On Behalf Of
Frank Warmerdam
Sent: Monday, October 17, 2005 1:35 PM
To: Sheykhet, Rostic
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] JP2MrSID internal overviews problem

On 10/17/05, Sheykhet, Rostic <rsheykhet at sanz.com> wrote:
> Hi all,
>
> I am trying to access JPEG 2000 internal overview data. gdal_info
> reports that there are 12 overviews in the file.  When I try
>
> band = parentBand->GetOverview(nOverview);
...
> // CPLGetLastErrorMsg() =
> //"MrSIDRasterBand::IRasterIO(): Failed to load image. invalid or
empty
> scene speficied [50013]"


Rostic,

Yikes!  It seems that IRasterIO's on the explicit overviews using
the MrSID SDK was completely broken.  I think I likely broke it
circa Sept 15th but I'm not at all sure of that.

In any event, I have committed a fix and also added a test to the
"mrsid" gdalautotest script so such problems will come to light more
quickly in the future.  You can grab the fixed mrsiddataset.cpp at:

  http://www.gdal.org/srctree/frmts/mrsid/mrsiddataset.cpp

> I've looked at the code and it looks like it attempts to determine the
> best overview to use
> whithin the  RasterIO() call.  What are the rules for specifying
> overviews explicitly vs. letting the GDAL handle them?

Normally you can just do a RasterIO() request on the full resolution
layer and GDAL will use the most appropriate overview level as needed.
This aspect should have been working fine and is the normal case.

Best regards,
--
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list