Hi,

    I'm programming in Python and I need to "scan" a large image with GDAL
reading n rows at the time. I'm using the ReadAsArray method, but every
time I execute it I get a new array. I think this solution consumes a lot
of resources.
Is there a method or option to pass to ReadAsArray an array that already
exists, in order to change it's value, like in the following pseudo-code:

band1 = ds.GetRasterBand(1)
my_arr = band1.ReadAsArrray([params])
[Do something with my_arr]
band1.ReadAsArray([params to get other rows], save_to=my_arr)

Of course, my_arr must have the correct size for storing incoming data.

Thanks,

Diego
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to