jschuengel: thuban/Extensions/umn_mapserver mf_import.py,1.4,1.5
cvs@intevation.de
cvs at intevation.de
Tue Jul 6 16:31:30 CEST 2004
Author: jschuengel
Update of /thubanrepository/thuban/Extensions/umn_mapserver
In directory doto:/tmp/cvs-serv4595
Modified Files:
mf_import.py
Log Message:
Added code to import the status of the Classes.
Fixed a bug with the projection. Now the to_meter parameter will be added to the Projection only if it doesn't exists.
Index: mf_import.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/umn_mapserver/mf_import.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mf_import.py 1 Jul 2004 14:36:37 -0000 1.4
+++ mf_import.py 6 Jul 2004 14:31:28 -0000 1.5
@@ -246,6 +246,7 @@
if clazz_name == None:
clazz_name = ""
new_group = ClassGroupDefault(props = prop, label = clazz_name)
+ new_group.SetVisible(map_clazz.get_status())
clazz.SetDefaultGroup(new_group)
defaultclazzset = True
# break, because alle classes behind the one which definies the
@@ -270,9 +271,11 @@
new_group = ClassGroupSingleton(value = theexpression,
props = prop,
label = clazz_name)
+ new_group.SetVisible(map_clazz.get_status())
clazz.AppendGroup(new_group)
else:
new_group = ClassGroupSingleton( props = prop, label = clazz_name)
+ new_group.SetVisible(map_clazz.get_status())
clazz.AppendGroup(new_group)
# if there is no default layer set,
@@ -331,11 +334,16 @@
projparams = mapobj.get_projection().get_params()
# check if it is an latlong projection, becaues one
# more parameter is needed in that case
+ addtometer = False
for param in projparams:
projkey = param.split("=")
if projkey[0] == "proj":
if projkey[1] == "latlong":
- projparams.append("to_meter=0.017453")
+ addtometer = True
+ if projkey[0] == "to_meter":
+ addtometer = False
+ if addtometer == True:
+ projparams.append("to_meter=0.017453")
tb_con.SetProjection(Projection(projparams))
if mapobj.get_projection().get_epsgcode() != None:
projepsg = mapobj.get_projection().get_epsgproj()
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)