Dear Amelie,

> Le service Beep n'est pas lanc‚.

this can be fixed by passing an additional argument beep.off = FALSE to the rsaga.geoprocessor function; the most recent RSAGA release on CRAN does not cause this problem any more, I recommend you to update the package in your installation. The beep.off thing was an attempt to stop SAGA from beeping each time a module has been executed.

> Unexpected parameter 'and'

If a file path or file name contains spaces as in "Documents and Settings", you would have to double quote it, e.g.,
  '"My Folder"'
rather than
   "My Folder"
This will make sure that SAGA knows that the space does not separate different arguments. After all, RSAGA uses the SAGA command line interface. However, it is always a good idea to use the setwd() function to change the working directory. This will keep the path short.

I hope this helps.
  Alex

P.S.: You might wish to consider the R-sig-geo list for questions regarding spatial/GIS support in R.



Amélie Lescroël wrote:
Hello,
I discovered SAGA, an interesting free GIS, a few days ago and now, I would like to use it from within R 2.6.2 using the RSAGA package. I read the documentation for this package and thought that I understood it correctly for trying to call some of the SAGA modules. For getting the information on the usage of and arguments required by the SAGA command line "Import Binary Raw Data" module, I used:

 > rsaga.get.usage("io_grid", 4)
SAGA CMD 2.0.3
library path: C:/Progra~1/saga_vc/modules
library name: io_grid
module name : Import Binary Raw Data
Usage: 4 [-GRID <str>] [-FILE_DATA <str>] [-NX <num>] [-NY <num>] [-DXY <str>] [-XMIN <str>] [-YMIN <str>] [-UNIT <str>] [-ZFACTOR <str>] [-NODATA <str>] [-DATA_OFFSET <num>] [-LINE_OFFSET <num>] [-LINE_ENDSET <num>] [-DATA_TYPE <num>] [-BYTEORDER_BIG <num>] [-TOPDOWN <num>]
-GRID:<str> Grid
Data Object (optional output)
-FILE_DATA:<str> Raw Data File
File path
-NX:<num> Cell Count (X)
Integer
-NY:<num> Cell Count (Y)
Integer
-DXY:<str> Cell Size
Floating point
-XMIN:<str> Left Border (X)
Floating point
-YMIN:<str> Lower Border (Y)
Floating point
-UNIT:<str> Unit Name
Text
-ZFACTOR:<str> Z Multiplier
Floating point
-NODATA:<str> No Data Value
Floating point
-DATA_OFFSET:<num> Data Offset (Bytes)
Integer
-LINE_OFFSET:<num> Line Offset (Bytes)
Integer
-LINE_ENDSET:<num> Line Endset (Bytes)
Integer
-DATA_TYPE:<num> Data Type
Choice
Available Choices:
[0] 1 Byte Integer (unsigned)
[1] 1 Byte Integer (signed)
[2] 2 Byte Integer (unsigned)
[3] 2 Byte Integer (signed)
[4] 4 Byte Integer (unsigned)
[5] 4 Byte Integer (signed)
[6] 4 Byte Floating Point
[7] 8 Byte Floating Point
-BYTEORDER_BIG:<num> Byte Order
Choice
Available Choices:
[0] Little Endian (Intel)
[1] Big Endian (Motorola)
-TOPDOWN:<num> Line Order
Choice
Available Choices:
[0] Bottom to Top
[1] Top to Bottom

Then, I wrote the following command for importing a grid of binary raw data while specifying the parameters I usually enter under SAGA:

> rsaga.geoprocessor("io_grid", 4, list(GRID="199710.sgrd", FILE_DATA="C:/Documents and Settings/lescroel/Mes documents/pub/DATASETS/seaice/polar-stereo/nasateam/final-gsfc/south/monthly/nt_199710_f13_v01_s.bin", NX=316, NY=332, DXY=25, XMIN=-3950, DATA_OFFSET=300, TOPDOWN=1))

and I got:

Le service Beep n'est pas lanc‚.

Vous obtiendrez une aide suppl‚mentaire en entrant NET HELPMSG 3521.


C:\Documents and Settings\lescroel\Bureau>C:\Progra~1\saga_vc\saga_cmd.exe io_grid 4 -silent -GRID 199710.sgrd -FILE_DATA C:\Documents and Settings\lescroel\Mes documents\pub\DATASETS\seaice\polar-stereo\nasateam\final-gsfc\south\monthly\nt_199710_f13_v01_s.bin -NX 316 -NY 332 -DXY 25 -XMIN -3950 -DATA_OFFSET 300 -TOPDOWN 1

SAGA CMD 2.0.3
library path: C:/Progra~1/saga_vc/modules
library name: io_grid
module name : Import Binary Raw Data
author : (c) 2003 by O.Conrad

error: executing module [Import Binary Raw Data]
Usage: -silent [-GRID <str>] [-FILE_DATA <str>] [-NX <num>] [-NY <num>] [-DXY <str>] [-XMIN <str>] [-YMIN <str>] [-UNIT <str>] [-ZFACTOR <str>] [-NODATA <str>] [-DATA_OFFSET <num>] [-LINE_OFFSET <num>] [-LINE_ENDSET <num>] [-DATA_TYPE <num>] [-BYTEORDER_BIG <num>] [-TOPDOWN <num>]
-GRID:<str> Grid
Data Object (optional output)
-FILE_DATA:<str> Raw Data File
File path
-NX:<num> Cell Count (X)
Integer
-NY:<num> Cell Count (Y)
Integer
-DXY:<str> Cell Size
Floating point
-XMIN:<str> Left Border (X)
Floating point
-YMIN:<str> Lower Border (Y)
Floating point
-UNIT:<str> Unit Name
Text
-ZFACTOR:<str> Z Multiplier
Floating point
-NODATA:<str> No Data Value
Floating point
-DATA_OFFSET:<num> Data Offset (Bytes)
Integer
-LINE_OFFSET:<num> Line Offset (Bytes)
Integer
-LINE_ENDSET:<num> Line Endset (Bytes)
Integer
-DATA_TYPE:<num> Data Type
Choice
Available Choices:
[0] 1 Byte Integer (unsigned)
[1] 1 Byte Integer (signed)
[2] 2 Byte Integer (unsigned)
[3] 2 Byte Integer (signed)
[4] 4 Byte Integer (unsigned)
[5] 4 Byte Integer (signed)
[6] 4 Byte Floating Point
[7] 8 Byte Floating Point
-BYTEORDER_BIG:<num> Byte Order
Choice
Available Choices:
[0] Little Endian (Intel)
[1] Big Endian (Motorola)
-TOPDOWN:<num> Line Order
Choice
Available Choices:
[0] Bottom to Top
[1] Top to Bottom
Unexpected parameter 'and'

Could someone already using the RSAGA package provide some help in telling me what I did wrong?
Thanks for your help,

Amélie

--
Alexander Brenning
[EMAIL PROTECTED] - T +1-519-888-4567 ext 35783
Department of Geography and Environmental Management
University of Waterloo
200 University Ave. W - Waterloo, ON - Canada N2L 3G1
http://www.fes.uwaterloo.ca/geography/faculty/brenning/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to