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) |
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 |
|
|