[GRASS-dev] Avoiding maximum open files limit in r.series

Glynn Clements glynn at gclements.plus.com
Mon Oct 17 14:46:36 EDT 2011


Sören Gebbert wrote:

> > That's what I was suggesting; e.g. Rast_suspend() and Rast_resume().
> 
> can you please implement this? I think i do not have the knowledge to
> implement it and in case i try you will correct it anyway. ;)

Can you (and everyone else, for that matter) test r48841?

It doesn't actually implement the requested functionality. However, it
implements a necessary precursor, specifically:

> One significant problem with doing this, however, is that raster maps
> are identified by the file descriptor for their data: the "fd"
> parameter to Rast_get_row() etc, and the index into the R__.fileinfo
> array, is the actual file descriptor.
> 
> It wouldn't be a great deal of work to change this, so that the "fd"
> parameter was just the index into the R__.fileinfo array, and the
> fileinfo structure contained the actual fd. However, we would need to
> make sure that we catch every case where "fd" needs to be changed to
> e.g. R__.fileinfo[fd].data_fd.

This is a fairly fundamental change (albeit one which shouldn't affect
anything outside of the core lib/raster code), so it needs to be
thoroughly tested before anything else is done in that area.

In addition to "native" raster maps, testing r.external/r.out.external
GDAL-linked maps is also necessary.

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


More information about the grass-dev mailing list