Opened 14 years ago
Closed 11 years ago
#1163 closed defect (fixed)
wx wms import tool error
Reported by: | hamish | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.3 |
Component: | wxGUI | Version: | svn-develbranch6 |
Keywords: | wingrass, wms, r.in.wms | Cc: | |
CPU: | x86-64 | Platform: | MSWindows XP |
Description
Hi,
[latest 6.5.svn nightly binary, r43490]
running the wx GUI File > Import raster > WMS import tool on WinGrass pops up an error (see attached screenshot) and leaves this in the gis manager output tab:
Traceback (most recent..last): File "C:\Program Files\GRASS-65-SVN\etc\wxpython\gui_modul es\ogc_services.py", line 184, in OnConnect key, value = line.split(':', 1) ValueError : need more than 1 value to unpack
?
thanks, Hamish
Attachments (2)
Change History (20)
by , 14 years ago
Attachment: | wx_wms_640_err.png added |
---|
comment:1 by , 14 years ago
follow-up: 3 comment:2 by , 14 years ago
Replying to hamish:
Hi,
[latest 6.5.svn nightly binary, r43490]
running the wx GUI File > Import raster > WMS import tool on WinGrass pops up an error (see attached screenshot) and leaves this in the gis manager output tab:
Traceback (most recent..last): File "C:\Program Files\GRASS-65-SVN\etc\wxpython\gui_modul es\ogc_services.py", line 184, in OnConnect key, value = line.split(':', 1) ValueError : need more than 1 value to unpack?
thanks, Hamish
AFAICT wget seems to be missing in the nightly WinGrass-build-environment.
see from the command line:
GRASS 6.5> r.in.wms output=elevation_meters2 mapserver=http://wms.jpl.nasa.gov /wms.cgi layers=us_ned styles=real -o which: wget: unknown command which: wget: unknown command Calculating tiles Requesting 1 tiles. which: wget: unknown command which: wget: unknown command Downloading tiles file: could not find any magic files! Downloading data All tiles downloaded successfully file: could not find any magic files! ERROR 4: Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files. ERROR 1: Translating source or target SRS failed: EPSG:4326 FEHLER: Program: gdalwarp failure. FEHLER: r.in.gdalwarp failed
as I remember correctly some time ago I've added wget to my WinGrass-build-environment.
if I copy wget and its dependecies from my WinGrass-build-environment to C:\Program Files\GRASS-65-SVN\extrabin I get following message:
GRASS 6.5> r.in.wms output=elevation_meters3 mapserver=http://wms.jpl.nasa.gov /wms.cgi layers=us_ned styles=real -o Calculating tiles Requesting 1 tiles. Downloading tiles file: could not find any magic files! Downloading data SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:/progra~1/wget/etc/wgetrc 2010-09-19 12:38:07 URL:http://wms.jpl.nasa.gov/wms.cgi [935395] -> "C:/gisdata /grassdata/wms_download/elevation_meters3__0.geotiff" [1] All tiles downloaded successfully file: could not find any magic files! ERROR 4: Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files. ERROR 1: Translating source or target SRS failed: EPSG:4326 FEHLER: Program: gdalwarp failure. FEHLER: r.in.gdalwarp failed
and thats the same message like in my own WinGrass64-build.
Helmut
follow-ups: 4 5 6 comment:3 by , 14 years ago
comment:4 by , 14 years ago
by , 14 years ago
Attachment: | WinGrass65_wms_import_19092010_125354.png added |
---|
Error message after manually copy of wget and libxml2 to C:\Program Files\GRASS-65-SVN\extrabin
comment:5 by , 14 years ago
follow-up: 7 comment:6 by , 14 years ago
Replying to hellik:
AFAICT wget seems to be missing in the nightly WinGrass-build-environment.
and the same seems to be with libxml2.dll
that should be ok, you can ignore those. it automatically swaps over to curl if wget isn't there, and it automatically swaps over to our own parsing if xml2.exe isn't there. the only reason you see those messages is because "which" on Windows is more noisy than in Gnu/Linux.
if you think the "which: {wget|xml2}: unknown command" messages are a big problem we can probably send them to /dev/null.
Hamish
follow-ups: 8 12 comment:7 by , 14 years ago
Replying to hamish:
Replying to hellik:
AFAICT wget seems to be missing in the nightly WinGrass-build-environment.
and the same seems to be with libxml2.dll
that should be ok, you can ignore those. it automatically swaps over to curl if wget isn't there, and it automatically swaps over to our own parsing if xml2.exe isn't there. the only reason you see those messages is because "which" on Windows is more noisy than in Gnu/Linux.
if you think the "which: {wget|xml2}: unknown command" messages are a big problem we can probably send them to /dev/null.
Hamish
FYI what I have done to bring r.in.wms at least at msys-command-line of the latest WinGrass65-nightly build to run:
(1) copied wget to C:\Program Files\GRASS-65-SVN\bin
(2) copied the content from C:\OSGeo4W\share\gdal to C:\Program Files\GRASS-65-SVN\share\gdal
(3) in C:\Program Files\GRASS-65-SVN\bin there lives grass65svn, dynamically created by the WinGrass-Installer and started by the icon WinGrass65+msys, and I've set there GDAL_DATA (see down there):
#! /bin/sh ######################################################################### # # File dynamically created by NSIS installer script; # Written by Marco Pasetti; # ######################################################################### # # MODULE: GRASS Initialization # AUTHOR(S): Justin Hickey - Thailand - jhickey@hpcc.nectec.or.th # PURPOSE: The source file for this shell script is in # lib/init/grass.src and is the grass startup script. It # requires a source file because the definition of GISBASE # is not known until compile time and is substituted from the # Makefile. Any command line options are passed to Init.sh. # COPYRIGHT: (C) 2000-2010 by the GRASS Development Team # # This program is free software under the GNU General Public # License (>=v2). Read the file COPYING that comes with GRASS # for details. # ######################################################################### # # Modified by Marco Pasetti # added the export PATH instruction to let GRASS work from # the MSYS environment in the dynamic NSIS installation # ######################################################################### trap "echo 'User break!' ; exit" 2 3 9 15 # Set the GISBASE variable GISBASE="/C/Program Files/GRASS-65-SVN" export GISBASE # Set the PATH variable PATH="$GISBASE/extrabin:$GISBASE/extralib:$PATH" PATH="$GISBASE/tcl-tk/bin:$GISBASE/sqlite/bin:$GISBASE/gpsbabel:$PATH" export PATH # Set the PYTHONPATH variable PYTHONPATH="$GISBASE/etc/python:$GISBASE/Python25:$PYTHONPATH" export PYTHONPATH PYTHONHOME="C:\Program Files\GRASS-65-SVN\Python25" export PYTHONHOME if [ -z "$GRASS_PYTHON" ] ; then GRASS_PYTHON=python export GRASS_PYTHON fi # Set the GRASS_PROJSHARE variable GRASS_PROJSHARE="C:\Program Files\GRASS-65-SVN\proj" export GRASS_PROJSHARE GDAL_DATA="C:\Program Files\GRASS-65-SVN\share\gdal" export GDAL_DATA exec "$GISBASE/etc/Init.sh" "$@"
(4)and at least the example from the manpage for LANDSAT from OnEarth server download is working in the WinGrass65-delivered msys-commandline is working:
GRASS 6.5> r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms .cgi output=wms_global_mosaic Calculating tiles Requesting 1 tiles. Downloading tiles file: could not find any magic files! Downloading data SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:/progra~1/wget/etc/wgetrc 2010-09-19 14:13:01 URL:http://wms.jpl.nasa.gov/wms.cgi [932783] -> "C:/gisdata /grassdata/wms_download/wms_global_mosaic__0.geotiff" [1] All tiles downloaded successfully file: could not find any magic files! Creating output file that is 507P x 459L. Processing input file C:\gisdata\grassdata/wms_download/wms_global_mosaic__0.ge otiff. 0...10...20...30...40...50...60...70...80...90...100 - done. Rename raster <wms_global_mosaic_tile_0.alpha> to <wms_global_mosaic.alpha> Rename raster <wms_global_mosaic_tile_0.blue> to <wms_global_mosaic.blue> Rename raster <wms_global_mosaic_tile_0.green> to <wms_global_mosaic.green> Rename raster <wms_global_mosaic_tile_0.red> to <wms_global_mosaic.red> Building Color Image Erstelle Farbtabelle für Ausgabe-Rasterkarte... 100% Schreibe Rasterkarte <wms_global_mosaic>... 100% r.composite komplett. Rasterkarte <wms_global_mosaic> erzeugt. Written: wms_global_mosaic
so maybe share/gdal should also be included in the WinGrass-installer?
Helmut
follow-up: 9 comment:8 by , 14 years ago
Replying to hellik:
FYI what I have done to bring r.in.wms at least at msys-command-line of the latest WinGrass65-nightly build to run:
forgotten to mention it's inside the nc-sample-dataset and following examples from the manual are working:
NASA OnEarth server: Get Capabilities Request US NED Elevation from OnEarth server download (metric units) LANDSAT from OnEarth server download
Helmut
follow-up: 10 comment:9 by , 14 years ago
Replying to hellik:
Replying to hellik:
FYI what I have done to bring r.in.wms at least at msys-command-line of the latest WinGrass65-nightly build to run:
forgotten to mention it's inside the nc-sample-dataset and following examples from the manual are working:
NASA OnEarth server: Get Capabilities Request US NED Elevation from OnEarth server download (metric units) LANDSAT from OnEarth server download
Helmut
FYI and with the above addition, also r.in.wms in WinGrass64-release is working:
GRASS 6.4> r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi output=wms_global_mosaic_G64 Calculating tiles Requesting 1 tiles. Downloading tiles file: could not find any magic files! Downloading data SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:/progra~1/wget/etc/wgetrc 2010-09-19 15:24:04 URL:http://wms.jpl.nasa.gov/wms.cgi [932783] -> "C:/gisdata/grassdata/wms_download/wms_global_mosaic_G64__0.geotiff" [1] All tiles downloaded successfully file: could not find any magic files! Creating output file that is 507P x 459L. Processing input file C:\gisdata\grassdata/wms_download/wms_global_mosaic_G64__0.geotiff. 0...10...20...30...40...50...60...70...80...90...100 - done. Rename raster <wms_global_mosaic_G64_tile_0.alpha> to <wms_global_mosaic_G64.alpha> Rename raster <wms_global_mosaic_G64_tile_0.blue> to <wms_global_mosaic_G64.blue> Rename raster <wms_global_mosaic_G64_tile_0.green> to <wms_global_mosaic_G64.green> Rename raster <wms_global_mosaic_G64_tile_0.red> to <wms_global_mosaic_G64.red> Building Color Image Erstelle Farbtabelle für Ausgabe-Rasterkarte... 100% Schreibe Rasterkarte <wms_global_mosaic_G64>... 100% r.composite komplett. Rasterkarte <wms_global_mosaic_G64> erzeugt. Written: wms_global_mosaic_G64
Helmut
comment:10 by , 14 years ago
Replying to hellik:
Replying to hellik:
Replying to hellik:
FYI what I have done to bring r.in.wms at least at msys-command-line of the latest WinGrass65-nightly build to run:
forgotten to mention it's inside the nc-sample-dataset and following examples from the manual are working:
NASA OnEarth server: Get Capabilities Request US NED Elevation from OnEarth server download (metric units) LANDSAT from OnEarth server download
Helmut
FYI and with the above addition, also r.in.wms in WinGrass64-release is working:
GRASS 6.4> r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi output=wms_global_mosaic_G64 Calculating tiles Requesting 1 tiles. Downloading tiles file: could not find any magic files! Downloading data SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:/progra~1/wget/etc/wgetrc 2010-09-19 15:24:04 URL:http://wms.jpl.nasa.gov/wms.cgi [932783] -> "C:/gisdata/grassdata/wms_download/wms_global_mosaic_G64__0.geotiff" [1] All tiles downloaded successfully file: could not find any magic files! Creating output file that is 507P x 459L. Processing input file C:\gisdata\grassdata/wms_download/wms_global_mosaic_G64__0.geotiff. 0...10...20...30...40...50...60...70...80...90...100 - done. Rename raster <wms_global_mosaic_G64_tile_0.alpha> to <wms_global_mosaic_G64.alpha> Rename raster <wms_global_mosaic_G64_tile_0.blue> to <wms_global_mosaic_G64.blue> Rename raster <wms_global_mosaic_G64_tile_0.green> to <wms_global_mosaic_G64.green> Rename raster <wms_global_mosaic_G64_tile_0.red> to <wms_global_mosaic_G64.red> Building Color Image Erstelle Farbtabelle für Ausgabe-Rasterkarte... 100% Schreibe Rasterkarte <wms_global_mosaic_G64>... 100% r.composite komplett. Rasterkarte <wms_global_mosaic_G64> erzeugt. Written: wms_global_mosaic_G64Helmut
for WinGrass64 I've forgotten, the files in C:\Program Files\GRASS-64H\etc\r.in.wms: r.in.gdalwarp, wms.download, wms.request have to be copied in wms.request in order to be get r.in.wms running at least in the WinGrass-delivered-msys-command-line.
so there are only a few steps to get r.in.wms running in WinGrass64/WinGrass65.
any review, advice which would be the best way?
best regards Helmut
comment:11 by , 14 years ago
Keywords: | r.in.wms added |
---|
So this was added to C:\Program Files\GRASS-65-SVN\bin\grass65svn[.sh]:
# Set the GRASS_PROJSHARE variable GRASS_PROJSHARE="C:\Program Files\GRASS-65-SVN\proj" export GRASS_PROJSHARE +GDAL_DATA="C:\Program Files\GRASS-65-SVN\share\gdal" +export GDAL_DATA
by way of editing mswindows/GRASS-Installer.nsi?
how about osgeo4w/ini.bat.tmpl?
how about FileWrite $0 'set GRASS_PROJSHARE=%GRASSDIR%\proj$\r$\n'
for grass_command.bat? (GRASS-Installer.nsi)
please forget about r.in.wms for 6.4, that code has other problems and will be replaced soon by what is in 6.5. So 6.5svn needs to be the focus of testing.
curl is already present so wget should not be needed at all.
(fwiw this bug report was supposed to be for the wx etc\wxpython\gui_modules\ogc_services.py component, the main r.in.wms-fails-on-WinGrass bug report is #820)
thanks! Hamish
follow-up: 13 comment:12 by , 14 years ago
Replying to hellik:
(2) copied the content from C:\OSGeo4W\share\gdal to C:\Program Files\GRASS-65-SVN\share\gdal
what files are in that dir?
Hamish
comment:13 by , 14 years ago
Replying to hamish:
Replying to hellik:
(2) copied the content from C:\OSGeo4W\share\gdal to C:\Program Files\GRASS-65-SVN\share\gdal
what files are in that dir?
Hamish
Replying to hamish:
So this was added to C:\Program Files\GRASS-65-SVN\bin\grass65svn[.sh]:
# Set the GRASS_PROJSHARE variable GRASS_PROJSHARE="C:\Program Files\GRASS-65-SVN\proj" export GRASS_PROJSHARE +GDAL_DATA="C:\Program Files\GRASS-65-SVN\share\gdal" +export GDAL_DATAby way of editing mswindows/GRASS-Installer.nsi?
how about osgeo4w/ini.bat.tmpl?
how about
FileWrite $0 'set GRASS_PROJSHARE=%GRASSDIR%\proj$\r$\n'
for grass_command.bat? (GRASS-Installer.nsi)please forget about r.in.wms for 6.4, that code has other problems and will be replaced soon by what is in 6.5. So 6.5svn needs to be the focus of testing.
curl is already present so wget should not be needed at all.
(fwiw this bug report was supposed to be for the wx etc\wxpython\gui_modules\ogc_services.py component, the main r.in.wms-fails-on-WinGrass bug report is #820)
thanks! Hamish
Hi Hamish,
ok, I remember #820, but for completness see r43520, r.in.wms in WinGrass65 should work now. the GDAL_DATA variable was missing that gdalwarp can't work.
I've compared share/gdal with C:\Program Files\GRASS-64\etc\ogr_csv, so these files are needed for the gdal-utilities. in r43520 I've used that versions living in GRASS-64\etc\ogr_csv, because these are the ones beeing used by grass64 for creating locations and are in sync with the source.
this fix can also be applied to Grass64. the only thing - after applying the fix of WinGrass65 - in WinGrass64 is, that the helper-scripts in C:\Program Files\GRASS-64\etc\r.in.wms aren't found (in the path?). if you copy these files in C:\Program Files\GRASS-64\scripts, also r.in.wms in WinGrass64 is working with all the examples in the man-page. :o) so IMHO the only issue for WinGrass64, which should be fixed, is that the helper-scripts are recognized.
AFAIK in the background of the wx-WMS import tool of WinGrass65, there is r.in.wms working, which is not so much different if Grass64-r.in.wms.
I'll add the information also to #820.
best regards Helmut
comment:14 by , 14 years ago
Keywords: | wingrass added |
---|
comment:16 by , 11 years ago
Keywords: | r.in.wms[.py] added; r.in.wms removed |
---|---|
Milestone: | 6.4.1 → 6.4.3 |
Priority: | normal → major |
Yes, the wx WMS import tool still fails out of the gate on wingrass. tested with 6.5svn nightly build.
- File -> Import raster -> WMS
- Mapserver:
http://mapserver.flightgear.org/ms?
- Press the [Connect] button.
- nothing happens, this shows up in the wx layer manager's command output window:
Traceback (most recent call last): File "c:\Program Files\GRASS GIS 6.5.svn\etc\wxpython\modules\ogc_services.py", line 204, in OnConnect self.list.LoadData(layers) File "c:\Program Files\GRASS GIS 6.5.svn\etc\wxpython\modules\ogc_services.py", line 259, in LoadData title = data[layer]['title'] KeyError : 'title'
Hamish
comment:17 by , 11 years ago
Keywords: | r.in.wms added; r.in.wms[.py] removed |
---|
the 'title' error happens when xml2
is not installed and r.in.wms[.sh] reverts to its internal parsing method. see #820.
comment:18 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I get a similar error in the grass7 wxGUI command console on linux.
Hamish