#820: r.in.wms doesn't work in WinGRASS installer distribution
-------------------------+--------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Keywords: | Platform: MSWindows XP
Cpu: Unspecified |
-------------------------+--------------------------------------------------
The MSys environment included with WinGRASS (WinGRASS-6.4.0svn-
r39740-2-Setup.exe) does not include the bc command used by the r.in.wms
script. This causes the module to fail when trying to import maps from a
WMS service.
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [ticket:820 ddalimonte]:
> The MSys environment included with WinGRASS (WinGRASS-6.4.0svn-
r39740-2-Setup.exe) does not include the bc command used by the r.in.wms
script. This causes the module to fail when trying to import maps from a
WMS service.
>
> {{{
> GRASS 6.4.0svn (AoCWMS):C:/GRASS/msys/home/Dan > r.in.wms
output=roads_15m \
> mapserver=http://atlas.gc.ca/cgi-bin/atlaswms_en? \
> layers=roads_15m format=png maxcols=1024 maxrows=1024 method=bilinear
> which: wget: unknown command
> which: bc: unknown command
> ERROR: 'bc' is required, please install it first
> }}}
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:3 hellik]:
> Replying to [comment:2 hellik]:
> >
> > bc can be included in the WinGrass-Installer. i've adapted http://trac.osgeo.org/grass/wiki/CompileOnWindows#Pre-builtBinaries with
bc.
>
> a quick test in my osgeo4w-tree added by bc:
>
> {{{
> r.in.wms output=roads_15m mapserver=http://atlas.gc.ca/cgi-
bin/atlaswms_en? layers=roads_15m format=png maxcols=1024 maxrows=1024
method=bilinear
> which: wget: unknown command
> which: wget: unknown command
> Calculating tiles
> c:/osgeo4w/apps/grass/grass-6.4.0svn/etc/r.in.wms/wms.reques
> t: /osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset: No
> such file or directory
> ERROR: r.tileset failure
> ERROR: wms.request failure
> }}}
>
> bc is found. but now r.tileset is not found because of a wrong path to
the script
>
after starting r.in.wms g.proj.exe is crashing and the following messages:
{{{
r.in.wms output=terraserver-drg
mapserver=http://terraserver.microsoft.com/ogcmap6.ashx layers=DRG region=
drg-resolution format=jpeg srs=EPSG:26910
which: wget: unknown command
which: wget: unknown command
Calculating tiles
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[0]=SOURCE_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[1]=1: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[2]=DEST_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[3]=SOURCE_TO_DEST: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[0]=DEST_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[1]=SOURCE_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[2]=1: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[3]=DEST_TO_SOURCE: command not found
(standard_in) 2: parse error
(standard_in) 2: parse error
Rel. 4.7.1, 23 September 2009
<cs2cs.exe>:
projection initialization failure
cause: Unknown error
program abnormally terminated
ERROR: Problem running cs2cs. <Using from definition: >
ERROR: r.tileset failure
ERROR: wms.request failure
}}}
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):
* If it matters I can probably replace bc with the more common awk to do
the math.
* No, it really does need to be #!/bin/bash. Variable arrays[n] are not
present in plain old sh, and if you try without bash you get errors like
you see in the previous post.
* wget can be replaced by curl if it is installed; there's a flag. But
really we/msys should ship a copy of wget in our windows package. (fwiw
Mac ships curl not wget)
* r.in.wms for 6.4 is a problematic dead end. The new Python rewrite for
grass 7 is where the future is. (using new GDAL/OGR drivers if possible)
* I half expect more problems to show up as the shell script version of
this module has a number of issues, even on Linux.
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:7 hellik]:
with debug
{{{
r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi
output=wms_global_mosaic
which: wget: unknown command
c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.in.wms: eval:
line 1: unexpected EOF while looking for matching `''
c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.in.wms: eval:
line 2: syntax error: unexpected end of file
which: wget: unknown command
Calculating tiles
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[0]=SOURCE_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[1]=1: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[2]=DEST_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[3]=SOURCE_TO_DEST: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[0]=DEST_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[1]=SOURCE_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[2]=1: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[3]=DEST_TO_SOURCE: command not found
(standard_in) 2: parse error
(standard_in) 2: parse error
Rel. 4.7.1, 23 September 2009
<cs2cs.exe>:
projection initialization failure
cause: Unknown error
program abnormally terminated
ERROR: Problem running cs2cs. <Using from definition: >
ERROR: r.tileset failure
ERROR: wms.request failure
}}}
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:8 hamish]:
> * If it matters I can probably replace bc with the more common awk to
do the math.
installing and shipping bc and readline in the wingrass-installer is no
problem
> * No, it really does need to be #!/bin/bash. Variable arrays[n] are not
present in plain old sh, and if you try without bash you get errors like
you see in the previous post.
ah ok. what's about bash in msys, is beyond my knowledge at the moment
> * wget can be replaced by curl if it is installed; there's a flag. But
really we/msys should ship a copy of wget in our windows package. (fwiw
Mac ships curl not wget)
osgeo4w ships curl
> * r.in.wms for 6.4 is a problematic dead end. The new Python rewrite
for grass 7 is where the future is. (using new GDAL/OGR drivers if
possible)
ok
> * I half expect more problems to show up as the shell script version of
this module has a number of issues, even on Linux.
>
>
> Hamish
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:10 hellik]:
> > * No, it really does need to be #!/bin/bash. Variable arrays[n] are
not present in plain old sh, and if you try without bash you get errors
like you see in the previous post.
>
> ah ok. what's about bash in msys, is beyond my knowledge at the moment
>
in http://sourceforge.net/projects/mingw/files/ there is bash for msys.
i've changed back to #!/bin/bash in r.tileset-script, bash seems to be
recognized because there's no message like "r.tileset: No such file or
directory".
But at all there is again:
{{{
r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi
output=wms_global_mosaic
which: wget: unknown command
c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.in.wms: eval:
line 1: unexpected EOF while looking for matching `''
c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.in.wms: eval:
line 2: syntax error: unexpected end of file
which: wget: unknown command
Calculating tiles
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[...]
(standard_in) 2: parse error
Rel. 4.7.1, 23 September 2009
<cs2cs.exe>:
projection initialization failure
cause: Unknown error
program abnormally terminated
ERROR: Problem running cs2cs. <Using from definition: >
ERROR: r.tileset failure
ERROR: wms.request failure
}}}
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:10 hellik]:
> Replying to [comment:8 hamish]:
> > * wget can be replaced by curl if it is installed; there's a flag.
But really we/msys should ship a copy of wget in our windows package.
(fwiw Mac ships curl not wget)
>
> osgeo4w ships curl
>
wget can be download as pre-built-binary from the gnuwin32-website and
integrated in the windows-package
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by neteler):
Replying to [comment:12 hellik]:
> Replying to [comment:10 hellik]:
> > Replying to [comment:8 hamish]:
> > > * wget can be replaced by curl if it is installed; there's a flag.
But really we/msys should ship a copy of wget in our windows package.
(fwiw Mac ships curl not wget)
Why should we then ship wget if osgeo4w already ships curl?
> wget can be download as pre-built-binary from the gnuwin32-website and
integrated in the windows-package
Since curl is there is looks more reasonable to get that used at this
point. Apparently the test fails:
{{{
# check if we have wget or curl
if [ ! -x "`which wget`" ] ; then
if [ ! -x "`which curl`" ] ; then
g.message -e "Either 'wget' or 'curl' is required, please install
one first"
exit 1
else
g.message -v "Using CURL for downloading data."
USE_CURL=1
fi
else
g.message -v "Using WGET for downloading data."
USE_WGET=1
fi
}}}
Perhaps the which magic is non-functional with Msys?
Helmut: could you take out the test in the script and just set
{{{
USE_CURL=1
}}}
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:13 neteler]:
> Replying to [comment:12 hellik]:
> > Replying to [comment:10 hellik]:
> > > Replying to [comment:8 hamish]:
> > > > * wget can be replaced by curl if it is installed; there's a
flag. But really we/msys should ship a copy of wget in our windows
package. (fwiw Mac ships curl not wget)
>
> Why should we then ship wget if osgeo4w already ships curl?
>
> > wget can be download as pre-built-binary from the gnuwin32-website and
integrated in the windows-package
>
> Since curl is there is looks more reasonable to get that used at this
point. Apparently the test fails:
> {{{
> # check if we have wget or curl
> if [ ! -x "`which wget`" ] ; then
> if [ ! -x "`which curl`" ] ; then
> g.message -e "Either 'wget' or 'curl' is required, please
install one first"
> exit 1
> else
> g.message -v "Using CURL for downloading data."
> USE_CURL=1
> fi
> else
> g.message -v "Using WGET for downloading data."
> USE_WGET=1
> fi
> }}}
>
> Perhaps the which magic is non-functional with Msys?
>
> Helmut: could you take out the test in the script and just set
> {{{
> USE_CURL=1
> }}}
>
> to see what happens then?
>
> Markus
i've unset the curl/wget-check and set USE_CURL=1. bash, bc is in the
osgeo4w/msys-stack:
again the same error:
{{{
r.in.wms output=elevation_meters mapserver=http://wms.jpl.nasa.gov/wms.cgi
layers=us_ned styles=real -o
c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.in.wms: eval:
line 1: unexpected EOF while looking for matching `''
c:/OSGeo4W/apps/grass/grass-6.4.0svn/scripts/r.in.wms: eval:
line 2: syntax error: unexpected end of file
Calculating tiles
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[0]=SOURCE_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[1]=1: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[2]=DEST_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[3]=SOURCE_TO_DEST: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[0]=DEST_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[1]=SOURCE_PROJ: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[2]=1: command not found
c:/osgeo4w/apps/grass/grass-6.4.0svn/scripts/r.tileset:
[3]=DEST_TO_SOURCE: command not found
(standard_in) 2: parse error
(standard_in) 2: parse error
Rel. 4.7.1, 23 September 2009
<cs2cs.exe>:
projection initialization failure
cause: Unknown error
program abnormally terminated
ERROR: Problem running cs2cs. <Using from definition: >
ERROR: r.tileset failure
ERROR: wms.request failure
}}}
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hellik):
Replying to [comment:15 cmbarton]:
> I should also note that awk/gawk doesn't seem to come with msys either.
Other scripts fail in wingrass due to this lack.
>
> Michael
I've just had a look into the packaging files for the current win-
installer, based on the osgeo4w-msys-stack. awk/gawk is there.
so both should also be in the current WinGrass-Installer.
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by cmbarton):
I don't have a Windows platform computer and so cannot test directly. I've
just seen scripts fail with the error that awk (or gawk) doesn't exist
with recent winGRASS installations (i.e., not the osgeo4w version of
GRASS).
#820: r.in.wms doesn't work in WinGRASS installer distribution
---------------------------+------------------------------------------------
Reporter: ddalimonte | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Packaging | Version: svn-releasebranch64
Resolution: | Keywords: r.in.wms
Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):
Replying to [comment:8 hamish]:
> * No, it really does need to be #!/bin/bash. Variable arrays[n] are not
present in plain old sh, and if you try without bash you get errors like
you see in the previous post.