thuban-1.1.0-4.exe
Bernhard Reiter
bernhard at intevation.de
Sun May 14 17:44:59 CEST 2006
Am 14. May 2006 um 16:18:15 schrieb Bernhard Reiter:
> Pre120 Load session iceland_sample_raster.thuban
>
> G020-raster-display, (Pre120)
> Expected result: iceland with raster background should be shown.
>
> Failed: No Image shown.
Tried to track this down further a bit,
it seems to be related to proj in some way.
-------------- next part --------------
20060514 Bernhard Reiter
Testing Thuban-1.1.0-4.exe by Didrik.
General Setup: Windows XP Sp2 German, Outlook 2003
Pre001
Login as Administrator.
Pre002 Python
python-2.4.3.msi
Pre003 wxPython
wxPython2.6-win32-unicode-2.6.3.2-py24.exe
Pre004 pysqlite2
pysqlite-2.2.0.win32-py2.4.exe
Pre005
Thuban-data-1.0.0.zip/Data copied to C:\Programme\Thuban\
ok.
GS001 Pre001 Thuban Installer
Running the installer .exe.
Follow the release notes.
All default values.
Expected behaviour: no errors. There is a Thuban start menu entry.
Running Thuban-1.1.0-4.exe.
Release notes to not mention to set the path to GDAL which is still
necessary.
Pre006 Login as unpriviledged User.
GS002 Starting Thuban, via Menu.
Expected behaviour: Thuban starts up
Fails: Message: msvcp71.dll could not be found.
Thuban still comes up, but about shows: No Gdal.
Fix attempt: Copy c:\Python24\msvcp71.dll to
c:\WINDOWS\system32\
Now: ok.
G003-language According to the language of your system,
if Thuban has the language, it should be localised.
failed, still English.
G004-about-dialog-sane Select Help -> About
Expected result: Get a nice about dialog.
ok.
G005-about-showing-gdal
ok.
Thuban 1.1 cvs-20060413
Currently using:
wxPython 2.6.3.2
Python 2.4.3
PySQLite 2.2.1
SQLite 3.3.5
GDAL 1.3.1.0
psycopg - not available
Compiled for:
GTK - not available
proj 4.4.6
Extensions:
None registered.
Pre120 Load session iceland_sample_raster.thuban
G020-raster-display, (Pre120)
Expected result: iceland with raster background should be shown.
Failed: No Image shown.
Trying to simplify the problem.
gdalinfo island.tif
works.
Adding test code to Thuban/UI/renderer.py:
print "Calling gdalwarp.ProjectRasterFile(%s,%s,%s,%s,%s,%s,%s)"\
%(layer.GetImageFilename(),
srcProj, dstProj,
extents, resolution, dimensions,
options)
Output:
After setting a projection.
Calling gdalwarp.ProjectRasterFile(C:\Programme\Thuban\Data\iceland\island.tif,+
proj=utm +zone=27 +ellps=clrk66 ,+proj=utm +zone=27 +ellps=clrk66 ,(0.0, -287.0,
363.0, 0.0),[0, 0],(363, 287),1)
ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for C:\Programme\Thuban\Data\iceland\island.tif.
There is no affine transformation and no GCPs.
Hmmm the resolution=[0, 0] looks suspicious.
Trying
gdalwarp -s_srs "+proj=utm +zone=27 +ellps=clrk66" -t_srs "+proj=utm +zone=27 +ellps=clrk66" island.tif x.tif
works!
Trying:
C:\Programme\Thuban\Lib>c:\python24\python.exe
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import gdalwarp
gdalwarp.ProjectRasterFile("C:\Programme\Thuban\Data\iceland\island.tif","+proj=utm +zone=27 +ellps=clrk66", "+proj=utm +zone=27 +ellps=clrk66", (0.0, -287.0,
363.0, 0.0),[0, 0],(363, 287),1)
works without problems, the infection does not seem to happen here,
but probably happens earlier.
Refining the Debug code
print 'Calling gdalwarp.ProjectRasterFile("%s","%s","%s",%s,%s,%s,%s)'\
%(layer.GetImageFilename(),
srcProj, dstProj,
extents, resolution, dimensions,
options)
Looking at the error message again:
C:\Programme\Thuban>c:\python24\python.exe thuban.pyw
No thubanstart module available
ViewPort.set_view_transform: ZeroDivisionError, scale = 0.0
Calling gdalwarp.ProjectRasterFile("C:\Programme\Thuban\Data\iceland\island.tif"
,"+proj=latlong +to_meter=0.017453 +ellps=clrk66 ","+proj=utm +zone=27 +ellps=cl
rk66 ",(0.0, -287.0, 363.0, 0.0),[0, 0],(363, 287),1)
ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for C:\Programme\Thuban\Data\iceland\island.tif.
There is no affine transformation and no GCPs.
Traceback (most recent call last):
File "C:\Programme\Thuban\Thuban\UI\renderer.py", line 143, in projected_raste
r_layer
options)
IOError: Error creating destination image for projecting C:\Programme\Thuban\Dat
a\iceland\island.tif
Trying the gdal line on itself works, so the ZeroDivisionError
might indicate an earlier infection.
Adding Debugging code to UI/viewport.py:
print 'Entering set_view_transform(%s,%s)' % (scale, offset)
# width/height of the window
wwidth, wheight = self.GetPortSizeTuple()
print 'wwidth=%d; wheight=%d' % (wwidth, wheight)
Additional output:
Entering set_view_transform(0.0,(-1.#IND, -1.#IND))
wwidth=363; wheight=287
ViewPort.set_view_transform: ZeroDivisionError, scale = 0.0
Trying to find out where this comes from,
adding an
import traceback
traceback.print_stack()
File "thuban.pyw", line 34, in ?
Thuban.UI.main.main()
File "\.\Thuban\UI\main.py", line 45, in main
File "C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_core.py", line 7720
, in MainLoop
wx.PyApp.MainLoop(self)
File "C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_core.py", line 7153
, in MainLoop
return _core_.PyApp_MainLoop(*args, **kwargs)
File "\.\Thuban\UI\mainwindow.py", line 300, in invoke_command
File "\.\Thuban\UI\command.py", line 121, in Execute
File "\.\Thuban\UI\mainwindow.py", line 1074, in call_method
File "\.\Thuban\UI\mainwindow.py", line 474, in OpenSession
File "\.\Thuban\UI\application.py", line 248, in OpenSession
File "\.\Thuban\UI\application.py", line 188, in SetSession
File "\.\Thuban\UI\application.py", line 340, in maps_changed
File "\.\Thuban\UI\mainwindow.py", line 521, in SetMap
File "\.\Thuban\UI\view.py", line 157, in SetMap
File "C:\Programme\Thuban\Thuban\UI\viewport.py", line 313, in SetMap
self.FitMapToWindow()
File "C:\Programme\Thuban\Thuban\UI\viewport.py", line 501, in FitMapToWindow
self.FitRectToWindow(bbox)
File "C:\Programme\Thuban\Thuban\UI\viewport.py", line 490, in FitRectToWindow
self.set_view_transform(scale, (offx, offy))
File "\.\Thuban\UI\view.py", line 353, in set_view_transform
File "C:\Programme\Thuban\Thuban\UI\viewport.py", line 429, in set_view_transf
orm
traceback.print_stack()
First inspections shows:
Entering FitRectToWindow((-1430038.2379767266, 0.0, 1.#INF, 1.#INF))
As far as I can see this values, comes from Model/map.py ProjectedBoundingBox()
Trycking within there
bbox= (-38.083834311187623, 0.0, 0.0, 393.99339649767938)
bbox= (-1430038.2379767266, 0.0, 1.#INF, 1.#INF) from ForwardBBox
Entering ForwardBBox((-38.083834311187623, 0.0, 0.0, 393.99339649767938))
will return (-1430038.2379767266, 0.0, 1.#INF, 1.#INF)
Entering ForwardBBox((-38.083834311187623, 0.0, 0.0, 393.99339649767938))
Entering _transform_bbox <bound method Projection.Forward of Universal Transvers
e Mercator: ['proj=utm', 'zone=27', 'ellps=clrk66']> (-38.083834311187623, 0.0,
0.0, 393.99339649767938)
(-1430038.2379767266, 0.0, 1.#INF, 1.#INF)
Entering _transform_bbox <bound method Projection.Forward of Universal Transvers
e Mercator: ['proj=utm', 'zone=27', 'ellps=clrk66']> (-38.083834311187623, 0.0,
0.0, 393.99339649767938)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20060514/e064064c/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)