readRaster: Read ESRI asciigrid files

Description Usage Arguments Details Value References See Also Examples

View source: R/readRaster.R

Description

This function reads ESRI asciigrid files and stores the information in a rasclassRaster object.

Usage

1
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.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/ESRI_ASCII_raster_format/009t0000000z000000/

See Also

rasclass-package, rasclass-class, rasclassRaster-class,

writeRaster,

readRasterFolder, setRasclassData,

buildFormula, checkRasclass,

rasclassMlc, classifyRasclass

Examples

1
2
3
4
## Not run: 
myraster <- readRaster(path = "mypath", asInteger = FALSE)
image(myraster)
## End(Not run)

rasclass documentation built on May 2, 2019, 6:11 a.m.