[Gdal-dev] Proposed MrSid RasterIO() patch

Sheykhet, Rostic rsheykhet at sanz.com
Mon Nov 7 12:54:43 EST 2005


Hi All/Frank,

I think I've managed to track down the issue below.  It looks like 
the code was asking for a larger image chunk that was available at a
particular zoom level.  I am attaching a suggested patch.  I have tested
it on my system and it seems to work.  Instead of guessing what the
dimensions are at a particular zoom level by doing a division, the patch
code explicitly queries the LizardTech driver for the overview
dimensions and uses those to work out the scene of interest.

Thanks

Rostic


>> From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Sheykhet,
Rostic
>> Sent: Thursday, October 20, 2005 11:29 AM
>> To: Frank Warmerdam
>> Cc: gdal-dev at lists.maptools.org
>> Subject: RE: [Gdal-dev] JP2MrSID internal overviews problem
>>
>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mrsiddataset.patch
Type: application/octet-stream
Size: 4489 bytes
Desc: mrsiddataset.patch
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20051107/a1536536/mrsiddataset.obj


More information about the Gdal-dev mailing list