[Greater-commits] r3644 - in branches/3.0.0-all-models/GREAT-ER: . Greater/Dialogs Greater/Modules Greater/UI
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jul 25 15:06:24 CEST 2011
Author: aheinecke
Date: 2011-07-25 15:06:19 +0200 (Mon, 25 Jul 2011)
New Revision: 3644
Modified:
branches/3.0.0-all-models/GREAT-ER/
branches/3.0.0-all-models/GREAT-ER/ChangeLog
branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/opensession.py
branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py
branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py
Log:
Recorded merge of revisions 228 via svnmerge from
svn+ssh://wald.intevation.org/greater/trunk/GREAT-ER
........
r228 | aheinecke | 2011-06-22 09:58:00 +0200 (Wed, 22 Jun 2011) | 2 lines
Update greater so that the postgresbackend can be used
........
Property changes on: branches/3.0.0-all-models/GREAT-ER
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/GREAT-ER:1-227
+ /trunk/GREAT-ER:1-228
Modified: branches/3.0.0-all-models/GREAT-ER/ChangeLog
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/ChangeLog 2011-07-25 10:12:43 UTC (rev 3643)
+++ branches/3.0.0-all-models/GREAT-ER/ChangeLog 2011-07-25 13:06:19 UTC (rev 3644)
@@ -1,3 +1,9 @@
+2011-07-25 Andre Heinecke <aheinecke at intevation.de>
+
+ * Greater/UI/application.py: Use _dagreater_pg as default backend
+ * Greater/Modules/analysis.py: Change classnames to Thuban 1.2 names
+ * Greater/Dialogs/opensession.py: Add encoding line
+
2006-05-10 Frank Koormann <frank at intevation.de>
* Greater/version.py: Updated version to 2.1.0.
Modified: branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/opensession.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/opensession.py 2011-07-25 10:12:43 UTC (rev 3643)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/Dialogs/opensession.py 2011-07-25 13:06:19 UTC (rev 3644)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright (c) 2002 by Intevation GmbH
# Authors:
# Jan-Oliver Wagner <jan at intevation.de>
Modified: branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py 2011-07-25 10:12:43 UTC (rev 3643)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/Modules/analysis.py 2011-07-25 13:06:19 UTC (rev 3644)
@@ -24,12 +24,11 @@
from Thuban.UI.command import registry, Command, ToolCommand
from Thuban.UI.mainwindow import make_check_current_tool
-from Thuban.UI.view import Tool
+from Thuban.UI.view import CanvasPanTool
from Thuban.Model.color import Color
from Thuban.Model.layer import Layer
-from Thuban.Model.classgen import GenUniformDistribution, GenQuantiles, \
- GenSingletonsFromList, GreenToRedRamp, \
- GenQuantiles0
+from Thuban.Model.classgen import generate_uniform_distribution, generate_quantiles, \
+ generate_singletons, green_to_red_ramp
from Thuban.Model.transientdb import AutoTransientTable, TransientJoinedTable
from Thuban.Model.data import DerivedShapeStore
from Thuban.Model.range import Range
@@ -367,9 +366,9 @@
_list.append(table.ReadValue(i, colname))
_list.sort()
- quantiles, clazz = GenQuantiles(_list,
+ quantiles, clazz = generate_quantiles(_list,
[ 0.25, 0.50, 0.75, 1.0 ],
- GreenToRedRamp(),
+ green_to_red_ramp(),
Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
@@ -468,12 +467,12 @@
_list.sort()
if class_ranges[0]:
- quantiles, clazz, upper_class0 = GenQuantiles0(_list, class_ranges,
- GreenToRedRamp(),
+ quantiles, clazz, upper_class0 = generate_quantiles0(_list, class_ranges,
+ green_to_red_ramp(),
Range(']0;oo['))
else:
- quantiles, clazz = GenQuantiles(_list, class_ranges[1:],
- GreenToRedRamp(),
+ quantiles, clazz = generate_quantiles(_list, class_ranges[1:],
+ green_to_red_ramp(),
Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
@@ -535,8 +534,8 @@
# compute the flow classes
flow_classes = {}
min, max = rivrestable.ValueRange('q_mean')
- clazz = GenUniformDistribution(min, max, num_flow_classes,
- GreenToRedRamp())
+ clazz = generate_uniform_distribution(min, max, num_flow_classes,
+ green_to_red_ramp())
for i in range(rivrestable.NumRows()):
q_mean = rivrestable.ReadValue(i, 'q_mean')
stretch_id = rivrestable.ReadValue(i, 'stretch_id')
@@ -553,8 +552,8 @@
for i in range(restable.NumRows()):
_list.append(restable.ReadValue(i, '%s_MEAN' % basename))
_list.sort()
- quantiles, clazz = GenQuantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
- GreenToRedRamp(), Range(']0;oo['))
+ quantiles, clazz = generate_quantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
+ green_to_red_ramp(), Range(']0;oo['))
for i in range(restable.NumRows()):
csim_mean = restable.ReadValue(i, '%s_MEAN' % basename)
stretch_id = restable.ReadValue(i, 'STRETCH_ID')
@@ -605,8 +604,8 @@
numGroups = num_flow_classes * num_csim_classes
_list = combined_classes_dict.keys()
_list.sort()
- clazz = GenSingletonsFromList(_list,
- numGroups, GreenToRedRamp())
+ clazz = generate_singletons(_list,
+ numGroups, green_to_red_ramp())
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetVisible(0)
@@ -971,8 +970,8 @@
'CSIMINFLUENT_MEAN'))
_list.sort()
- quantiles, clazz = GenQuantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
- GreenToRedRamp(), Range(']0;oo['))
+ quantiles, clazz = generate_quantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
+ green_to_red_ramp(), Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetLabel('0')
@@ -1039,8 +1038,8 @@
'CSIMEFFLUENT_MEAN'))
_list.sort()
- quantiles, clazz = GenQuantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
- GreenToRedRamp(), Range(']0;oo['))
+ quantiles, clazz = generate_quantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
+ green_to_red_ramp(), Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetLabel('0')
@@ -1138,7 +1137,7 @@
layer.SetGreaterLayerType('RIVERNETRISK')
# attach a classification to the layer
- clazz = GenUniformDistribution(1, 10, 2, GreenToRedRamp())
+ clazz = generate_uniform_distribution(1, 10, 2, green_to_red_ramp())
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetVisible(0)
@@ -1170,14 +1169,14 @@
finally:
wxEndBusyCursor()
-class SelectTool(Tool):
+class SelectTool(CanvasPanTool):
"""Tool to pick an object and run a dialog"""
def __init__(self, view, name, context, function, layer_name = None):
"""layer_name may either be "PICS" (Pictures).
Anything else defeaults to RiverNetworkResults."""
- Tool.__init__(self, view)
+ CanvasPanTool.__init__(self, view)
self.name = name
self.context = context
self.function = function
Modified: branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py
===================================================================
--- branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py 2011-07-25 10:12:43 UTC (rev 3643)
+++ branches/3.0.0-all-models/GREAT-ER/Greater/UI/application.py 2011-07-25 13:06:19 UTC (rev 3644)
@@ -201,7 +201,7 @@
stub_auto_login = 0
db_auto_login = 0
alpha_mode = False
- db_api_module = "_dagreater"
+ db_api_module = "_dagreater_pg"
opts, args = getopt.getopt(sys.argv[1:], '', ['stub-auto-login',
'alpha',
'db-auto-login',
More information about the Greater-commits
mailing list