joey: thuban/Extensions/wms parser.py,1.7,1.8
cvs@intevation.de
cvs at intevation.de
Tue Apr 13 19:05:58 CEST 2004
Author: joey
Update of /thubanrepository/thuban/Extensions/wms
In directory doto:/tmp/cvs-serv3336
Modified Files:
parser.py
Log Message:
Added rudimentary support for non-EPSG SRS, i.e. ignore them for the
moment by placing them into a variable which is currently unused.
Also test whether the EPSG SRS is numerical as it should be and add an
error message if it is not.
Index: parser.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/parser.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- parser.py 13 Apr 2004 16:42:48 -0000 1.7
+++ parser.py 13 Apr 2004 17:05:56 -0000 1.8
@@ -170,9 +170,22 @@
if srs[0:5] == 'EPSG:':
srs = srs[5:]
try:
- self.layers[index]['srs'].append(srs)
- except KeyError:
- self.layers[index]['srs'] = [srs]
+ int(srs)
+ try:
+ self.layers[index]['srs'].append(srs)
+ except KeyError:
+ self.layers[index]['srs'] = [srs]
+ except ValueError:
+ if srs[0:4].upper() == 'AUTO' \
+ or srs[0:4].upper() == 'NONE':
+ try:
+ self.layers[index]['_srs_'].append(srs)
+ except KeyError:
+ self.layers[index]['_srs_'] = [srs]
+ else:
+ self.error.append(_("SRS '%s' is not numerical and not"
+ " AUTO/NONE in layer '%s'") \
+ % (srs, self.layers[index]['title']))
foo = getElementByName(top, 'LatLonBoundingBox')
if foo is not None:
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)