Hi Alexander, Il 03/08/2011 15:35, Alexander Bruy ha scritto: > Hi, > > There is a well-know "problem": reading really large rasters or bands > into memory with DataSource.ReadAsArray() method impossible due > memory limitations. For example, when I try to read one band with > size 53109x29049 I get error:
[CUT] > I want to know is it possible to get maximum raster size that can be handled > using ReadAsArray() without errors because I want to implement a fallback > algorithm for large rasters in my tool. In my experience using too large chunks of memory can cause, paradoxically, slowdowns. My suggestion is to define a reasonable maximum size for arrays in your application/library and switch to the "fallback algorithm for large rasters" every time that MAX_SIZE is exceeded, even if using ReadAsArray still works. > Currently I try to implement it with try-except statement but maybe > there is more > elegant solution? > > > Thanks IMHO using try-except *is* elegant and perfectly in line with python's philosophy. best regards -- Antonio Valentino _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
