[Thuban-commits] r2904 - in trunk/thuban: . Extensions/wms
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 5 16:33:42 CEST 2013
Author: bernhard
Date: 2013-09-05 16:33:42 +0200 (Thu, 05 Sep 2013)
New Revision: 2904
Modified:
trunk/thuban/ChangeLog
trunk/thuban/Extensions/wms/layer.py
Log:
Extensions/wms/layer.py : Beautifying: made variable names more expressive
at two places (a change that Didrik hat done for the 1.2.2 tarball only)
some superfluous whitespace and old cvs tags removed
Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog 2011-07-15 13:01:48 UTC (rev 2903)
+++ trunk/thuban/ChangeLog 2013-09-05 14:33:42 UTC (rev 2904)
@@ -1,3 +1,9 @@
+2013-09-05 Bernhard Reiter <bernhard at intevation.de>
+
+ * Extensions/wms/layer.py : Beautifying: made variable names more expressive
+ at two places (a change that Didrik hat done for the 1.2.2 tarball only)
+ some superfluous whitespace and old cvs tags removed
+
2009-08-26 Bram de Greve <bram.degreve at bramz.net>
* Reintegrating WIP-pyshapelib-Unicode branch (r2888) in trunk
Modified: trunk/thuban/Extensions/wms/layer.py
===================================================================
--- trunk/thuban/Extensions/wms/layer.py 2011-07-15 13:01:48 UTC (rev 2903)
+++ trunk/thuban/Extensions/wms/layer.py 2013-09-05 14:33:42 UTC (rev 2904)
@@ -49,8 +49,6 @@
"""
__version__ = "$Revision$"
-# $Source$
-# $Id$
from Thuban import internal_from_unicode, _
@@ -111,23 +109,23 @@
ThubanEndBusyCursor()
# name of the top layer of the remote map
- foo = list(self.wmsserver.contents)
- if len(foo) == 0:
+ layers = list(self.wmsserver.contents)
+ if len(layers) == 0:
self.error_msg = _('No layers found in remote resource:\n'\
'%s') % url
return
- top_layer = foo[0]
+ top_layer = layers[0]
self.wms_layers = [top_layer]
# first projection of the top layer
- foo = self.wmsserver[top_layer].crsOptions
- if len(foo) == 0:
+ crs = self.wmsserver[top_layer].crsOptions
+ if len(crs) == 0:
self.error_msg = _('No LatLonBoundingBox found for top layer %s')\
% top_layer
return
# extract only the EPSG code from the EPSG string
# received 'EPSG:4326' but keep only '4326'
- top_srs = foo[0].split(':')[1]
+ top_srs = crs[0].split(':')[1]
# LatLonBox of the top layer
bbox = self.wmsserver.contents[top_layer].boundingBoxWGS84
@@ -135,7 +133,7 @@
float(bbox[1]),
float(bbox[2]),
float(bbox[3]))
-
+
# BoundingBox of the top layer
# Do we really need to know the bbox not in WGS84 ?
bbox = self.wmsserver.contents[top_layer].boundingBox
@@ -216,7 +214,7 @@
return fmap[f]
return None
-
+
def calcFormat(self, formats):
"""
Calculate the preferred image format
@@ -243,8 +241,8 @@
if f.lower().find('wbmp') == -1:
return f, self.getFormat(f)
return None, None
-
+
def getFormats(self):
"""
Return the list of supported image formats by the WMS server
@@ -353,7 +351,7 @@
format=self.wmsformat,
transparent=False)
self.cached_response = wms_response.read()
-
+
ThubanEndBusyCursor()
-
+
return self.cached_response , self.format
More information about the Thuban-commits
mailing list