jschuengel: thuban/Extensions/umn_mapserver mapfile.py,1.7,1.8
cvs@intevation.de
cvs at intevation.de
Thu Jul 15 16:31:39 CEST 2004
Author: jschuengel
Update of /thubanrepository/thuban/Extensions/umn_mapserver
In directory doto:/tmp/cvs-serv5238
Modified Files:
mapfile.py
Log Message:
Added a function to get the mappath directly from the mapobj. Is needed becaus of the changes in mf_import.py.
(MF_Layer.add_thubanclass): Added a new comment.
(MF_Map.set_extent): Fixed a bug with exporting empty mapobj. If the mapobj is empty there is no extent get from thuban an so no one can set to th mapobj.
Index: mapfile.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/umn_mapserver/mapfile.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mapfile.py 14 Jul 2004 10:38:08 -0000 1.7
+++ mapfile.py 15 Jul 2004 14:31:37 -0000 1.8
@@ -622,7 +622,9 @@
elif isinstance(tb_class, ClassGroupSingleton):
new_class.set_name(str(tb_class.GetValue()))
else:
- # TODO: set a name if the expression is a ogical
+ # TODO: set a name if the expression is a logical
+ # if it is an logical expression and no name is set,
+ # the final name will be set after expression is created
new_class.set_name("no name")
if self.get_type() == "line":
new_class.add_thubanstyle(tb_class.GetProperties(), type="line")
@@ -686,6 +688,7 @@
self._range_op1 + " " +\
self._range_combine + \
self._range_op2 + " )"
+
#set the expression to the mapscript
new_class.set_expressionstring(self._range_umn)
else:
@@ -876,6 +879,12 @@
self._metadata.add_metadata(self._metafkey,self._metakeydata)
self._metafkey = self._mf_map.getNextMetaDataKey(self._metafkey)
+
+ def get_mappath(self):
+ return self._mf_map.mappath
+
+
+
def get_outputformat(self):
return self._outputformat
@@ -961,10 +970,12 @@
print "define the size first to set extent"
print "size is now set to (1,1)"
self.set_size(1,1)
- self._newrect = MF_Rectangle(rectObj(newextent[0],newextent[1], \
- newextent[2],newextent[3]))
- self._mf_map.setExtent(newextent[0],newextent[1], \
- newextent[2],newextent[3])
+ # if an empty map is export newextent will be none
+ if newextent:
+ self._newrect = MF_Rectangle(rectObj(newextent[0],newextent[1], \
+ newextent[2],newextent[3]))
+ self._mf_map.setExtent(newextent[0],newextent[1], \
+ newextent[2],newextent[3])
def set_size(self, newwidth, newheight):
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)