[gdal-dev] ReadRaster memory hit

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Mon Mar 11 22:56:34 PDT 2019


Hi,

I am writing a python script and I need to read certain pixels form a  huge Hyperspectral images with  over 200 band.  If I use the method below from the tutorial,  if I understand correctly, memory hits will only come from what I place in the buffer? In this case, only one line of pixels? Therefore, even if the raster is huge, only that one line of pixels will actually be in memory?

Thanks
Nicolas


scanline = band.ReadRaster(xoff=0, yoff=0,
xsize=band.XSize, ysize=1,
buf_xsize=band.XSize, buf_ysize=1,
buf_type=gdal.GDT_Float32)


More information about the gdal-dev mailing list