I have a recurring problem where I keep getting an "Unexpected Parameter" error. I am currently trying to run Mosaic on my Aster grids. Here is my code:
:: set the path to your SAGA program
SET PATH=%PATH%;c:\saga6
:: set the prefix to use for all names and outputs
SET pre= ASTER
:: set the directory in which you want to save outputs. In the example below, part of the directory name is the prefix you entered above
SET od=W:\OpenSource\lab04\%pre%data
:: the following creates the output directory if it doesn't exist already
if not exist %od% mkdir %od%
:: Run Mosaicking tool, with consideration for the input -GRIDS, the -
saga_cmd grid_tools 3 -GRIDS=W:\OpenSource\lab04\ASTERDEMdata\ASTGTMV003_S03E037_dem.sgrd;W:\OpenSource\lab04\ASTERDEMdata\ASTGTMV003_S04E037_dem.sgrd -NAME=%pre%Mosaic -TYPE=9 -RESAMPLING=1 -OVERLAP=1 -MATCH=0 -TARGET_OUT_GRID=%od%\%pre%mosaic.sgrd
The command box says that my unexpected parameter is 'ASTERmosaic' which is for the "NAME" input. I got rid of the prefix for that input and did the same for my TARGET_OUT_GRID input which worked. However, now the command box is saying that it "can't open file 'W:\OpenSource\lab04\" ASTERdata\mosaic.sgrd'" . The description of the error is that "the filename, directory name, or volume label syntax is incorrect".
Hey all-
I have a recurring problem where I keep getting an "Unexpected Parameter" error. I am currently trying to run Mosaic on my Aster grids. Here is my code:
:: set the path to your SAGA program SET PATH=%PATH%;c:\saga6
:: set the prefix to use for all names and outputs SET pre= ASTER
:: set the directory in which you want to save outputs. In the example below, part of the directory name is the prefix you entered above SET od=W:\OpenSource\lab04\%pre%data
:: the following creates the output directory if it doesn't exist already if not exist %od% mkdir %od%
:: Run Mosaicking tool, with consideration for the input -GRIDS, the - saga_cmd grid_tools 3 -GRIDS=W:\OpenSource\lab04\ASTERDEMdata\ASTGTMV003_S03E037_dem.sgrd;W:\OpenSource\lab04\ASTERDEMdata\ASTGTMV003_S04E037_dem.sgrd -NAME=%pre%Mosaic -TYPE=9 -RESAMPLING=1 -OVERLAP=1 -MATCH=0 -TARGET_OUT_GRID=%od%\%pre%mosaic.sgrd
The command box says that my unexpected parameter is 'ASTERmosaic' which is for the "NAME" input. I got rid of the prefix for that input and did the same for my TARGET_OUT_GRID input which worked. However, now the command box is saying that it "can't open file 'W:\OpenSource\lab04\" ASTERdata\mosaic.sgrd'" . The description of the error is that "the filename, directory name, or volume label syntax is incorrect".
Any thoughts?