new raster code
Bernhard Reiter
bernhard at intevation.de
Thu Jan 20 21:30:03 CET 2005
The new raster code, applies nicely to CVS,
displays and image faster and all test run through positively.
However I could make it dump tracebacks in a strange way.
Using Russels test data:
http://russnelson.com/089uni00s.zip
http://russnelson.com/089map.zip
http://russnelson.com/test.zip
I had a session saved (attached session).
If I am opening this everything is fine.
Then I add the image from 089map.zip as image layer
(not giving it a project yet).
Pressing resize to map on the vector layers gives
me the first traceback (in attached file).
Then after giving it a projects I get other errors
on stdout (see second example in the attached file).
So I was close saying: It is your code, just submit and squash the bugs...
But now it seems like I did find the first bug right away. ;)
Bernhard R.
-------------- next part --------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE session SYSTEM "thuban-1.1.dtd">
<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="unnamed session">
<fileshapesource filetype="shapefile" id="D816482544" filename="tgr36089uni.shp"/>
<map title="unnamed map">
<projection name="EPSG 32618 WGS 84 / UTM zone 18N">
<parameter value="proj=utm"/>
<parameter value="zone=18"/>
<parameter value="ellps=WGS84"/>
</projection>
<rasterlayer visible="true" filename="test.jpg" title="test">
<projection name="UTM 18N">
<parameter value="proj=utm"/>
<parameter value="zone=18"/>
<parameter value="ellps=WGS84"/>
</projection>
</rasterlayer>
<layer title="tgr36089uni" stroke_width="1" shapestore="D816482544" visible="true" stroke="#ff7f00" fill="None"/>
</map>
</session>
-------------- next part --------------
An unhandled exception occurred:
float division
(please report to http://thuban.intevation.org/bugtracker.html)
Traceback (most recent call last):
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/mainwindow.py", line 284, in invoke_command
command.Execute(self.Context())
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/command.py", line 121, in Execute
apply(self.function, (context,) + self.args + args, kw)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/mainwindow.py", line 1036, in call_method
apply(getattr(context.mainwindow, methodname), args)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/mainwindow.py", line 941, in FullExtent
self.canvas.FitMapToWindow()
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 475, in FitMapToWindow
self.FitRectToWindow(bbox)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 464, in FitRectToWindow
self.set_view_transform(scale, (offx, offy))
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/view.py", line 353, in set_view_transform
ViewPort.set_view_transform(self, scale, offset)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 403, in set_view_transform
pcenterx = (wwidth/2 - offset[0]) / scale
ZeroDivisionError: float division
Traceback (most recent call last):
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/view.py", line 209, in _do_redraw
if self.render_iter.next():
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/view.py", line 258, in _render_iterator
for cont in renderer.RenderMapIncrementally():
File "/mobilehome/bernhard/hacking/thuban/root/thuban/test/../Thuban/UI/baserenderer.py", line 197, in render_map_incrementally
self.draw_raster_layer(layer)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/test/../Thuban/UI/baserenderer.py", line 471, in draw_raster_layer
xmin = fmin[0]/self.scale
ZeroDivisionError: float division
Warning: <Thuban.UI.view.MapCanvas instance; proxy of C++ wxWindow instance at _1062b3d0_wxWindow_p>.VIEW_POSITION: <bound method MainWindow.view_position_changed of <Thuban.UI.mainwindow.MainWindow instance; proxy of C++ wxFrame instance at _105f5dc8_wxFrame_p>>()
Traceback (most recent call last):
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/Lib/connector.py", line 92, in Issue
apply(func, args + fargs)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/mainwindow.py", line 339, in view_position_changed
pos = self.canvas.CurrentPosition()
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 594, in CurrentPosition
return self.win_to_proj(x, y)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 435, in win_to_proj
return ((x - offx) / self.scale, (offy - y) / self.scale)
ZeroDivisionError: float division
Warning: <Thuban.UI.view.MapCanvas instance; proxy of C++ wxWindow instance at _1062b3d0_wxWindow_p>.VIEW_POSITION: <bound method MainWindow.view_position_changed of <Thuban.UI.mainwindow.MainWindow instance; proxy of C++ wxFrame instance at _105f5dc8_wxFrame_p>>()
Traceback (most recent call last):
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/Lib/connector.py", line 92, in Issue
apply(func, args + fargs)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/mainwindow.py", line 339, in view_position_changed
pos = self.canvas.CurrentPosition()
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 594, in CurrentPosition
return self.win_to_proj(x, y)
File "/mobilehome/bernhard/hacking/thuban/root/thuban/Thuban/UI/viewport.py", line 435, in win_to_proj
return ((x - offx) / self.scale, (offy - y) / self.scale)
ZeroDivisionError: float division
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20050120/7a63b6ee/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)