Convert SAGA grids to ESRI ASCII/binary grids

Description Usage Arguments Value Note Author(s) See Also

Description converts grid files from SAGA's (version 2) grid format (.sgrd) to ESRI's ASCII (.asc) and binary (.flt) format.


2, out.grids, out.path, format = "ascii",
  georef = "corner", prec = 5, ...)



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


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


folder for out.grids


output file format, either "ascii" (default; equivalent: format=1) for ASCII grids or "binary" (equivalent: 0) for binary ESRI grids (.flt).


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.


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


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.


This function uses module 0 from the SAGA library io_grid.


Alexander Brenning (R interface), Olaf Conrad (SAGA module)

See Also

rsaga.esri.wrapper() for an efficient way of applying RSAGA to ESRI ASCII/binary grids; rsaga.env()

RSAGA documentation built on May 2, 2019, 11:01 a.m.