russell: thuban/Thuban/UI mainwindow.py,1.137,1.138
cvs@intevation.de
cvs at intevation.de
Thu Jan 20 18:55:25 CET 2005
Author: russell
Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv32440/Thuban/UI
Modified Files:
mainwindow.py
Log Message:
Warn user about misprojected layers when their lat/lon bounding
box exceeds rational lat/lon values.
Index: mainwindow.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/mainwindow.py,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -d -r1.137 -r1.138
--- mainwindow.py 11 Jan 2005 16:52:40 -0000 1.137
+++ mainwindow.py 20 Jan 2005 17:55:23 -0000 1.138
@@ -340,6 +340,19 @@
text = "(%10.10g, %10.10g)" % pos
else:
text = ""
+ map = self.canvas.Map()
+ for layer in map.layers:
+ bbox = layer.LatLongBoundingBox()
+ if bbox:
+ left, bottom, right, top = bbox
+ if not (-180 <= left <= 180 and
+ -180 <= right <= 180 and
+ -90 <= top <= 90 and
+ -90 <= bottom <= 90):
+ text = ("Select '"+layer.title+"' and pick a " +
+ "projection using Layer/Projection...")
+ break
+
self.set_position_text(text)
def set_position_text(self, text):
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)