[GRASS-user] read raster by block...

Hi list,
I made a gdal-phyton script that reads big images (a 230 images
timeseries 4000x4000 px) by blocks, something like
data = band.ReadAsArray(j, i, xBlSize, yBlSize)
someone knows how to do that in a Grass-phyton script (or has a better idea! )?
Thaks
Leonardo Hardtke

--
Lic. Leonardo A. Hardtke
Laboratorio de Teledetección y S.I.G.
Centro Nacional Patagónico (CONICET)
Bvd. Brown 2825, 9120
Puerto Madryn, Chubut, Argentina

Leonardo Hardtke wrote:

I made a gdal-phyton script that reads big images (a 230 images
timeseries 4000x4000 px) by blocks, something like
data = band.ReadAsArray(j, i, xBlSize, yBlSize)
someone knows how to do that in a Grass-phyton script (or has a better idea! )?

GRASS operates row-by-row. If you need to operate upon tiles, I
suggest using grass.script.array and NumPy to restructure it.

If you only need to hold a few rows in memory at a time, it would be
feasible to process it row-by-row. On a 64-bit system, it might even
be feasible to just use grass.script.array to map all 230 maps at
once.

--
Glynn Clements <glynn@gclements.plus.com>