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

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

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

revision 1535 by bh, Fri Aug 1 14:27:13 2003 UTC revision 1551 by bh, Wed Aug 6 17:21:07 2003 UTC
# Line 48  class Shape: Line 48  class Shape:
48    
49          xs = []          xs = []
50          ys = []          ys = []
51          for x, y in self.points:          for part in self.points:
52              xs.append(x)              for x, y in part:
53              ys.append(y)                  xs.append(x)
54                    ys.append(y)
55          self.llx = min(xs)          self.llx = min(xs)
56          self.lly = min(ys)          self.lly = min(ys)
57          self.urx = max(xs)          self.urx = max(xs)
# Line 185  class ShapefileStore: Line 186  class ShapefileStore:
186          shape = self.shapefile.read_object(index)          shape = self.shapefile.read_object(index)
187    
188          if self.ShapeType() == SHAPETYPE_POINT:          if self.ShapeType() == SHAPETYPE_POINT:
189              points = shape.vertices()              points = [shape.vertices()]
190          else:          else:
             #for poly in shape.vertices():  
             poly = shape.vertices()[0]  
191              points = []              points = []
192              for x, y in poly:              for poly in shape.vertices():
193                  points.append((x, y))                  part = []
194                    for x, y in poly:
195                        part.append((x, y))
196                    points.append(part)
197    
198          return Shape(points)          return Shape(points)
199    

Legend:
Removed from v.1535  
changed lines
  Added in v.1551

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26