Opened 20 years ago

Last modified 20 years ago

#173 closed defect (fixed)

GDALRasterBand::ReadBlock only reads first block

Reported by: rogerjames99@… Owned by: dron
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:


If the internal function GDALRasterBand::InitBlock has not been previously 
called then the ReadBlock function only returns the first block no matter what 
co-ordinates are requested. When tested with the geotiff driver, this internal 
function was only being called when cache flushes were requested. This may be 
the case on other drivers as well. So the examples of the usage of read block 
to iterate through a dataset will not work. The work around is to call 
FlushBlock on any valid block in the band, whether on it is has been written 
to. I cannot see any references to this or the need to call any other init 
function in the docs.

Change History (2)

comment:1 by warmerdam, 20 years ago


Could you look into this?  

comment:2 by dron, 20 years ago

Problem fixed by adding InitBlockInfo() call to ReadBlock() and WriteBlock()
Note: See TracTickets for help on using tickets.