[GRASS-dev] question about the concept 'window'
Peng Du
du at cs.utk.edu
Sun Jul 18 15:30:25 EDT 2010
Hi
In function static int compute_window_row(int fd, int row, int *cellRow)
in ~/grass/7.0/grass_trunk/lib/raster/get_row.c, there is a check to see
if row is in window, and if not, 0 is returned.
I came across this function from get_map_row_nomask(...) in the same
file (which came all the way from Rast_get_row(fds[i], rowbuf, row,
maptype);), and the result of compute_window_row(...) is used to
determined whether to "read cell file row if not in memory".
I'm a little confused about the concept 'window' here, and how does that
relate to "in memory"?
My understanding is that "window" is a "visible area", and rows are only
read from disk file if it's within this "window" area. Then what would
happen if rast_get_row is used to get the exact same row in exact the
same map more than once? Does the second time NOT read the row from file
because the first time has put this row in memory? In this case the
requested row is copied from a inner buffer that was filled with the
data during the first time call?
Thanks,
Peng
More information about the grass-dev
mailing list