1 |
|
2003-08-26 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a |
4 |
|
more postgis specific but much faster method to get the bounding |
5 |
|
box |
6 |
|
|
7 |
|
2003-08-26 Bernhard Herzog <[email protected]> |
8 |
|
|
9 |
|
* Thuban/Model/postgisdb.py (PostGISTable.Title) |
10 |
|
(PostGISShapeStore.AllShapes): Add these missing methods. |
11 |
|
(PostGISShapeStore.ShapesInRegion): No need to raise |
12 |
|
StopIteration. We can simply return |
13 |
|
|
14 |
|
* test/test_postgis_db.py (TestPostGISTable.test_title) |
15 |
|
(TestPostGISShapestorePoint.test_all_shapes): New tests for the |
16 |
|
new methods |
17 |
|
|
18 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
19 |
|
|
20 |
|
* Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON. |
21 |
|
|
22 |
|
* test/test_postgis_db.py (PolygonTests): New class containing |
23 |
|
those tests from TestPostGISShapestorePolygon that can also be |
24 |
|
used to test MUTLIPOLYGON tables |
25 |
|
(TestPostGISShapestorePolygon): Most tests are now in PolygonTests |
26 |
|
so derive from that |
27 |
|
(TestPostGISShapestoreMultiPolygon): New class with tests for |
28 |
|
MUTLIPOLYGON tables |
29 |
|
|
30 |
|
* test/postgissupport.py (PostGISDatabase.initdb): Allow the |
31 |
|
tables argument to have tuples with three items to override the |
32 |
|
WKT type used. |
33 |
|
(PostgreSQLServer.get_default_static_data_db): Use the above to |
34 |
|
create a polygon table with MUTLIPOLYGONs |
35 |
|
(point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon) |
36 |
|
(arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to |
37 |
|
coords_to* |
38 |
|
(coords_to_multipolygon): New. Convert to MUTLIPOLYGON |
39 |
|
(wkt_converter): New. Map WKT types to converters |
40 |
|
(upload_shapefile): New parameter force_wkt_type to use a |
41 |
|
different WKT type than the default |
42 |
|
|
43 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
44 |
|
|
45 |
|
* Thuban/UI/application.py |
46 |
|
(ThubanApplication.run_db_param_dialog): New. Suitable as a |
47 |
|
db_connection_callback. Main difference is that the dialog run |
48 |
|
from this method doesn't have a parent so it can be used even when |
49 |
|
there is no main window |
50 |
|
(ThubanApplication.OpenSession): Use self.run_db_param_dialog if |
51 |
|
no db_connection_callback was given. This way the dialog pops up |
52 |
|
even when the .thuban file was given as a command line parameter. |
53 |
|
|
54 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
55 |
|
|
56 |
|
* Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse |
57 |
|
before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs |
58 |
|
which leads to an effectively frozen X session because the user |
59 |
|
can only interact with the dialog but the mouse is still grabbed |
60 |
|
by the canvas. |
61 |
|
Also, call the tool's Hide method before MouseLeftUp because |
62 |
|
MouseLeftUp may change the tool's coordinates. |
63 |
|
|
64 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
65 |
|
|
66 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Catch |
67 |
|
LoadCancelled exceptions and handle them by returning immediately. |
68 |
|
|
69 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
70 |
|
|
71 |
|
GUI part of loading sessions with postgis connections which may |
72 |
|
require user interaction to get passwords or updated parameters |
73 |
|
|
74 |
|
* Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a |
75 |
|
bit nucer and be more generic. |
76 |
|
(DBFrame.OnAdd): Adapt to new DBDialog interface |
77 |
|
|
78 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): New |
79 |
|
optional parameter db_connection_callback which is passed to |
80 |
|
load_session. |
81 |
|
|
82 |
|
* Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New. |
83 |
|
Suitable as a db_connection_callback |
84 |
|
(MainWindow.OpenSession): Use self.run_db_param_dialog as the |
85 |
|
db_connection_callback of the application's OpenSession method |
86 |
|
|
87 |
|
|
88 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
89 |
|
|
90 |
|
Basic loading of sessions containing postgis connections: |
91 |
|
|
92 |
|
* Thuban/Model/load.py (LoadError): Add doc-string |
93 |
|
(LoadCancelled): New exception class to indicate a cancelled load |
94 |
|
(SessionLoader.__init__): Add the db_connection_callback parameter |
95 |
|
which will be used by the loader to get updated parameters and a |
96 |
|
password for a database connection |
97 |
|
(SessionLoader.__init__): Add the new XML elements to the |
98 |
|
dispatchers dictionary |
99 |
|
(SessionLoader.check_attrs): Two new conversions, ascii to convert |
100 |
|
to a byte-string object and idref as a generic id reference |
101 |
|
(SessionLoader.start_dbconnection) |
102 |
|
(SessionLoader.start_dbshapesource): New. Handlers for the new XML |
103 |
|
elements |
104 |
|
(load_session): Add the db_connection_callback to pass through the |
105 |
|
SessionLoader |
106 |
|
|
107 |
|
* test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword): |
108 |
|
New classes to test loading of sessions with postgis database |
109 |
|
connections. |
110 |
|
|
111 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
112 |
|
|
113 |
|
* Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and |
114 |
|
replace it and the comment with __BuildDate__ by the Source: and |
115 |
|
Id: cvs keywords as used in the other files. |
116 |
|
|
117 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
118 |
|
|
119 |
|
* Thuban/Model/load.py (SessionLoader.check_attrs): Raise a |
120 |
|
LoadError when a required attribute is missing. The code used to |
121 |
|
be commented out for some reason, but probably should have been |
122 |
|
active. |
123 |
|
|
124 |
|
* test/test_load.py (TestLoadError.test): Test the message in the |
125 |
|
LoadError too to make sure it really is about the missing |
126 |
|
attribute |
127 |
|
|
128 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
129 |
|
|
130 |
|
* test/test_save.py (SaveSessionTest.test_dbf_table) |
131 |
|
(SaveSessionTest.test_joined_table): Add XML validation tests. |
132 |
|
|
133 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
134 |
|
|
135 |
|
Implement saving a session with a postgis connection |
136 |
|
|
137 |
|
* Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New |
138 |
|
elements for database connections and shapestores using db |
139 |
|
connections |
140 |
|
(session): Add the dbconnections to the content model |
141 |
|
|
142 |
|
* Thuban/Model/save.py (SessionSaver.write_db_connections): New. |
143 |
|
Write the db connections |
144 |
|
(SessionSaver.write_session): Call write_db_connections to write |
145 |
|
the connection before the data sources |
146 |
|
(SessionSaver.write_data_containers): Handle postgis shapestores |
147 |
|
|
148 |
|
* test/test_save.py (SaveSessionTest.thubanids) |
149 |
|
(SaveSessionTest.thubanidrefs): Update for new DTD |
150 |
|
(SaveSessionTest.test_save_postgis): New. Test saving a session |
151 |
|
with postgis connections |
152 |
|
|
153 |
|
* Thuban/Model/postgisdb.py (PostGISTable.DBConnection) |
154 |
|
(PostGISTable.TableName): New accessor methods for the connection |
155 |
|
and table name |
156 |
|
|
157 |
|
* test/test_postgis_db.py (TestPostGISTable.test_dbconn) |
158 |
|
(TestPostGISTable.test_dbname): New methods to test the new |
159 |
|
PostGISConnection methods |
160 |
|
|
161 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
162 |
|
|
163 |
|
* Thuban/Model/postgisdb.py (ConnectionError): New exception class |
164 |
|
for exceptions occurring when establishing a Database connection |
165 |
|
(PostGISConnection.connect): Catch psycopg.OperationalError during |
166 |
|
connects and raise ConnectionError. |
167 |
|
|
168 |
|
* test/test_postgis_db.py (TestPostgisDBExceptions): New class for |
169 |
|
tests for database exceptions |
170 |
|
|
171 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
172 |
|
|
173 |
|
Prepare the test suite for tests with required authentication |
174 |
|
|
175 |
|
* test/postgissupport.py (PostgreSQLServer.__init__): Add instance |
176 |
|
variables with two predefined users/passwords, one for the admin |
177 |
|
and one for a non-privileged user. |
178 |
|
(PostgreSQLServer.createdb): Pass the admin name to initdb and add |
179 |
|
the non-privileged user to the database and set the admin password |
180 |
|
(PostgreSQLServer.wait_for_postmaster): Use the admin user name. |
181 |
|
Better error reporting |
182 |
|
(PostgreSQLServer.connection_params) |
183 |
|
(PostgreSQLServer.connection_string): New methods to return |
184 |
|
information about how to connect to the server |
185 |
|
(PostgreSQLServer.execute_sql): New. Convenience method to execute |
186 |
|
SQL statements |
187 |
|
(PostgreSQLServer.require_authentication): Toggle whether the |
188 |
|
server requires authentication |
189 |
|
(PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New. |
190 |
|
Add or alter users |
191 |
|
(PostGISDatabase.initdb): Pass the admin name one the |
192 |
|
subprocesses' command lines. Grant select rights on |
193 |
|
geometry_columns to everybody. |
194 |
|
(upload_shapefile): Use the admin name and password when |
195 |
|
connecting. Grant select rights on the new table to everybody. |
196 |
|
|
197 |
|
* test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the |
198 |
|
server's new methods to get the connection parameters. |
199 |
|
|
200 |
|
* test/test_postgis_session.py (TestSessionWithPostGIS.setUp) |
201 |
|
(TestSessionWithPostGIS.test_remove_dbconn_exception): Use the |
202 |
|
server's new methods to get the connection parameters. |
203 |
|
|
204 |
|
* test/test_postgis_db.py |
205 |
|
(TestPostGISConnection.test_gis_tables_empty) |
206 |
|
(TestPostGISConnection.test_gis_tables_non_empty) |
207 |
|
(PostGISStaticTests.setUp): Use the server's new methods to get |
208 |
|
the connection parameters. |
209 |
|
|
210 |
2003-08-22 Bernhard Herzog <[email protected]> |
2003-08-22 Bernhard Herzog <[email protected]> |
211 |
|
|
212 |
* Thuban/UI/about.py (About.__init__): Add the psycopg version. |
* Thuban/UI/about.py (About.__init__): Add the psycopg version. |
222 |
(DBFrame.OnEdit): Removed because it's not used and wouldn't work |
(DBFrame.OnEdit): Removed because it's not used and wouldn't work |
223 |
at the moment. The functionality should probably be implemented |
at the moment. The functionality should probably be implemented |
224 |
some time, though. |
some time, though. |
225 |
|
(DBFrame.OnRemove): Display a message if the connection can't be |
226 |
|
removed because it's still in use. |
227 |
|
|
228 |
2003-08-22 Jan-Oliver Wagner <[email protected]> |
2003-08-22 Jan-Oliver Wagner <[email protected]> |
229 |
|
|