These functions provide simple interfaces for reading and writing grids from/to ASCII grids and Rd files. Grids are stored in matrices, their headers in lists.
rsaga.import.gdal(in.grid, out.grid, env = rsaga.env(), ...)
file name of a grid in a format supported by GDAL
output SAGA grid file name; defaults to in.grid
with
the file extension being removed; file extension should not be specified,
it defaults to .sgrd
RSAGA geoprocessing environment created by rsaga.env()
additional arguments to be passed to rsaga.geoprocessor
Alexander Brenning (R interface), Olaf Conrad / Andre Ringeler (SAGA module), Frank Warmerdam (GDAL)
The GDAL Raster Import module of SAGA imports grid data from various file formats using the Geospatial Data Abstraction Library (GDAL) by Frank Warmerdam. GDAL Versions are specific to SAGA versions:
SAGA 2.1.2 - 2.2.0: GDAL v.1.11.0
SAGA 2.2.1 - 2.2.3: GDAL v.2.1.0 dev
...
SAGA 8.4.1: GDAL v3.3.0 More information is available at https://gdal.org/.
If in.grid
has more than one band (e.g. RGB GEOTIFF), then output
grids with file names of the form \(in.grid{\_}01.sgrd\),
\(in.grid{\_}02.sgrd\) etc. are written, one for each
band.
Numerous raster formats are currently supported. For SAGA 8.4.1 see e.g. https://saga-gis.sourceforge.io/saga_tool_doc/8.4.1/io_gdal_0.html
GDAL website: https://gdal.org/
read.ascii.grid
, rsaga.esri.to.sgrd
, read.sgrd
, read.Rd.grid