[Greater-commits] r319 - trunk/GREAT-ER/Greater/Modules
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 30 11:43:33 CEST 2011
Author: aheinecke
Date: 2011-06-30 11:43:33 +0200 (Thu, 30 Jun 2011)
New Revision: 319
Modified:
trunk/GREAT-ER/Greater/Modules/analysis.py
Log:
Do not try to call an instance of green_to_red_ramp directly but pass it
to the generator functions
Modified: trunk/GREAT-ER/Greater/Modules/analysis.py
===================================================================
--- trunk/GREAT-ER/Greater/Modules/analysis.py 2011-06-30 09:43:03 UTC (rev 318)
+++ trunk/GREAT-ER/Greater/Modules/analysis.py 2011-06-30 09:43:33 UTC (rev 319)
@@ -237,7 +237,7 @@
_list.sort()
quantiles, clazz = generate_quantiles(_list,
[ 0.25, 0.50, 0.75, 1.0 ],
- green_to_red_ramp(),
+ green_to_red_ramp,
Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
@@ -336,11 +336,11 @@
_list.sort()
if class_ranges[0]:
quantiles, clazz, upper_class0 = generate_quantiles0(_list, class_ranges,
- green_to_red_ramp(),
+ green_to_red_ramp,
Range(']0;oo['))
else:
quantiles, clazz = generate_quantiles(_list, class_ranges[1:],
- green_to_red_ramp(),
+ green_to_red_ramp,
Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
@@ -394,7 +394,7 @@
flow_classes = {}
min, max = rivrestable.ValueRange('q_mean')
clazz = generate_uniform_distribution(min, max, num_flow_classes,
- green_to_red_ramp())
+ green_to_red_ramp)
for i in range(rivrestable.NumRows()):
q_mean = rivrestable.ReadValue(i, 'q_mean')
stretch_id = rivrestable.ReadValue(i, 'stretch_id')
@@ -412,7 +412,7 @@
_list.append(restable.ReadValue(i, 'CSIMINTERN_MEAN'))
_list.sort()
quantiles, clazz = generate_quantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
- green_to_red_ramp(), Range(']0;oo['))
+ green_to_red_ramp, Range(']0;oo['))
for i in range(restable.NumRows()):
csim_mean = restable.ReadValue(i, 'CSIMINTERN_MEAN')
stretch_id = restable.ReadValue(i, 'STRETCH_ID')
@@ -463,7 +463,7 @@
_list = combined_classes_dict.keys()
_list.sort()
clazz = generate_singletons(_list,
- numGroups, green_to_red_ramp())
+ numGroups, green_to_red_ramp)
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetVisible(0)
@@ -822,7 +822,7 @@
_list.sort()
quantiles, clazz = generate_quantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
- green_to_red_ramp(), Range(']0;oo['))
+ green_to_red_ramp, Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetLabel('0')
@@ -889,7 +889,7 @@
_list.sort()
quantiles, clazz = generate_quantiles(_list, [ 0.25, 0.50, 0.75, 1.0 ],
- green_to_red_ramp(), Range(']0;oo['))
+ green_to_red_ramp, Range(']0;oo['))
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetLabel('0')
@@ -986,7 +986,7 @@
layer.SetGreaterLayerType('RIVERNETRISK')
# attach a classification to the layer
- clazz = generate_uniform_distribution(1, 10, 2, green_to_red_ramp())
+ clazz = generate_uniform_distribution(1, 10, 2, green_to_red_ramp)
dg = clazz.GetDefaultGroup()
dg.GetProperties().SetLineColor(Color(0,0,1))
dg.SetVisible(0)
More information about the Greater-commits
mailing list