1 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON. |
4 |
|
|
5 |
|
* test/test_postgis_db.py (PolygonTests): New class containing |
6 |
|
those tests from TestPostGISShapestorePolygon that can also be |
7 |
|
used to test MUTLIPOLYGON tables |
8 |
|
(TestPostGISShapestorePolygon): Most tests are now in PolygonTests |
9 |
|
so derive from that |
10 |
|
(TestPostGISShapestoreMultiPolygon): New class with tests for |
11 |
|
MUTLIPOLYGON tables |
12 |
|
|
13 |
|
* test/postgissupport.py (PostGISDatabase.initdb): Allow the |
14 |
|
tables argument to have tuples with three items to override the |
15 |
|
WKT type used. |
16 |
|
(PostgreSQLServer.get_default_static_data_db): Use the above to |
17 |
|
create a polygon table with MUTLIPOLYGONs |
18 |
|
(point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon) |
19 |
|
(arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to |
20 |
|
coords_to* |
21 |
|
(coords_to_multipolygon): New. Convert to MUTLIPOLYGON |
22 |
|
(wkt_converter): New. Map WKT types to converters |
23 |
|
(upload_shapefile): New parameter force_wkt_type to use a |
24 |
|
different WKT type than the default |
25 |
|
|
26 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
27 |
|
|
28 |
|
* Thuban/UI/application.py |
29 |
|
(ThubanApplication.run_db_param_dialog): New. Suitable as a |
30 |
|
db_connection_callback. Main difference is that the dialog run |
31 |
|
from this method doesn't have a parent so it can be used even when |
32 |
|
there is no main window |
33 |
|
(ThubanApplication.OpenSession): Use self.run_db_param_dialog if |
34 |
|
no db_connection_callback was given. This way the dialog pops up |
35 |
|
even when the .thuban file was given as a command line parameter. |
36 |
|
|
37 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
38 |
|
|
39 |
|
* Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse |
40 |
|
before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs |
41 |
|
which leads to an effectively frozen X session because the user |
42 |
|
can only interact with the dialog but the mouse is still grabbed |
43 |
|
by the canvas. |
44 |
|
Also, call the tool's Hide method before MouseLeftUp because |
45 |
|
MouseLeftUp may change the tool's coordinates. |
46 |
|
|
47 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
48 |
|
|
49 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Catch |
50 |
|
LoadCancelled exceptions and handle them by returning immediately. |
51 |
|
|
52 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
53 |
|
|
54 |
|
GUI part of loading sessions with postgis connections which may |
55 |
|
require user interaction to get passwords or updated parameters |
56 |
|
|
57 |
|
* Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a |
58 |
|
bit nucer and be more generic. |
59 |
|
(DBFrame.OnAdd): Adapt to new DBDialog interface |
60 |
|
|
61 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): New |
62 |
|
optional parameter db_connection_callback which is passed to |
63 |
|
load_session. |
64 |
|
|
65 |
|
* Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New. |
66 |
|
Suitable as a db_connection_callback |
67 |
|
(MainWindow.OpenSession): Use self.run_db_param_dialog as the |
68 |
|
db_connection_callback of the application's OpenSession method |
69 |
|
|
70 |
|
|
71 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
72 |
|
|
73 |
|
Basic loading of sessions containing postgis connections: |
74 |
|
|
75 |
|
* Thuban/Model/load.py (LoadError): Add doc-string |
76 |
|
(LoadCancelled): New exception class to indicate a cancelled load |
77 |
|
(SessionLoader.__init__): Add the db_connection_callback parameter |
78 |
|
which will be used by the loader to get updated parameters and a |
79 |
|
password for a database connection |
80 |
|
(SessionLoader.__init__): Add the new XML elements to the |
81 |
|
dispatchers dictionary |
82 |
|
(SessionLoader.check_attrs): Two new conversions, ascii to convert |
83 |
|
to a byte-string object and idref as a generic id reference |
84 |
|
(SessionLoader.start_dbconnection) |
85 |
|
(SessionLoader.start_dbshapesource): New. Handlers for the new XML |
86 |
|
elements |
87 |
|
(load_session): Add the db_connection_callback to pass through the |
88 |
|
SessionLoader |
89 |
|
|
90 |
|
* test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword): |
91 |
|
New classes to test loading of sessions with postgis database |
92 |
|
connections. |
93 |
|
|
94 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
95 |
|
|
96 |
|
* Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and |
97 |
|
replace it and the comment with __BuildDate__ by the Source: and |
98 |
|
Id: cvs keywords as used in the other files. |
99 |
|
|
100 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
101 |
|
|
102 |
|
* Thuban/Model/load.py (SessionLoader.check_attrs): Raise a |
103 |
|
LoadError when a required attribute is missing. The code used to |
104 |
|
be commented out for some reason, but probably should have been |
105 |
|
active. |
106 |
|
|
107 |
|
* test/test_load.py (TestLoadError.test): Test the message in the |
108 |
|
LoadError too to make sure it really is about the missing |
109 |
|
attribute |
110 |
|
|
111 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
112 |
|
|
113 |
|
* test/test_save.py (SaveSessionTest.test_dbf_table) |
114 |
|
(SaveSessionTest.test_joined_table): Add XML validation tests. |
115 |
|
|
116 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
117 |
|
|
118 |
|
Implement saving a session with a postgis connection |
119 |
|
|
120 |
|
* Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New |
121 |
|
elements for database connections and shapestores using db |
122 |
|
connections |
123 |
|
(session): Add the dbconnections to the content model |
124 |
|
|
125 |
|
* Thuban/Model/save.py (SessionSaver.write_db_connections): New. |
126 |
|
Write the db connections |
127 |
|
(SessionSaver.write_session): Call write_db_connections to write |
128 |
|
the connection before the data sources |
129 |
|
(SessionSaver.write_data_containers): Handle postgis shapestores |
130 |
|
|
131 |
|
* test/test_save.py (SaveSessionTest.thubanids) |
132 |
|
(SaveSessionTest.thubanidrefs): Update for new DTD |
133 |
|
(SaveSessionTest.test_save_postgis): New. Test saving a session |
134 |
|
with postgis connections |
135 |
|
|
136 |
|
* Thuban/Model/postgisdb.py (PostGISTable.DBConnection) |
137 |
|
(PostGISTable.TableName): New accessor methods for the connection |
138 |
|
and table name |
139 |
|
|
140 |
|
* test/test_postgis_db.py (TestPostGISTable.test_dbconn) |
141 |
|
(TestPostGISTable.test_dbname): New methods to test the new |
142 |
|
PostGISConnection methods |
143 |
|
|
144 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
145 |
|
|
146 |
|
* Thuban/Model/postgisdb.py (ConnectionError): New exception class |
147 |
|
for exceptions occurring when establishing a Database connection |
148 |
|
(PostGISConnection.connect): Catch psycopg.OperationalError during |
149 |
|
connects and raise ConnectionError. |
150 |
|
|
151 |
|
* test/test_postgis_db.py (TestPostgisDBExceptions): New class for |
152 |
|
tests for database exceptions |
153 |
|
|
154 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
155 |
|
|
156 |
|
Prepare the test suite for tests with required authentication |
157 |
|
|
158 |
|
* test/postgissupport.py (PostgreSQLServer.__init__): Add instance |
159 |
|
variables with two predefined users/passwords, one for the admin |
160 |
|
and one for a non-privileged user. |
161 |
|
(PostgreSQLServer.createdb): Pass the admin name to initdb and add |
162 |
|
the non-privileged user to the database and set the admin password |
163 |
|
(PostgreSQLServer.wait_for_postmaster): Use the admin user name. |
164 |
|
Better error reporting |
165 |
|
(PostgreSQLServer.connection_params) |
166 |
|
(PostgreSQLServer.connection_string): New methods to return |
167 |
|
information about how to connect to the server |
168 |
|
(PostgreSQLServer.execute_sql): New. Convenience method to execute |
169 |
|
SQL statements |
170 |
|
(PostgreSQLServer.require_authentication): Toggle whether the |
171 |
|
server requires authentication |
172 |
|
(PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New. |
173 |
|
Add or alter users |
174 |
|
(PostGISDatabase.initdb): Pass the admin name one the |
175 |
|
subprocesses' command lines. Grant select rights on |
176 |
|
geometry_columns to everybody. |
177 |
|
(upload_shapefile): Use the admin name and password when |
178 |
|
connecting. Grant select rights on the new table to everybody. |
179 |
|
|
180 |
|
* test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the |
181 |
|
server's new methods to get the connection parameters. |
182 |
|
|
183 |
|
* test/test_postgis_session.py (TestSessionWithPostGIS.setUp) |
184 |
|
(TestSessionWithPostGIS.test_remove_dbconn_exception): Use the |
185 |
|
server's new methods to get the connection parameters. |
186 |
|
|
187 |
|
* test/test_postgis_db.py |
188 |
|
(TestPostGISConnection.test_gis_tables_empty) |
189 |
|
(TestPostGISConnection.test_gis_tables_non_empty) |
190 |
|
(PostGISStaticTests.setUp): Use the server's new methods to get |
191 |
|
the connection parameters. |
192 |
|
|
193 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
194 |
|
|
195 |
|
* Thuban/UI/about.py (About.__init__): Add the psycopg version. |
196 |
|
|
197 |
|
* Thuban/version.py: Add psycopg version |
198 |
|
|
199 |
|
* Thuban/Model/postgisdb.py (psycopg_version): New. Return the |
200 |
|
version of the psycopg module |
201 |
|
|
202 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
203 |
|
|
204 |
|
* Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used. |
205 |
|
(DBFrame.OnEdit): Removed because it's not used and wouldn't work |
206 |
|
at the moment. The functionality should probably be implemented |
207 |
|
some time, though. |
208 |
|
(DBFrame.OnRemove): Display a message if the connection can't be |
209 |
|
removed because it's still in use. |
210 |
|
|
211 |
|
2003-08-22 Jan-Oliver Wagner <[email protected]> |
212 |
|
|
213 |
|
* Thuban/UI/about.py (About.__init__): split up the huge about |
214 |
|
text into elements/lists for easier translation. This fixes bug |
215 |
|
https://intevation.de/rt/webrt?serial_num=2058 |
216 |
|
Also, made some forgotten string available for the i18n. |
217 |
|
|
218 |
|
2003-08-21 Bernhard Herzog <[email protected]> |
219 |
|
|
220 |
|
Make postgis support really optional including insensitive menu |
221 |
|
items. |
222 |
|
|
223 |
|
* Thuban/Model/postgisdb.py (has_postgis_support): New. Return |
224 |
|
whether the postgis is supported. |
225 |
|
|
226 |
|
* Thuban/UI/dbdialog.py: Put the psycopg import into try..except |
227 |
|
to make postgis support optional |
228 |
|
|
229 |
|
* Thuban/UI/mainwindow.py (_has_postgis_support): New. Context |
230 |
|
version of Thuban.Model.postgisdb.has_postgis_support |
231 |
|
(database_management command): Make it only sensitive if postgis |
232 |
|
is supported. |
233 |
|
|
234 |
|
2003-08-21 Jan-Oliver Wagner <[email protected]> |
235 |
|
|
236 |
|
* Doc/manual/thuban-manual.xml: Added CVS revision for rev-history. |
237 |
|
(section Adding and Removing Layers): Added text and described |
238 |
|
multi-selection. |
239 |
|
(chapter Extensions): New. |
240 |
|
|
241 |
|
2003-08-21 Jan-Oliver Wagner <[email protected]> |
242 |
|
|
243 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog |
244 |
|
settings to allow multiple files to load into the map. |
245 |
|
Also reduced selection to *.shp as a default. |
246 |
|
|
247 |
|
2003-08-20 Bernhard Herzog <[email protected]> |
248 |
|
|
249 |
|
Add dialogs and commands to open database connections and add |
250 |
|
database layers. |
251 |
|
|
252 |
|
* Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New |
253 |
|
method to open the database connection management dialog |
254 |
|
(MainWindow.AddDBLayer): New method to add a layer from a database |
255 |
|
(_has_dbconnections): New helper function to use for sensitivity |
256 |
|
(database_management command, layer_add_db command): New commands |
257 |
|
that call the above new methods. |
258 |
|
(main_menu): Add the new commands to the menu. |
259 |
|
|
260 |
|
* Thuban/Model/postgisdb.py (PostGISConnection.__init__) |
261 |
|
(PostGISConnection.connect): Establish the actual connection in a |
262 |
|
separate method and call it in __init__. This makes it easier to |
263 |
|
override the behavior in test cases |
264 |
|
(PostGISConnection.BriefDescription): New method to return a brief |
265 |
|
description for use in dialogs. |
266 |
|
|
267 |
|
* test/test_postgis_db.py (NonConnection): DB connection that |
268 |
|
doesn't actually connect |
269 |
|
(TestBriefDescription): New class with tests for the new |
270 |
|
BriefDescription method |
271 |
|
|
272 |
|
2003-08-19 Jan-Oliver Wagner <[email protected]> |
273 |
|
|
274 |
|
Moved anything from extensions to libraries. |
275 |
|
|
276 |
|
* libraries: New. |
277 |
|
|
278 |
|
* libraries/ pyprojection, pyshapelib, shapelib, thuban: New. |
279 |
|
|
280 |
|
* libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i, |
281 |
|
Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have |
282 |
|
been moved here from thuban/extensions/pyprojection/ |
283 |
|
See there in the Attic for the older history. |
284 |
|
|
285 |
|
* libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i, |
286 |
|
dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py, |
287 |
|
shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files |
288 |
|
have been moved here from thuban/extensions/pyshapelib/ |
289 |
|
See there in the Attic for the older history. |
290 |
|
|
291 |
|
* libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These |
292 |
|
files have been moved here from thuban/extensions/shapelib/ |
293 |
|
See there in the Attic for the older history. |
294 |
|
|
295 |
|
* libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h, |
296 |
|
gdalwarp.cpp, wxproj.cpp: These files have been moved here from |
297 |
|
thuban/extensions/thuban/ |
298 |
|
See there in the Attic for the older history. |
299 |
|
|
300 |
|
* MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries. |
301 |
|
|
302 |
|
* extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h, |
303 |
|
gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban. |
304 |
|
|
305 |
|
* extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: |
306 |
|
Moved to libraries/shapelib. |
307 |
|
|
308 |
|
* extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py, |
309 |
|
shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c, |
310 |
|
ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c: |
311 |
|
Moved to libraries/pyshapelib. |
312 |
|
|
313 |
|
* extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py, |
314 |
|
LICENSE, Projection.i, Projection_wrap.c, swighelp.txt: |
315 |
|
Moved to libraries/pyprojection. |
316 |
|
|
317 |
|
* extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed. |
318 |
|
|
319 |
|
* extensions: Removed. |
320 |
|
|
321 |
|
2003-08-19 Bernhard Herzog <[email protected]> |
322 |
|
|
323 |
|
* test/test_viewport.py (ViewPortTest): We don't use the |
324 |
|
facilities of FileTestMixin so don't derive from it. |
325 |
|
(TestViewportWithPostGIS): New class with tests for using a |
326 |
|
viewport on a map with postgis layers. |
327 |
|
|
328 |
|
2003-08-19 Bernhard Herzog <[email protected]> |
329 |
|
|
330 |
|
Add the db connection management to the session. |
331 |
|
|
332 |
|
* Thuban/Model/session.py (Session.__init__): New instance |
333 |
|
variable db_connections |
334 |
|
(Session.AddDBConnection, Session.DBConnections) |
335 |
|
(Session.HasDBConnections, Session.CanRemoveDBConnection) |
336 |
|
(Session.RemoveDBConnection): New methods to manage and query the |
337 |
|
db connections managed by the session |
338 |
|
(Session.OpenDBShapeStore): New method to open a shapestore from a |
339 |
|
db connection |
340 |
|
|
341 |
|
* Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New |
342 |
|
messages for the db connection handling in the session |
343 |
|
|
344 |
|
* test/test_postgis_session.py: New. test cases for the session's |
345 |
|
db connection handling with postgis connections |
346 |
|
|
347 |
2003-08-19 Bernhard Herzog <[email protected]> |
2003-08-19 Bernhard Herzog <[email protected]> |
348 |
|
|
349 |
Add very basic postgis database support and the corresponding test |
Add very basic postgis database support and the corresponding test |