72 |
self.map = map |
self.map = map |
73 |
seenRaster = True |
seenRaster = True |
74 |
|
|
75 |
|
if self.scale == 0: |
76 |
|
return |
77 |
|
|
78 |
# |
# |
79 |
# This is only a good optimization if there is only one |
# This is only a good optimization if there is only one |
80 |
# raster layer and the image covers the entire window (as |
# raster layer and the image covers the entire window (as |
192 |
for p in proj.GetAllParameters(): |
for p in proj.GetAllParameters(): |
193 |
outProj += "+" + p + " " |
outProj += "+" + p + " " |
194 |
|
|
|
print "self.scale: ", self.scale, offx, offy, width, height |
|
195 |
xmin = (0 - offx) / self.scale |
xmin = (0 - offx) / self.scale |
196 |
ymin = (offy - height) / self.scale |
ymin = (offy - height) / self.scale |
197 |
xmax = (width - offx) / self.scale |
xmax = (width - offx) / self.scale |
204 |
outProj, |
outProj, |
205 |
str(xmin), str(ymin), str(xmax), str(ymax), |
str(xmin), str(ymin), str(xmax), str(ymax), |
206 |
"", str(width), str(height)); |
"", str(width), str(height)); |
207 |
except (AttributeError, IOError, ValueError): |
except IOError, (strerr): |
208 |
|
print strerr |
209 |
|
except (AttributeError, ValueError): |
210 |
pass |
pass |
211 |
else: |
else: |
212 |
if data is not None: |
if data is not None: |