read.ascii.grid(file, return.header = TRUE, print = 0, nodata.values = c(), at.once = TRUE, na.strings = "NA")
read.ascii.grid.header(file, ...)
read.sgrd(fname, return.header = TRUE, print = 0, nodata.values = c(), at.once = TRUE, prec = 7, ...)
read.Rd.grid(fname, return.header = TRUE)
write.ascii.grid(data, file, header = NULL, write.header = TRUE, digits, hdr.digits = 10, dec = ".", georef = "corner")
write.ascii.grid.header(file, header, georef, dec = ".", hdr.digits = 10)
write.sgrd(data, file, header = NULL, prec = 7, hdr.prec = 10, georef = "corner", ...)
write.Rd.grid(data, file, header = NULL, write.header = TRUE, compress = TRUE)
.asc
if not specified), or a connection open for reading or writing, as requiredread.ascii.grid
returns a list with two components named data
and header
.NA
.TRUE
, read the whole grid with one scan
command; if FALSE
, read it row by row using scan
with option nlines=1
.scan
.read.sgrd
, write.sgrd
: additional arguments to be passed to rsaga.geoprocessor
.Rd
) file; extension defaults to .Rd
data
(the grid data matrix) and header
(the grid header information).read.ascii.grid
or read.ascii.grid.header
function; see DetailsTRUE
)hdr.prec
"."
): decimal mark used in input or output file"center"
or "corner"
of its lower left grid cell; defaults to "corner"
..Rd
file written by write.Rd.file
be compressed? (default: TRUE
)read.*
functions return either a list with components data
(the grid data matrix) and header
(the grid header information, see below), if return.header=TRUE
, or otherwise just the grid data matrix return.header=FALSE
.The grid data matrix is a numeric matrix whose first column corrensponds to the first (i.e. northernmost) row of the grid. Columns run from left = West to right = East.The header information returned by the read.ascii.grid[.header]
functions (if return.header=TRUE
) is a list with the following components:
NA
(typically -9999
.?llcorner
and ?llcenter
, may change, depending on the order in which they appear in the grid header and on the georeferencing method (center or corner) used for the grid. The ?llcorner
and ?llcenter
attributes differ only by cellsize/2
.
readGDAL
and writeGDAL
in package rgdal
, and readAsciiGrid
and writeAsciiGrid
in package maptools