This project has moved and is read-only. For the latest updates, please go here.

GdalRasterLayer - Access window out of range

Topics: General Topics
Mar 7, 2007 at 3:38 PM

When trying to load a MrSid file, I get the following error:

Message="Access window out of range in RasterIO().  Requested\n(0,2169996) of size 1439995x2079996 on raster of 55000x90000."
       at GDAL.Band.ReadRaster(Int32 xOff, Int32 yOff, Int32 xSize, Int32 ySize, IntPtr buffer, Int32 buf_xSize, Int32 buf_ySize, Int32 buf_type, Int32 pixelSpace, Int32 lineSpace)

The file I'm trying to load is 255MB, can it be that's too large?

I'm using the latest SharpMap code (19234), and the latest FWTools (1.2.2)

Map mySharpMap = new Map();
mySharpMap.Size = pictureBox1.Size;
GdalRasterLayer gd = new GdalRasterLayer("GDAL Test", @"D:\Test\orthotest.sid");
pictureBox1.Image = mySharpMap.GetMap();