Ejemplo n.º 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
Ejemplo n.º 2
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