33 |
from Thuban.Model.proj import Projection |
from Thuban.Model.proj import Projection |
34 |
from Thuban.Model.range import Range |
from Thuban.Model.range import Range |
35 |
from Thuban.Model.classification import Classification, \ |
from Thuban.Model.classification import Classification, \ |
36 |
ClassGroupDefault, ClassGroupSingleton, ClassGroupRange, ClassGroupMap, \ |
ClassGroupDefault, ClassGroupSingleton, ClassGroupRange, \ |
37 |
|
ClassGroupPattern, ClassGroupMap, \ |
38 |
ClassGroupProperties |
ClassGroupProperties |
39 |
from Thuban.Model.data import DerivedShapeStore, ShapefileStore |
from Thuban.Model.data import DerivedShapeStore, ShapefileStore |
40 |
from Thuban.Model.table import DBFTable |
from Thuban.Model.table import DBFTable |
137 |
'clnull' : ("start_clnull", "end_clnull"), |
'clnull' : ("start_clnull", "end_clnull"), |
138 |
'clpoint' : ("start_clpoint", "end_clpoint"), |
'clpoint' : ("start_clpoint", "end_clpoint"), |
139 |
'clrange' : ("start_clrange", "end_clrange"), |
'clrange' : ("start_clrange", "end_clrange"), |
140 |
|
'clpattern' : ("start_clpattern", "end_clpattern"), |
141 |
'cldata' : ("start_cldata", "end_cldata"), |
'cldata' : ("start_cldata", "end_cldata"), |
142 |
'table' : ("start_table", "end_table"), |
'table' : ("start_table", "end_table"), |
143 |
'labellayer' : ("start_labellayer", None), |
'labellayer' : ("start_labellayer", None), |
617 |
self.aLayer.GetClassification().AppendGroup(self.cl_group) |
self.aLayer.GetClassification().AppendGroup(self.cl_group) |
618 |
del self.cl_group, self.cl_prop |
del self.cl_group, self.cl_prop |
619 |
|
|
620 |
|
|
621 |
|
def start_clpattern(self, name, qname, attrs): |
622 |
|
pattern = attrs.get((None, 'pattern'), "") |
623 |
|
|
624 |
|
self.cl_group = ClassGroupPattern(self.encode(pattern)) |
625 |
|
self.cl_group.SetLabel(self.encode(attrs.get((None, 'label'), ""))) |
626 |
|
self.cl_prop = ClassGroupProperties() |
627 |
|
|
628 |
|
def end_clpattern(self, name, qname): |
629 |
|
self.cl_group.SetProperties(self.cl_prop) |
630 |
|
self.aLayer.GetClassification().AppendGroup(self.cl_group) |
631 |
|
del self.cl_group, self.cl_prop |
632 |
|
|
633 |
|
|
634 |
def start_cldata(self, name, qname, attrs): |
def start_cldata(self, name, qname, attrs): |
635 |
self.cl_prop.SetLineColor( |
self.cl_prop.SetLineColor( |
636 |
parse_color(attrs.get((None, 'stroke'), "None"))) |
parse_color(attrs.get((None, 'stroke'), "None"))) |