readRaster {rasclass} | R Documentation |
Read ESRI asciigrid files
Description
This function reads ESRI asciigrid files and stores the information in a rasclassRaster
object.
Usage
readRaster(path, asInteger = FALSE)
Arguments
path |
A local path to the input ascii raster file. |
asInteger |
An optional logical argument. If set TRUE, the input data values will be rounded and stored as integers. |
Details
The information from the header of the ESRI asciigrid raster (.asc file extention) is stored in specific slots of the rasclassRaster object. The gridcell values are stored in a numeric vector. The rows of the raster grid are sequencially appended to that vector.
The optional argument allows to load data as integer to reduce memory requirements of the rasclassRaster object.
Value
A rasclassRaster
object.
References
ESRI ASCII raster format definition.
See Also
rasclass-package
,
rasclass-class
,
rasclassRaster-class
,
readRasterFolder
,
setRasclassData
,
Examples
## Not run:
myraster <- readRaster(path = "mypath", asInteger = FALSE)
image(myraster)
## End(Not run)