[GRASS-dev] replace r.in.wms by r.in.wms2 (in trunk)

Hi all,

I would like to suggest to replace `r.in.wms` module available in
trunk by the new python module `r.in.wms2` (which is currently
available from addons [1]). This module has been recently developed by
Stepan Turek within his bachelor thesis. The module `r.in.wms` (in
trunk) is just pythonized original solution (bunch of shell scripts)
from GRASS 6. Stepan developed the new GRASS module in Python from
scratch mainly because the fact that original code of `r.in.wms` is
quite messy, and very hard to maintain [2]. Moreover `r.in.wms` is not
working in many cases. New `r.in.wms2` is using GDAL WMS driver (by
default), also non-GDAL based method (as `r.in.wms` does) is
implemented.

Let me know in the case of any objections or comments.

Thanks, Martin

[1] http://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.in.wms2
[2] http://trac.osgeo.org/grass/browser/grass/trunk/scripts/r.in.wms

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

Martin wrote:

I would like to suggest to replace `r.in.wms` module
available in trunk by the new python module `r.in.wms2`
(which i currently available from addons [1]).

I haven't tested it, but in general this sounds like a good
idea to me.

Note the OnEarth WMS server in the examples page is now tiled-WMS
only, so perhaps not a good general purpose example anymore.

(see recently updated r.in.onearth(.sh) in grass6 addons for
pre-tiled WMS support)

Hamish

Hi,

2012/6/27 Martin Landa <landa.martin@gmail.com>:

I would like to suggest to replace `r.in.wms` module available in
trunk by the new python module `r.in.wms2` (which is currently
available from addons [1]). This module has been recently developed by

so, I have replaced original `r.in.wms` module in trunk by `r.in.wms2`
from addons (r52470). To enable testing this module also in GRASS 6
it's available as add-ons (r52469). You can install it using wxGUI
add-ons installer (Settings -> Install extension from addons | Fetch |
choose r.in.wms2). Note that `g.extension` from command line (bash
version) will not work. Then simply run `r.in.wms2.py` instead of
`r.in.wms`.

Enjoy the new `r.in.wms` module thanks to work done by Stepan Turek.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

To enable testing...

tested here with osgeo4w-wingrass7, r52472, win7-64bit(german) and the
examples from the manual [1], region is set to greater alpine region in
europe:

g.region -p
projection: 3 (Latitude-Longitude)
zone: 0
datum: wgs84
ellipsoid: wgs84
north: 48:30:07N
south: 43:02:59.5N
west: 4:46:59.5E
east: 17:00:07E
nsres: 0:00:07.5
ewres: 0:00:07.5
rows: 2617
cols: 5865
cells: 15348705

r.in.wms.py mapserver=http://iceds.ge.ucl.ac.uk/cgi-bin/icedswms
layers=landsat_1_01 styles=default,default output=landsat srs=4326
format=png
Traceback (most recent call last):
  File "r.in.wms.py", line 163, in <module>
    sys.exit(main())
  File "r.in.wms.py", line 151, in main
    from wms_gdal_drv import WMSGdalDrv
  File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\r.in.wms\wms
_gdal_drv.py", line 7, in <module>
    grass.fatal(_("Unable to load GDAL Python bindings"))
NameError: name 'grass' is not defined
(Mon Jul 30 23:54:02 2012) Command finished (0 sec)
   
r.in.wms.py mapserver=http://132.156.97.59/cgi-bin/worldmin_en-ca_ows
layers=GSC:WORLD_PrecambrianDomains output=pokus srs=4326 format=jpeg
Traceback (most recent call last):
  File "r.in.wms.py", line 163, in <module>
    sys.exit(main())
  File "r.in.wms.py", line 151, in main
    from wms_gdal_drv import WMSGdalDrv
  File "C:\OSGeo4W\apps\grass\grass-7.0.svn\etc\r.in.wms\wms
_gdal_drv.py", line 7, in <module>
    grass.fatal(_("Unable to load GDAL Python bindings"))
NameError: name 'grass' is not defined

[1] http://grass.osgeo.org/grass70/manuals/html70_user/r.in.wms.html

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/replace-r-in-wms-by-r-in-wms2-in-trunk-tp4984318p4991974.html
Sent from the Grass - Dev mailing list archive at Nabble.com.