|
@@ -113,6 +113,10 @@ class WMSGdalDrv(WMSBase):
|
|
block_size_y = etree.SubElement(gdal_wms, "BlockSizeY")
|
|
block_size_y = etree.SubElement(gdal_wms, "BlockSizeY")
|
|
block_size_y.text = str(self.tile_size['rows'])
|
|
block_size_y.text = str(self.tile_size['rows'])
|
|
|
|
|
|
|
|
+ if self.params['username'] and self.params['password']:
|
|
|
|
+ user_password = etree.SubElement(gdal_wms, "UserPwd")
|
|
|
|
+ user_password.text = "%s:%s" % (self.params['username'], self.params['password'])
|
|
|
|
+
|
|
xml_file = self._tempfile()
|
|
xml_file = self._tempfile()
|
|
|
|
|
|
etree.ElementTree(gdal_wms).write(xml_file)
|
|
etree.ElementTree(gdal_wms).write(xml_file)
|
|
@@ -137,11 +141,15 @@ class WMSGdalDrv(WMSBase):
|
|
"geographic projection, \n try 'WMS_GRASS' driver or use WMS version 1.1.1."))
|
|
"geographic projection, \n try 'WMS_GRASS' driver or use WMS version 1.1.1."))
|
|
|
|
|
|
self._debug("_download", "started")
|
|
self._debug("_download", "started")
|
|
-
|
|
|
|
temp_map = self._tempfile()
|
|
temp_map = self._tempfile()
|
|
|
|
|
|
xml_file = self._createXML()
|
|
xml_file = self._createXML()
|
|
|
|
|
|
|
|
+ # print xml file content for debug level 1
|
|
|
|
+ file = open(xml_file, "r")
|
|
|
|
+ grass.debug("WMS request XML:\n%s" % file.read(), 1)
|
|
|
|
+ file.close()
|
|
|
|
+
|
|
if self.proxy:
|
|
if self.proxy:
|
|
gdal.SetConfigOption('GDAL_HTTP_PROXY', str(self.proxy))
|
|
gdal.SetConfigOption('GDAL_HTTP_PROXY', str(self.proxy))
|
|
if self.proxy_user_pw:
|
|
if self.proxy_user_pw:
|