[R] Unexpected parameter problem using rsaga.geoprocessor() {RSAGA}

Amelie LESCROEL lescroel at cebc.cnrs.fr
Mon Aug 11 16:45:51 CEST 2008


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
-- 

-------------------------------------------------------------------------------------------------------------------------------- 

*Amélie Lescroël*
Postdoc - Seabird ecology
Centre d’Etudes Biologiques de Chizé – 79360 Villiers en Bois – France

*_http://www.cebc.cnrs.fr/Fidentite/lescroel/lescroel.htm_*

*_http://www.cebc.cnrs.fr/ecomm/En_ecomm/En_index.html_*

*_http://www.penguinscience.com_* <http://www.penguinscience.com/>
-------------------------------------------------------------------------------------------------------------------------------- 

/"You have to have the debate and you have to have people thinking 
creatively, and then, ultimately, you'll come down to the truth"/





__________ Information from ESET Mail Security, version of virus signature database 3345 (20080811) __________

The message was checked by ESET Mail Security.
http://www.eset.com


    part000.txt - is OK



More information about the R-help mailing list