Package: thuban
Version: 1.0.0-1
Severity: important
When trying to select a postgis source using thuban, it fail to list
the column in the table. This is a problem when one table contain
several geometry columns. It would be better if the table list
included the name of the geometry column as well.
I create this table:
CREATE TABLE postal_codes (
postal_code text NOT NULL PRIMARY KEY,
postal_location text
);
SELECT AddGeometryColumn('','postal_codes','center_point', '-1','POINT', 2);
SELECT AddGeometryColumn('','postal_codes','area', '-1','POLYGON', 2);
I select "File->Database Connections" to enter the database connection
info. Next, I visit "Map->Add Database Layer", select the database
and press "Retrieve". This make my list of postgis sources appear
under "Tables", but this table appear as two entries with
"postal_codes" as the name. There is no way to know which is which of
these.
I then try to select one of these, and press "OK", I get this crash
backtrace:
An unhandled exception occurred:
'NoneType' object has no attribute 'split'
(please report to http://thuban.intevation.org/bugtracker.html)
Traceback (most recent call last):
File "/usr/lib/thuban/Thuban/UI/mainwindow.py", line 282, in invoke_command
command.Execute(self.Context())
File "/usr/lib/thuban/Thuban/UI/command.py", line 121, in Execute
apply(self.function, (context,) + self.args + args, kw)
File "/usr/lib/thuban/Thuban/UI/mainwindow.py", line 946, in call_method
apply(getattr(context.mainwindow, methodname), args)
File "/usr/lib/thuban/Thuban/UI/mainwindow.py", line 543, in AddDBLayer
self.canvas.FitMapToWindow()
File "/usr/lib/thuban/Thuban/UI/viewport.py", line 454, in FitMapToWindow
bbox = self.map.ProjectedBoundingBox()
File "/usr/lib/thuban/Thuban/Model/map.py", line 209, in ProjectedBoundingBox
bbox = self.BoundingBox()
File "/usr/lib/thuban/Thuban/Model/map.py", line 188, in BoundingBox
bbox = layer.LatLongBoundingBox()
File "/usr/lib/thuban/Thuban/Model/layer.py", line 168, in LatLongBoundingBox
bbox = self.BoundingBox()
File "/usr/lib/thuban/Thuban/Model/layer.py", line 161, in BoundingBox
return self.store.BoundingBox()
File "/usr/lib/thuban/Thuban/Model/postgisdb.py", line 429, in BoundingBox
(minx, miny), (maxx, maxy) \
File "/usr/lib/thuban/Thuban/Model/wellknowntext.py", line 118, in
parse_wkt_thuban
parts = wkt.split(";")
AttributeError: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
File "/usr/lib/thuban/Thuban/UI/view.py", line 205, in _do_redraw
if self.render_iter.next():
File "/usr/lib/thuban/Thuban/UI/view.py", line 254, in _render_iterator
for cont in renderer.RenderMapIncrementally():
File "/usr/lib/thuban/Thuban/UI/baserenderer.py", line 202, in
render_map_incrementally
for i in self.draw_shape_layer_incrementally(layer):
File "/usr/lib/thuban/Thuban/UI/baserenderer.py", line 270, in
draw_shape_layer_incrementally
for shape in self.layer_shapes(layer):
File "/usr/lib/thuban/Thuban/Model/postgisdb.py", line 462, in ShapesInRegion
cursor.execute("SELECT gid, AsText(%s) FROM %s"
ProgrammingError: ERROR: column "gid" does not exist
SELECT gid, AsText("area") FROM "postal_codes" WHERE "area" &&
GeometryFromText('POLYGON((0.00 -315.00, 0.00 0.00, 380.00
0.00, 380.00 -315.00, 0.00 -315.00))', -1) ORDER BY gid
I'm not sure if the crash is related to the problem with the two
tables listed without any qualifier.
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages thuban depends on:
ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an
ii libgcc1 1:3.4.3-12 GCC support library
ii libgdal11.2.6-1 Geospatial Data Abstraction Librar
ii libstdc++5 1:3.3.5-12 The GNU Standard C++ Library v3
ii libwxgtk2.4 2.4.2.6.1wxWindows Cross-platform C++ GUI t
ii libwxgtk2.4-python 2.4.2.6.1wxWindows Cross-platform C++ GUI t
ii proj4.4.9-1 Cartographic projection filter and
ii python [python-xmlbase] 2.3.5-2 An interactive high-level object-o
ii python-sqlite 1.0.1-2 python interface to SQLite
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]