Download Package `RSAGA`
Transcript
rsaga.sgrd.to.esri 57 rsaga.sgrd.to.esri Convert SAGA grids to ESRI ASCII/binary grids Description rsaga.sgrd.to.esri converts grid files from SAGA’s (version 2) grid format (.sgrd) to ESRI’s ASCII (.asc) and binary (.flt) format. Usage rsaga.sgrd.to.esri(in.sgrds, out.grids, out.path, format = "ascii", georef = "corner", prec = 5, ...) Arguments in.sgrds character vector of SAGA grid files (.sgrd) to be converted; files are expected to be found in folder rsaga.env()$workspace, or, if an optional env argument is provided, in env$workspace out.grids character vector of ESRI ASCII/float output file names; defaults to in.sgrds with the file extension being replaced by .asc or .flt, depending on format. Files will be placed in folder out.path, existing files will be overwritten out.path folder for out.grids format output file format, either "ascii" (default; equivalent: format=1) for ASCII grids or "binary" (equivalent: 0) for binary ESRI grids (.flt). georef character: "corner" (equivalent numeric code: 0) or "center" (default; equivalent: 1). Determines whether the georeference will be related to the center or corner of its extreme lower left grid cell. prec number of digits when writing floating point values to ASCII grid files; either a single number (to be replicated if necessary), or a numeric vector of length length(in.grids) ... optional arguments to be passed to rsaga.geoprocessor, including the env RSAGA geoprocessing environment Value The type of object returned depends on the intern argument passed to the rsaga.geoprocessor. For intern=FALSE it is a numerical error code (0: success), or otherwise (default) a character vector with the module’s console output. Note This function uses module 0 from the SAGA library io_grid. Author(s) Alexander Brenning (R interface), Olaf Conrad (SAGA module)