Another question: is there any function similar to
get_map_row(…) but gets a column of data from raster image
rather than a row?
no. you'd have to load the whole map into memory for that, which
is no good for very large maps.
if you do have to do a lot of operations with full rows, and
your maps are very big, you might consider to rotate the map by
90 degrees (AFAIR there's a contrib/ module in GRASS 4 or 5 to
do that) or use r.out.mat to load the data into Matlab/Octave
whos native array layout is by rows not columns (Fortran style).
(but again they probably want to hold the whole array in memory)
Just out of curiosity, why is get_map_column not provided? Lack of time or some infrastructure/performance consideration?
Thanks,
Peng
On 7/19/2010 10:24 PM, Hamish wrote:
Peng Du wrote:
Another question: is there any function similar to
get_map_row(…) but gets a column of data from raster image
rather than a row?
no. you'd have to load the whole map into memory for that, which
is no good for very large maps.
if you do have to do a lot of operations with full rows, and
your maps are very big, you might consider to rotate the map by
90 degrees (AFAIR there's a contrib/ module in GRASS 4 or 5 to
do that) or use r.out.mat to load the data into Matlab/Octave
whos native array layout is by rows not columns (Fortran style).
(but again they probably want to hold the whole array in memory)