rasclass (version 0.2.2)

readRaster: 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.

Value

A rasclassRaster object.

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.

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

Run this code
## Not run: 
# myraster <- readRaster(path = "mypath", asInteger = FALSE)
# image(myraster)## End(Not run)

Run the code above in your browser using DataCamp Workspace