[GRASS-SVN] r37059 - grass/trunk/scripts/r.in.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 8 16:43:05 EDT 2009
Author: martinl
Date: 2009-05-08 16:43:05 -0400 (Fri, 08 May 2009)
New Revision: 37059
Modified:
grass/trunk/scripts/r.in.wms/r.in.wms.py
grass/trunk/scripts/r.in.wms/wms_download.py
Log:
r.in.wms: fix get method
Modified: grass/trunk/scripts/r.in.wms/r.in.wms.py
===================================================================
--- grass/trunk/scripts/r.in.wms/r.in.wms.py 2009-05-08 20:19:30 UTC (rev 37058)
+++ grass/trunk/scripts/r.in.wms/r.in.wms.py 2009-05-08 20:43:05 UTC (rev 37059)
@@ -222,17 +222,17 @@
if options['region']:
if not grass.find_file(name = options['region'], element = 'windows')['name']:
grass.fatal("Region <%s> not found" % options['region'])
-
+
+ request = wms_request.WMSRequest(flags, options)
if not flags['d']:
# request data first
- request = wms_request.WMSRequest(flags, options)
request.GetTiles()
- if not request:
- grass.fatal("WMS request failed")
+ if not request:
+ grass.fatal("WMS request failed")
# download data
download = wms_download.WMSDownload(flags, options)
- download.GetTiles(request.GetRequests()) ## ??
+ download.GetTiles(request.GetRequests())
# list of files
files = []
Modified: grass/trunk/scripts/r.in.wms/wms_download.py
===================================================================
--- grass/trunk/scripts/r.in.wms/wms_download.py 2009-05-08 20:19:30 UTC (rev 37058)
+++ grass/trunk/scripts/r.in.wms/wms_download.py 2009-05-08 20:43:05 UTC (rev 37059)
@@ -42,7 +42,7 @@
"""Download data"""
grass.message("Downloading data (tile %d)..." % idx)
grass.verbose("Requesting data: %s" % self.options['mapserver'])
-
+
if not self.flags['g']: # -> post
try:
urllib.urlretrieve(server, output, data = query)
@@ -60,7 +60,7 @@
if self.flags['g']: # -> get
try:
- urllib.urlretrieve(url, output, data="GET")
+ urllib.urlretrieve(server + '?' + query, output, data = None)
except IOError:
grass.fatal("Failed while downloading the data")
More information about the grass-commit
mailing list