363 |
elif fieldType == FIELDTYPE_DOUBLE: |
elif fieldType == FIELDTYPE_DOUBLE: |
364 |
self.conv = float |
self.conv = float |
365 |
|
|
366 |
self.aLayer.GetClassification().SetFieldInfo(field, fieldType) |
self.aLayer.SetClassificationColumn(field) |
367 |
|
|
368 |
def end_classification(self, name, qname): |
def end_classification(self, name, qname): |
369 |
pass |
pass |
381 |
def start_clpoint(self, name, qname, attrs): |
def start_clpoint(self, name, qname, attrs): |
382 |
attrib_value = attrs.get((None, 'value'), "0") |
attrib_value = attrs.get((None, 'value'), "0") |
383 |
|
|
384 |
value = self.conv(attrib_value) |
field = self.aLayer.GetClassificationColumn() |
385 |
|
if self.aLayer.GetFieldType(field) == FIELDTYPE_STRING: |
386 |
|
value = self.encode(attrib_value) |
387 |
|
else: |
388 |
|
value = self.conv(attrib_value) |
389 |
self.cl_group = ClassGroupSingleton(value) |
self.cl_group = ClassGroupSingleton(value) |
390 |
self.cl_group.SetLabel(self.encode(attrs.get((None, 'label'), ""))) |
self.cl_group.SetLabel(self.encode(attrs.get((None, 'label'), ""))) |
391 |
self.cl_prop = ClassGroupProperties() |
self.cl_prop = ClassGroupProperties() |