/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/load.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/load.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1408 by frank, Mon Jul 14 09:38:29 2003 UTC revision 1428 by jonathan, Wed Jul 16 13:23:01 2003 UTC
# Line 363  class SessionLoader(XMLReader): Line 363  class SessionLoader(XMLReader):
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.SetClassificationField(field)
367    
368      def end_classification(self, name, qname):      def end_classification(self, name, qname):
369          pass          pass
# Line 381  class SessionLoader(XMLReader): Line 381  class SessionLoader(XMLReader):
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.GetClassificationField()
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()

Legend:
Removed from v.1408  
changed lines
  Added in v.1428

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26