[GRASS-user] Re: More on r.in.wms

Hamish hamish_b at yahoo.com
Tue Feb 26 23:45:17 EST 2008


Richard Chirgwin wrote:
> If I use r.in.wms from the GUI, it works, but I get errors from the 
> Terminal interface.

ok.

>  From the r.in.wms GUI, here is the command that appears in the
> Output panel of Grass-GIS:
> 
> r.in.wms -c output=BG mapserver=<mapserver URL data> layers=psma:all 
> srs=EPSG:4326 format=png wmsquery=version=1.1.1 maxcols=1024 
> maxrows=1024 {curloptions=-C - --retry 5 -s -S} method=nearest v=1 
> --overwrite
....
> Here are the error messages:
> [1] 1126
> [2] 1127
> bash: {curloptions=-C: command not found
> [2]+  Done                    SERVICE=WMS
> ERROR: option <output>: <BG> exists.
> [1]+  Exit 1                  r.in.wms -c output=BG 


does your mapserver= string contain a "&", "=", ";" or something funny
like that? Even if not when working from the terminal you should
contain those long strings in "quotes" so the shell doesn't try to
interpret them.

e.g.  mapserver="http://wms.jpl.nasa.gov/wms.cgi"

This shouldn't be an issue from the GUI interface, it quotes
{automatically}.


WRT to curl vs wget, AFAIK curl doesn't have it's own protocol, and
both clients should be able to connect to the server in the same way
regardless of the software running on the server.  ?
(but that's no excuse for broken curl support)


I have just committed in SVN some extra quoting for the variables in
the script on the off-chance that it helps your earlier "curl -n"
error.
There may be multiple quoting problems here; I am not sure about how
safe the addargument() function is. We may need to add quotes to
\"$3\". 
?

bonus bugfix: "addargument DOWNLOAD curloptions" was missing so for
tile downloads curl was using wms.download's default and not what you
gave on the command line.

  http://trac.osgeo.org/grass/changeset/30371

because these are shell scripts, you can just download and drop in the
latest version without recompiling or waiting for a new binary release.
(in the above SVN URL click the filename then "plain text" at the
bottom of the code page)

Also, I think the programmer might have thought that ${FOO} was the
same as "$FOO", it is not.



Hamish



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



More information about the grass-user mailing list