25 |
from Thuban.Model.classgen import \ |
from Thuban.Model.classgen import \ |
26 |
generate_uniform_distribution, generate_singletons, generate_quantiles, \ |
generate_uniform_distribution, generate_singletons, generate_quantiles, \ |
27 |
CustomRamp, GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp, \ |
CustomRamp, GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp, \ |
28 |
HotToColdRamp |
HotToColdRamp, FixedRamp |
29 |
|
|
30 |
|
|
31 |
USEALL_BMP = "group_use_all" |
USEALL_BMP = "group_use_all" |
225 |
ramp = propPanel.GetRamp() |
ramp = propPanel.GetRamp() |
226 |
if self.border_color and self.fix_border_check.IsChecked(): |
if self.border_color and self.fix_border_check.IsChecked(): |
227 |
props = self.border_color.GetProperties() |
props = self.border_color.GetProperties() |
228 |
lineColor = props.GetLineColor() |
ramp = FixedRamp(ramp, |
229 |
lineWidth = props.GetLineWidth() |
(props.GetLineColor(), props.GetLineWidth(), None)) |
|
else: |
|
|
lineColor = None |
|
|
lineWidth = None |
|
230 |
|
|
231 |
if genSel == GENCOMBOSTR_UNIFORM: |
if genSel == GENCOMBOSTR_UNIFORM: |
232 |
|
|
239 |
|
|
240 |
self.clazz = generate_uniform_distribution( |
self.clazz = generate_uniform_distribution( |
241 |
min, max, numGroups, ramp, |
min, max, numGroups, ramp, |
242 |
self.type == FIELDTYPE_INT, |
self.type == FIELDTYPE_INT) |
|
fixes = (lineColor, lineWidth, None)) |
|
243 |
|
|
244 |
self.parent._SetClassification(self.clazz) |
self.parent._SetClassification(self.clazz) |
245 |
|
|
248 |
list = genPanel.GetValueList() |
list = genPanel.GetValueList() |
249 |
|
|
250 |
if len(list) > 0: |
if len(list) > 0: |
251 |
self.clazz = generate_singletons(list, ramp, |
self.clazz = generate_singletons(list, ramp) |
|
(lineColor, lineWidth, None)) |
|
252 |
self.parent._SetClassification(self.clazz) |
self.parent._SetClassification(self.clazz) |
253 |
|
|
254 |
elif genSel == GENCOMBOSTR_QUANTILES: |
elif genSel == GENCOMBOSTR_QUANTILES: |
260 |
delta = 1 / float(numGroups) |
delta = 1 / float(numGroups) |
261 |
percents = [delta * i for i in range(1, numGroups + 1)] |
percents = [delta * i for i in range(1, numGroups + 1)] |
262 |
adjusted, self.clazz = \ |
adjusted, self.clazz = \ |
263 |
generate_quantiles(_list, percents, ramp, _range, |
generate_quantiles(_list, percents, ramp, _range) |
|
(lineColor, lineWidth, None)) |
|
264 |
|
|
265 |
if adjusted: |
if adjusted: |
266 |
dlg = wxMessageDialog(self, |
dlg = wxMessageDialog(self, |