[R-sig-Geo] RSAGA issues
Ludwig Hilger
l.hilger at ku.de
Fri Oct 26 09:44:46 CEST 2012
Dear list,
I am comparatively new to RSAGA and have come across three problems I
have not been able solve by searching on the internet. Your help would
be very much appreciated. This is SAGA 2.0.8 and R 2.15.1.
1. Is there a way to access the header of a *.sgrd without having to
load the whole grid, i.e. not using read.sgrd()$header? I want to
determine the cellsize of a *.sgrd from within r for informational
purposes and I have 1 m grids with 62 km2.....
-------------------------------------------------------------------------------
2. I have tried to call the Grid sum module in the following way:
rsaga.geoprocessor(
lib = “grid_calculus”,
module = 8,
param = list(
GRIDS = list(“t_elev_class.sgrd”, “t_asp_class.sgrd”),
RESULT = “t_codes”
)
)
I get the following error, i.e. arguments of the function seem to get
mixed up:
“library path: C:Program Files (x86)SAGA-GIS_2.0.8/modules
library name: grid_calculus
module name : Grids Sum
author : O. Conrad (c) 2010
Load grid: t_codes...
failed
error: Grid file could not be opened.
error: input file t_codes
error: empty input list GRIDS
Usage: 8 -GRIDS -RESULT
-GRIDS: Grids
Grid list (input)
-RESULT: Sum
Grid (output)
error: executing module Grids Sum
Warnmeldung:
Ausführung von Kommando '"C:Program Files
(x86)SAGA-GIS_2.0.8/saga_cmd.exe" grid_calculus 8 -GRIDS
"t_elev_class.sgrd" -RESULT "t_asp_class.sgrd" -GRIDS "t_codes"' ergab
Status 1”
I have also tried c() instead of list() for the GRID-argument, I have
moeved GRID out of the param-list, etc. . In contrast,
rsaga.grid.calculus() works fine. I seem to have the same problem with
other modules as well, probably I do not provide the input grids in the
right way?
-------------------------------------------------------------------------------
3.
a) When I resample a grid, I have to provide USER_YMIN, USER_XMIN,
USER_XMAX and USER_YMAX. Is there a way to automatically calculate these
values from the input DEM header and the cellsize selected for
resampling (as SAGA seems to do in the GUI)?
b) If I want to use a target grid as a model for the new grid, where is
this to be specified? rsaga.get.usage("grid_tools", 0) gives me only the
options GRID_GRID and USER_GRID (which are output arguments according to
get.usage). There are no arguments for the path to the target grid.
thank you,
Ludwig
--
Dipl. Geogr. Ludwig Hilger
Wiss. MA
Lehrstuhl für Physische Geographie
Katholische Universität Eichstätt-Ingolstadt
Ostenstraße 18
85072 Eichstätt
Tel.: 08421-93-1180
More information about the R-sig-Geo
mailing list