readRAST6: too many open files
On Tue, 5 May 2009, Agustin Lobo wrote:
Roger, After upgrading, the test works with plugin=F, while plugin=T produces the same result.
I find this too on Fedora 10, plugin=TRUE fails after a hundred or so calls, and then crashes R on a further command. With plugin=FALSE, there is no problem at all. The problem then lies in the plugin driver, which isn't anything that spgrass6 can do anything about. It looks as though the plugin is opening file handles to GRASS files but not closing them. I'll try to ask on the GDAL and grass-dev lists. For the time being, it seems best to use plugin=FALSE in readRAST6().
Also, ignore.stderr=T yields: ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.
This is a GRASS version issue, more recent GRASS support a flag to avoid
r.out.gdal trying to write non-existent colour tables. Could you repeat
your GRASS version:
execGRASS("g.version")
should do it.
WARNING: Input raster map constains cells with NULL-value (no-data). The
value 999 was used to represent no-data values in the input
map.You can specify nodata value by nodata parameter.
Maybe set a NODATA= value in the readRAST6() call to avoid heuristics trying to find a possible value? Roger
/media/Transcend/Montseny/GrassData//carlos/A_TOTAL/.tmp/caminoccg/nomdum has
GDAL driver GTiff
and has 94 rows and 116 columns
which is not including any more the first lines that we had with the previous
version:
raster map/current region mismatch detected in components:
cols rows origin.northing origin.easting
TRUE TRUE FALSE TRUE
set plugin=TRUE to override; continuing with plugin=FALSE
Now we have:
sessionInfo()
R version 2.9.0 (2009-04-17) i486-pc-linux-gnu locale: LC_CTYPE=es_ES.UTF-8;LC_NUMERIC=C;LC_TIME=es_ES.UTF-8;LC_COLLATE=es_ES.UTF-8;LC_MONETARY=C;LC_MESSAGES=es_ES.UTF-8;LC_PAPER=es_ES.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=es_ES.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] spgrass6_0.6-4 XML_1.95-3 rgdal_0.6-7 sp_0.9-36 loaded via a namespace (and not attached): [1] grid_2.9.0 lattice_0.17-22
We are trying now with our process, that takes much longer than the test, we'll let you know. Thanks! Agus
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no