Beispiel #1
0
 def endElement(self, name):
     if self._parsingPoly:
         poses = self._chars.split(' ')
         shape = []
         for pos in poses:
             coord = pos.split(',')
             shape.append([float(coord[0]), float(coord[1])])
             self._shapes.append([float(coord[0]), float(coord[1])])
         self._polys[-1]['shape'] = shape
 def endElement(self, name):
     if self._parsingPoly:
         poses = self._chars.split(' ')
         shape = []
         for pos in poses:
             coord = pos.split(',')
             shape.append( [float(coord[0]), float(coord[1])] )
             self._shapes.append( [float(coord[0]), float(coord[1])] )
         self._polys[-1]['shape'] = shape