1 |
|
2003-08-28 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
* test/test_proj.py: Import things from Thuban after calling |
4 |
|
initthuban |
5 |
|
|
6 |
|
* test/test_load.py (LoadSessionTest.filenames): New class |
7 |
|
variable with the filename attributes to normalize |
8 |
|
(LoadSessionTest.check_format): Pass self.filenames to |
9 |
|
sax_eventlist to normalize the filename attributes |
10 |
|
|
11 |
|
* test/xmlsupport.py: Add cvs keywords |
12 |
|
(SaxEventLister.__init__): New parameter filenames which indicates |
13 |
|
attributes that contain filenames |
14 |
|
(SaxEventLister.startElementNS): Normalize the filename attributes |
15 |
|
with os.path.normpath |
16 |
|
(sax_eventlist): New parameter filenames to pass through to |
17 |
|
SaxEventLister |
18 |
|
|
19 |
|
* test/test_derivedshapestore.py: Make this file callable as a |
20 |
|
program to execute the tests |
21 |
|
(TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind |
22 |
|
the session to self.session so that it gets destroyed properly |
23 |
|
|
24 |
|
* test/test_layer.py (TestLayer.tearDown): Call the session's |
25 |
|
Destroy method |
26 |
|
|
27 |
|
* test/test_map.py (TestMapBase.tearDown): Destroy self.session |
28 |
|
too if it exists |
29 |
|
(TestMapAddLayer.test_add_layer): Bind the session to self.session |
30 |
|
so that it gets destroyed properly |
31 |
|
|
32 |
|
* test/postgissupport.py (reason_for_not_running_tests): Add a |
33 |
|
test for the existence of popen2.Popen4. |
34 |
|
|
35 |
|
* test/test_save.py (SaveSessionTest.tearDown): New. Provide a |
36 |
|
reliable way to destroy the sessions created in the test cases |
37 |
|
(SaveSessionTest.test_dbf_table): Bind the session to self.session |
38 |
|
so that it gets destroyed properly |
39 |
|
(SaveSessionTest.testLayerProjection): Bind the session to |
40 |
|
self.session so that it gets destroyed properly |
41 |
|
|
42 |
|
* test/test_session.py (UnreferencedTablesTests.tearDown): Make |
43 |
|
sure that the session is destroyed properly |
44 |
|
|
45 |
|
* test/test_shapefilestore.py: Make this callable as a program to |
46 |
|
execute the tests |
47 |
|
|
48 |
|
* test/test_scalebar.py: Remove unnecessary import of _ from |
49 |
|
Thuban |
50 |
|
|
51 |
|
* test/support.py (print_garbage_information): Call initthuban |
52 |
|
here because it may be called indirectly from test cases that test |
53 |
|
test support modules which do not use anything from thuban itself |
54 |
|
(ThubanTestProgram.runTests): Remove unnecessary debug print |
55 |
|
|
56 |
|
2003-08-28 Bernhard Herzog <[email protected]> |
57 |
|
|
58 |
|
* Thuban/version.py (longversion): Update to 0.9 |
59 |
|
|
60 |
|
* Thuban/UI/mainwindow.py: Remove some unused imports |
61 |
|
|
62 |
|
* README: Add section about required additional software. Add date |
63 |
|
and revision CVS keywords |
64 |
|
|
65 |
|
* HOWTO-Release: Add item about the translations. Add date and |
66 |
|
revision CVs keywords and change formatting to match README a bit |
67 |
|
better |
68 |
|
|
69 |
|
* po/de.po: Update for 0.9 |
70 |
|
|
71 |
|
* test/README: Tweak the wording a little because many tests are |
72 |
|
not really unittest. |
73 |
|
|
74 |
|
2003-08-27 Bernhard Herzog <[email protected]> |
75 |
|
|
76 |
|
As preparation for the 0.9 release, switch thuban files to a |
77 |
|
non-dev namespace |
78 |
|
|
79 |
|
* Thuban/Model/save.py (SessionSaver.write_session): Write files |
80 |
|
with the http://thuban.intevation.org/dtds/thuban-0.9.dtd |
81 |
|
namespace |
82 |
|
|
83 |
|
* Thuban/Model/load.py (SessionLoader.__init__): Accept the |
84 |
|
http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too |
85 |
|
|
86 |
|
* test/test_save.py (SaveSessionTest.dtd) |
87 |
|
(SaveSessionTest.testEmptySession) |
88 |
|
(SaveSessionTest.testSingleLayer) |
89 |
|
(SaveSessionTest.testLayerProjection) |
90 |
|
(SaveSessionTest.testRasterLayer) |
91 |
|
(SaveSessionTest.testClassifiedLayer) |
92 |
|
(SaveSessionTest.test_dbf_table) |
93 |
|
(SaveSessionTest.test_joined_table) |
94 |
|
(SaveSessionTest.test_save_postgis): Update for new namespace |
95 |
|
|
96 |
|
* test/test_load.py (LoadSessionTest.dtd, TestSingleLayer) |
97 |
|
(TestLayerVisibility.file_contents, TestLabels.file_contents) |
98 |
|
(TestLayerProjection.file_contents) |
99 |
|
(TestRasterLayer.file_contents, TestJoinedTable.file_contents) |
100 |
|
(TestPostGISLayer.file_contents) |
101 |
|
(TestPostGISLayerPassword.file_contents) |
102 |
|
(TestLoadError.file_contents, TestLoadError.test): Update for new |
103 |
|
namespace |
104 |
|
|
105 |
|
2003-08-27 Bernhard Herzog <[email protected]> |
106 |
|
|
107 |
|
Make the table interface distinguish between row ids (an integer |
108 |
|
that uniquely identifies a row) and row ordinals (a simple row |
109 |
|
count from 0 to NumRows() - 1) |
110 |
|
|
111 |
|
* Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal) |
112 |
|
(PostGISTable.RowOrdinalToId): New methods to conver between row |
113 |
|
ids and row ordinals |
114 |
|
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword |
115 |
|
parameter row_is_ordinal to indicate whether the row parameter is |
116 |
|
the row id or the ordinal |
117 |
|
|
118 |
|
* Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal) |
119 |
|
(TransientTableBase.RowOrdinalToId) |
120 |
|
(AutoTransientTable.RowIdToOrdinal) |
121 |
|
(AutoTransientTable.RowOrdinalToId): Same new methods as in |
122 |
|
PostGISTable. |
123 |
|
(TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue) |
124 |
|
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue): |
125 |
|
Same new parameter as in PostGISTable. |
126 |
|
|
127 |
|
* Thuban/Model/table.py (DBFTable.RowIdToOrdinal) |
128 |
|
(DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal) |
129 |
|
(MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable. |
130 |
|
(DBFTable.ReadValue, DBFTable.ReadRowAsDict) |
131 |
|
(MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new |
132 |
|
parameter as in PostGISTable. |
133 |
|
|
134 |
|
* Thuban/UI/tableview.py (DataTable.RowIdToOrdinal) |
135 |
|
(DataTable.RowOrdinalToId): New methods to convert between row ids |
136 |
|
and row ordinals. |
137 |
|
(TableGrid.SelectRowById): New method to select a row based on its |
138 |
|
ID as opposed to its ordinal |
139 |
|
(DataTable.GetValue, TableGrid.OnRangeSelect) |
140 |
|
(TableGrid.OnSelectCell, LayerTableGrid.select_shapes) |
141 |
|
(QueryTableFrame.OnQuery, QueryTableFrame.get_selected) |
142 |
|
(LayerTableFrame.__init__): Convert between row ids and row |
143 |
|
ordinals as appropriate |
144 |
|
|
145 |
|
* test/postgissupport.py (PostGISDatabase.__init__): Add |
146 |
|
doc-string. |
147 |
|
(PostGISDatabase.initdb): The optional third item in a tuple in |
148 |
|
tables is now a (key, value) list with additional arguments to |
149 |
|
pass to upload_shapefile |
150 |
|
(upload_shapefile): New parameter gid_offset to allow gids that |
151 |
|
are not the same as the shapeids in the shapefile |
152 |
|
(PostgreSQLServer.get_default_static_data_db): Use the new |
153 |
|
gid_offset to make the gids in landmarks 1000 higher than the |
154 |
|
shapeids in the shapefile |
155 |
|
|
156 |
|
* test/test_viewport.py |
157 |
|
(TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the |
158 |
|
new shapeids in the landmarks table |
159 |
|
|
160 |
|
* test/test_transientdb.py |
161 |
|
(TestTransientTable.run_iceland_political_tests) |
162 |
|
(TestTransientTable.test_transient_joined_table): Add tests for |
163 |
|
the new table methods and new keywords arguments. |
164 |
|
|
165 |
|
* test/test_postgis_db.py |
166 |
|
(TestPostGISTable.test_read_row_as_dict_row_count_mode) |
167 |
|
(TestPostGISTable.test_read_value_row_count_mode) |
168 |
|
(TestPostGISTable.test_row_id_to_ordinal) |
169 |
|
(TestPostGISTable.test_row_oridnal_to_id): New test for the new |
170 |
|
table methods and the new arguments |
171 |
|
(TestPostGISShapestorePoint.test_shapes_in_region) |
172 |
|
(TestPostGISShapestorePoint.test_shape_raw_data) |
173 |
|
(TestPostGISShapestorePoint.test_shape_points) |
174 |
|
(TestPostGISShapestorePoint.test_shape_shapeid) |
175 |
|
(TestPostGISShapestorePoint.test_all_shapes) |
176 |
|
(TestPostGISTable.test_simple_query) |
177 |
|
(TestPostGISTable.test_simple_query) |
178 |
|
(TestPostGISTable.test_simple_query) |
179 |
|
(TestPostGISTable.test_read_value) |
180 |
|
(TestPostGISTable.test_read_row_as_dict): Adapt to the new |
181 |
|
shapeids in the landmarks table |
182 |
|
|
183 |
|
* test/test_memory_table.py |
184 |
|
(TestMemoryTable.test_read_row_as_dict_row_count_mode) |
185 |
|
(TestMemoryTable.test_read_value_row_count_mode) |
186 |
|
(TestMemoryTable.test_row_id_to_ordinal) |
187 |
|
(TestMemoryTable.test_row_oridnal_to_id): New test for the new |
188 |
|
table methods and the new arguments |
189 |
|
|
190 |
|
* test/test_dbf_table.py |
191 |
|
(TestDBFTable.test_read_row_as_dict_row_count_mode) |
192 |
|
(TestDBFTable.test_read_value_row_count_mode) |
193 |
|
(TestDBFTable.test_row_id_to_ordinal) |
194 |
|
(TestDBFTable.test_row_oridnal_to_id): New test for the new table |
195 |
|
methods and the new arguments |
196 |
|
|
197 |
|
2003-08-26 Bernhard Herzog <[email protected]> |
198 |
|
|
199 |
|
* Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a |
200 |
|
more postgis specific but much faster method to get the bounding |
201 |
|
box |
202 |
|
|
203 |
|
2003-08-26 Bernhard Herzog <[email protected]> |
204 |
|
|
205 |
|
* Thuban/Model/postgisdb.py (PostGISTable.Title) |
206 |
|
(PostGISShapeStore.AllShapes): Add these missing methods. |
207 |
|
(PostGISShapeStore.ShapesInRegion): No need to raise |
208 |
|
StopIteration. We can simply return |
209 |
|
|
210 |
|
* test/test_postgis_db.py (TestPostGISTable.test_title) |
211 |
|
(TestPostGISShapestorePoint.test_all_shapes): New tests for the |
212 |
|
new methods |
213 |
|
|
214 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
215 |
|
|
216 |
|
* Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON. |
217 |
|
|
218 |
|
* test/test_postgis_db.py (PolygonTests): New class containing |
219 |
|
those tests from TestPostGISShapestorePolygon that can also be |
220 |
|
used to test MUTLIPOLYGON tables |
221 |
|
(TestPostGISShapestorePolygon): Most tests are now in PolygonTests |
222 |
|
so derive from that |
223 |
|
(TestPostGISShapestoreMultiPolygon): New class with tests for |
224 |
|
MUTLIPOLYGON tables |
225 |
|
|
226 |
|
* test/postgissupport.py (PostGISDatabase.initdb): Allow the |
227 |
|
tables argument to have tuples with three items to override the |
228 |
|
WKT type used. |
229 |
|
(PostgreSQLServer.get_default_static_data_db): Use the above to |
230 |
|
create a polygon table with MUTLIPOLYGONs |
231 |
|
(point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon) |
232 |
|
(arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to |
233 |
|
coords_to* |
234 |
|
(coords_to_multipolygon): New. Convert to MUTLIPOLYGON |
235 |
|
(wkt_converter): New. Map WKT types to converters |
236 |
|
(upload_shapefile): New parameter force_wkt_type to use a |
237 |
|
different WKT type than the default |
238 |
|
|
239 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
240 |
|
|
241 |
|
* Thuban/UI/application.py |
242 |
|
(ThubanApplication.run_db_param_dialog): New. Suitable as a |
243 |
|
db_connection_callback. Main difference is that the dialog run |
244 |
|
from this method doesn't have a parent so it can be used even when |
245 |
|
there is no main window |
246 |
|
(ThubanApplication.OpenSession): Use self.run_db_param_dialog if |
247 |
|
no db_connection_callback was given. This way the dialog pops up |
248 |
|
even when the .thuban file was given as a command line parameter. |
249 |
|
|
250 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
251 |
|
|
252 |
|
* Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse |
253 |
|
before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs |
254 |
|
which leads to an effectively frozen X session because the user |
255 |
|
can only interact with the dialog but the mouse is still grabbed |
256 |
|
by the canvas. |
257 |
|
Also, call the tool's Hide method before MouseLeftUp because |
258 |
|
MouseLeftUp may change the tool's coordinates. |
259 |
|
|
260 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
261 |
|
|
262 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): Catch |
263 |
|
LoadCancelled exceptions and handle them by returning immediately. |
264 |
|
|
265 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
266 |
|
|
267 |
|
GUI part of loading sessions with postgis connections which may |
268 |
|
require user interaction to get passwords or updated parameters |
269 |
|
|
270 |
|
* Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a |
271 |
|
bit nucer and be more generic. |
272 |
|
(DBFrame.OnAdd): Adapt to new DBDialog interface |
273 |
|
|
274 |
|
* Thuban/UI/application.py (ThubanApplication.OpenSession): New |
275 |
|
optional parameter db_connection_callback which is passed to |
276 |
|
load_session. |
277 |
|
|
278 |
|
* Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New. |
279 |
|
Suitable as a db_connection_callback |
280 |
|
(MainWindow.OpenSession): Use self.run_db_param_dialog as the |
281 |
|
db_connection_callback of the application's OpenSession method |
282 |
|
|
283 |
|
|
284 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
285 |
|
|
286 |
|
Basic loading of sessions containing postgis connections: |
287 |
|
|
288 |
|
* Thuban/Model/load.py (LoadError): Add doc-string |
289 |
|
(LoadCancelled): New exception class to indicate a cancelled load |
290 |
|
(SessionLoader.__init__): Add the db_connection_callback parameter |
291 |
|
which will be used by the loader to get updated parameters and a |
292 |
|
password for a database connection |
293 |
|
(SessionLoader.__init__): Add the new XML elements to the |
294 |
|
dispatchers dictionary |
295 |
|
(SessionLoader.check_attrs): Two new conversions, ascii to convert |
296 |
|
to a byte-string object and idref as a generic id reference |
297 |
|
(SessionLoader.start_dbconnection) |
298 |
|
(SessionLoader.start_dbshapesource): New. Handlers for the new XML |
299 |
|
elements |
300 |
|
(load_session): Add the db_connection_callback to pass through the |
301 |
|
SessionLoader |
302 |
|
|
303 |
|
* test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword): |
304 |
|
New classes to test loading of sessions with postgis database |
305 |
|
connections. |
306 |
|
|
307 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
308 |
|
|
309 |
|
* Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and |
310 |
|
replace it and the comment with __BuildDate__ by the Source: and |
311 |
|
Id: cvs keywords as used in the other files. |
312 |
|
|
313 |
|
2003-08-25 Bernhard Herzog <[email protected]> |
314 |
|
|
315 |
|
* Thuban/Model/load.py (SessionLoader.check_attrs): Raise a |
316 |
|
LoadError when a required attribute is missing. The code used to |
317 |
|
be commented out for some reason, but probably should have been |
318 |
|
active. |
319 |
|
|
320 |
|
* test/test_load.py (TestLoadError.test): Test the message in the |
321 |
|
LoadError too to make sure it really is about the missing |
322 |
|
attribute |
323 |
|
|
324 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
325 |
|
|
326 |
|
* test/test_save.py (SaveSessionTest.test_dbf_table) |
327 |
|
(SaveSessionTest.test_joined_table): Add XML validation tests. |
328 |
|
|
329 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
330 |
|
|
331 |
|
Implement saving a session with a postgis connection |
332 |
|
|
333 |
|
* Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New |
334 |
|
elements for database connections and shapestores using db |
335 |
|
connections |
336 |
|
(session): Add the dbconnections to the content model |
337 |
|
|
338 |
|
* Thuban/Model/save.py (SessionSaver.write_db_connections): New. |
339 |
|
Write the db connections |
340 |
|
(SessionSaver.write_session): Call write_db_connections to write |
341 |
|
the connection before the data sources |
342 |
|
(SessionSaver.write_data_containers): Handle postgis shapestores |
343 |
|
|
344 |
|
* test/test_save.py (SaveSessionTest.thubanids) |
345 |
|
(SaveSessionTest.thubanidrefs): Update for new DTD |
346 |
|
(SaveSessionTest.test_save_postgis): New. Test saving a session |
347 |
|
with postgis connections |
348 |
|
|
349 |
|
* Thuban/Model/postgisdb.py (PostGISTable.DBConnection) |
350 |
|
(PostGISTable.TableName): New accessor methods for the connection |
351 |
|
and table name |
352 |
|
|
353 |
|
* test/test_postgis_db.py (TestPostGISTable.test_dbconn) |
354 |
|
(TestPostGISTable.test_dbname): New methods to test the new |
355 |
|
PostGISConnection methods |
356 |
|
|
357 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
358 |
|
|
359 |
|
* Thuban/Model/postgisdb.py (ConnectionError): New exception class |
360 |
|
for exceptions occurring when establishing a Database connection |
361 |
|
(PostGISConnection.connect): Catch psycopg.OperationalError during |
362 |
|
connects and raise ConnectionError. |
363 |
|
|
364 |
|
* test/test_postgis_db.py (TestPostgisDBExceptions): New class for |
365 |
|
tests for database exceptions |
366 |
|
|
367 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
368 |
|
|
369 |
|
Prepare the test suite for tests with required authentication |
370 |
|
|
371 |
|
* test/postgissupport.py (PostgreSQLServer.__init__): Add instance |
372 |
|
variables with two predefined users/passwords, one for the admin |
373 |
|
and one for a non-privileged user. |
374 |
|
(PostgreSQLServer.createdb): Pass the admin name to initdb and add |
375 |
|
the non-privileged user to the database and set the admin password |
376 |
|
(PostgreSQLServer.wait_for_postmaster): Use the admin user name. |
377 |
|
Better error reporting |
378 |
|
(PostgreSQLServer.connection_params) |
379 |
|
(PostgreSQLServer.connection_string): New methods to return |
380 |
|
information about how to connect to the server |
381 |
|
(PostgreSQLServer.execute_sql): New. Convenience method to execute |
382 |
|
SQL statements |
383 |
|
(PostgreSQLServer.require_authentication): Toggle whether the |
384 |
|
server requires authentication |
385 |
|
(PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New. |
386 |
|
Add or alter users |
387 |
|
(PostGISDatabase.initdb): Pass the admin name one the |
388 |
|
subprocesses' command lines. Grant select rights on |
389 |
|
geometry_columns to everybody. |
390 |
|
(upload_shapefile): Use the admin name and password when |
391 |
|
connecting. Grant select rights on the new table to everybody. |
392 |
|
|
393 |
|
* test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the |
394 |
|
server's new methods to get the connection parameters. |
395 |
|
|
396 |
|
* test/test_postgis_session.py (TestSessionWithPostGIS.setUp) |
397 |
|
(TestSessionWithPostGIS.test_remove_dbconn_exception): Use the |
398 |
|
server's new methods to get the connection parameters. |
399 |
|
|
400 |
|
* test/test_postgis_db.py |
401 |
|
(TestPostGISConnection.test_gis_tables_empty) |
402 |
|
(TestPostGISConnection.test_gis_tables_non_empty) |
403 |
|
(PostGISStaticTests.setUp): Use the server's new methods to get |
404 |
|
the connection parameters. |
405 |
|
|
406 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
407 |
|
|
408 |
|
* Thuban/UI/about.py (About.__init__): Add the psycopg version. |
409 |
|
|
410 |
|
* Thuban/version.py: Add psycopg version |
411 |
|
|
412 |
|
* Thuban/Model/postgisdb.py (psycopg_version): New. Return the |
413 |
|
version of the psycopg module |
414 |
|
|
415 |
|
2003-08-22 Bernhard Herzog <[email protected]> |
416 |
|
|
417 |
|
* Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used. |
418 |
|
(DBFrame.OnEdit): Removed because it's not used and wouldn't work |
419 |
|
at the moment. The functionality should probably be implemented |
420 |
|
some time, though. |
421 |
|
(DBFrame.OnRemove): Display a message if the connection can't be |
422 |
|
removed because it's still in use. |
423 |
|
|
424 |
|
2003-08-22 Jan-Oliver Wagner <[email protected]> |
425 |
|
|
426 |
|
* Thuban/UI/about.py (About.__init__): split up the huge about |
427 |
|
text into elements/lists for easier translation. This fixes bug |
428 |
|
https://intevation.de/rt/webrt?serial_num=2058 |
429 |
|
Also, made some forgotten string available for the i18n. |
430 |
|
|
431 |
|
2003-08-21 Bernhard Herzog <[email protected]> |
432 |
|
|
433 |
|
Make postgis support really optional including insensitive menu |
434 |
|
items. |
435 |
|
|
436 |
|
* Thuban/Model/postgisdb.py (has_postgis_support): New. Return |
437 |
|
whether the postgis is supported. |
438 |
|
|
439 |
|
* Thuban/UI/dbdialog.py: Put the psycopg import into try..except |
440 |
|
to make postgis support optional |
441 |
|
|
442 |
|
* Thuban/UI/mainwindow.py (_has_postgis_support): New. Context |
443 |
|
version of Thuban.Model.postgisdb.has_postgis_support |
444 |
|
(database_management command): Make it only sensitive if postgis |
445 |
|
is supported. |
446 |
|
|
447 |
|
2003-08-21 Jan-Oliver Wagner <[email protected]> |
448 |
|
|
449 |
|
* Doc/manual/thuban-manual.xml: Added CVS revision for rev-history. |
450 |
|
(section Adding and Removing Layers): Added text and described |
451 |
|
multi-selection. |
452 |
|
(chapter Extensions): New. |
453 |
|
|
454 |
|
2003-08-21 Jan-Oliver Wagner <[email protected]> |
455 |
|
|
456 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog |
457 |
|
settings to allow multiple files to load into the map. |
458 |
|
Also reduced selection to *.shp as a default. |
459 |
|
|
460 |
|
2003-08-20 Bernhard Herzog <[email protected]> |
461 |
|
|
462 |
|
Add dialogs and commands to open database connections and add |
463 |
|
database layers. |
464 |
|
|
465 |
|
* Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New |
466 |
|
method to open the database connection management dialog |
467 |
|
(MainWindow.AddDBLayer): New method to add a layer from a database |
468 |
|
(_has_dbconnections): New helper function to use for sensitivity |
469 |
|
(database_management command, layer_add_db command): New commands |
470 |
|
that call the above new methods. |
471 |
|
(main_menu): Add the new commands to the menu. |
472 |
|
|
473 |
|
* Thuban/Model/postgisdb.py (PostGISConnection.__init__) |
474 |
|
(PostGISConnection.connect): Establish the actual connection in a |
475 |
|
separate method and call it in __init__. This makes it easier to |
476 |
|
override the behavior in test cases |
477 |
|
(PostGISConnection.BriefDescription): New method to return a brief |
478 |
|
description for use in dialogs. |
479 |
|
|
480 |
|
* test/test_postgis_db.py (NonConnection): DB connection that |
481 |
|
doesn't actually connect |
482 |
|
(TestBriefDescription): New class with tests for the new |
483 |
|
BriefDescription method |
484 |
|
|
485 |
|
2003-08-19 Jan-Oliver Wagner <[email protected]> |
486 |
|
|
487 |
|
Moved anything from extensions to libraries. |
488 |
|
|
489 |
|
* libraries: New. |
490 |
|
|
491 |
|
* libraries/ pyprojection, pyshapelib, shapelib, thuban: New. |
492 |
|
|
493 |
|
* libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i, |
494 |
|
Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have |
495 |
|
been moved here from thuban/extensions/pyprojection/ |
496 |
|
See there in the Attic for the older history. |
497 |
|
|
498 |
|
* libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i, |
499 |
|
dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py, |
500 |
|
shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files |
501 |
|
have been moved here from thuban/extensions/pyshapelib/ |
502 |
|
See there in the Attic for the older history. |
503 |
|
|
504 |
|
* libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These |
505 |
|
files have been moved here from thuban/extensions/shapelib/ |
506 |
|
See there in the Attic for the older history. |
507 |
|
|
508 |
|
* libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h, |
509 |
|
gdalwarp.cpp, wxproj.cpp: These files have been moved here from |
510 |
|
thuban/extensions/thuban/ |
511 |
|
See there in the Attic for the older history. |
512 |
|
|
513 |
|
* MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries. |
514 |
|
|
515 |
|
* extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h, |
516 |
|
gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban. |
517 |
|
|
518 |
|
* extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: |
519 |
|
Moved to libraries/shapelib. |
520 |
|
|
521 |
|
* extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py, |
522 |
|
shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c, |
523 |
|
ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c: |
524 |
|
Moved to libraries/pyshapelib. |
525 |
|
|
526 |
|
* extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py, |
527 |
|
LICENSE, Projection.i, Projection_wrap.c, swighelp.txt: |
528 |
|
Moved to libraries/pyprojection. |
529 |
|
|
530 |
|
* extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed. |
531 |
|
|
532 |
|
* extensions: Removed. |
533 |
|
|
534 |
|
2003-08-19 Bernhard Herzog <[email protected]> |
535 |
|
|
536 |
|
* test/test_viewport.py (ViewPortTest): We don't use the |
537 |
|
facilities of FileTestMixin so don't derive from it. |
538 |
|
(TestViewportWithPostGIS): New class with tests for using a |
539 |
|
viewport on a map with postgis layers. |
540 |
|
|
541 |
|
2003-08-19 Bernhard Herzog <[email protected]> |
542 |
|
|
543 |
|
Add the db connection management to the session. |
544 |
|
|
545 |
|
* Thuban/Model/session.py (Session.__init__): New instance |
546 |
|
variable db_connections |
547 |
|
(Session.AddDBConnection, Session.DBConnections) |
548 |
|
(Session.HasDBConnections, Session.CanRemoveDBConnection) |
549 |
|
(Session.RemoveDBConnection): New methods to manage and query the |
550 |
|
db connections managed by the session |
551 |
|
(Session.OpenDBShapeStore): New method to open a shapestore from a |
552 |
|
db connection |
553 |
|
|
554 |
|
* Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New |
555 |
|
messages for the db connection handling in the session |
556 |
|
|
557 |
|
* test/test_postgis_session.py: New. test cases for the session's |
558 |
|
db connection handling with postgis connections |
559 |
|
|
560 |
|
2003-08-19 Bernhard Herzog <[email protected]> |
561 |
|
|
562 |
|
Add very basic postgis database support and the corresponding test |
563 |
|
cases. The test cases require a PostgreSQL + postgis installation |
564 |
|
but no existing database. The database will be created |
565 |
|
automatically by the test cases |
566 |
|
|
567 |
|
* test/README: Add note about skipped tests and the requirements |
568 |
|
of the postgis tests. |
569 |
|
|
570 |
|
* Thuban/Model/postgisdb.py: New. Basic postgis database support. |
571 |
|
|
572 |
|
* test/test_postgis_db.py: New. Test cases for the postgis |
573 |
|
support. |
574 |
|
|
575 |
|
* Thuban/Model/wellknowntext.py: New. Parser for well-known-text |
576 |
|
format |
577 |
|
|
578 |
|
* test/test_wellknowntext.py: New. Test cases for the |
579 |
|
wellknowntext parser |
580 |
|
|
581 |
|
* test/postgissupport.py: New. Support module for tests involving |
582 |
|
a postgis database. |
583 |
|
|
584 |
|
* test/support.py (execute_as_testsuite): Shut down the postmaster |
585 |
|
if it's still running after the tests |
586 |
|
|
587 |
|
* Thuban/Model/data.py (RAW_WKT): New constant for raw data in |
588 |
|
well known text format |
589 |
|
|
590 |
|
2003-08-19 Jan-Oliver Wagner <[email protected]> |
591 |
|
|
592 |
|
* Examples/simple_extensions/hello_world.py: New. Raises a Hello World |
593 |
|
message dialog. |
594 |
|
|
595 |
|
2003-08-18 Bernhard Herzog <[email protected]> |
596 |
|
|
597 |
|
* test/support.py (ThubanTestResult.printErrors): Indent the |
598 |
|
reason for the skips in the output to make it a bit more readable. |
599 |
|
(execute_as_testsuite): New helper function to run a test suite |
600 |
|
and print some more information. |
601 |
|
(run_tests): Use execute_as_testsuite to run the tests |
602 |
|
|
603 |
|
* test/runtests.py (main): Use execute_as_testsuite to run the |
604 |
|
tests |
605 |
|
|
606 |
|
2003-08-18 Bernhard Herzog <[email protected]> |
607 |
|
|
608 |
|
Fix some bugs in Thuban and the test suite that were uncovered by |
609 |
|
changes introduced in Python 2.3: |
610 |
|
|
611 |
|
* Thuban/Model/table.py (DBFTable.__init__): Make sure the |
612 |
|
filename is an absolute name |
613 |
|
|
614 |
|
* Thuban/Model/layer.py (RasterLayer.__init__): Make sure the |
615 |
|
filename is an absolute name |
616 |
|
|
617 |
|
* test/test_save.py (SaveSessionTest.testRasterLayer): Use a |
618 |
|
unique filename to save to and use the correct relative filename |
619 |
|
in the expected output. |
620 |
|
(SaveSessionTest.test_dbf_table): Use the correct relative |
621 |
|
filename in the expected output. |
622 |
|
|
623 |
|
* test/test_layer.py (TestLayer.test_raster_layer): Update the |
624 |
|
test to check whether the filename is absolute. |
625 |
|
|
626 |
|
2003-08-18 Jan-Oliver Wagner <[email protected]> |
627 |
|
|
628 |
|
* Thuban/UI/about.py (About.__init__): Added Silke Reimer. |
629 |
|
|
630 |
|
2003-08-15 Bernhard Herzog <[email protected]> |
631 |
|
|
632 |
|
Change the way shapes are returned by a shape store. The |
633 |
|
ShapesInRegion method returns an iterator over actual shape |
634 |
|
objects instead of a list of shape ids. |
635 |
|
|
636 |
|
* Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape |
637 |
|
id. |
638 |
|
(ShapefileStore.ShapesInRegion): Return an iterator over the |
639 |
|
shapes which yields shape objects instead of returning a list of |
640 |
|
shape ids |
641 |
|
(ShapefileStore.AllShapes): New. Return an iterator over all |
642 |
|
shapes in the shape store |
643 |
|
(DerivedShapeStore.AllShapes): New. Like in ShapefileStore |
644 |
|
|
645 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Update |
646 |
|
doc-string. |
647 |
|
|
648 |
|
* Thuban/UI/baserenderer.py |
649 |
|
(BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to |
650 |
|
layer_shapes and make it return an iterator containg shapes |
651 |
|
instead of a list of ids. |
652 |
|
(BaseRenderer.draw_shape_layer): Update doc-string; Adapt to |
653 |
|
layer_shapes() change |
654 |
|
|
655 |
|
* Thuban/UI/renderer.py (ScreenRenderer.layer_ids) |
656 |
|
(ScreenRenderer.layer_shapes): Rename as in BaseRenderer |
657 |
|
|
658 |
|
* Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to |
659 |
|
changes in the ShapesInRegion return value. |
660 |
|
(ViewPort._get_hit_tester): Remove commented out code |
661 |
|
|
662 |
|
* test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the |
663 |
|
new return value. |
664 |
|
(SimpleShapeStore.AllShapes): New. Implement this method too. |
665 |
|
|
666 |
|
* test/test_layer.py (TestLayer.test_arc_layer) |
667 |
|
(TestLayer.test_polygon_layer, TestLayer.test_point_layer) |
668 |
|
(TestLayer.test_point_layer_with_projection) |
669 |
|
(TestLayer.test_derived_store): Adapt to changes in the |
670 |
|
ShapesInRegion return value. |
671 |
|
|
672 |
|
* test/test_shapefilestore.py |
673 |
|
(TestShapefileStoreArc.test_shapes_in_region) |
674 |
|
(TestShapefileStorePolygon.test_shapes_in_region) |
675 |
|
(TestShapefileStorePoint.test_shapes_in_region): Adapt to changes |
676 |
|
in the ShapesInRegion return value. |
677 |
|
(TestShapefileStorePoint.test_all_shapes) |
678 |
|
(TestShapefileStoreArc.test_shape_shapeid): New tests for the new |
679 |
|
methods |
680 |
|
|
681 |
|
* test/test_derivedshapestore.py |
682 |
|
(TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in |
683 |
|
the ShapesInRegion return value. |
684 |
|
(TestDerivedShapeStore.test_all_shapes) |
685 |
|
(TestDerivedShapeStore.test_shape_shapeid): New tests for the new |
686 |
|
methods |
687 |
|
|
688 |
|
2003-08-15 Bernhard Herzog <[email protected]> |
689 |
|
|
690 |
|
Make the renderers deal correctly with raw vs. python level |
691 |
|
representation of shape geometries |
692 |
|
|
693 |
|
* Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer): |
694 |
|
Return a flag useraw in addition to the callable and the parameter |
695 |
|
to indicate whether the callable can deal with the raw shape data |
696 |
|
or uses the higher level python lists of coordinates. The callable |
697 |
|
now should accept either the raw data or the return value of the |
698 |
|
shape's Points() method. |
699 |
|
(BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer |
700 |
|
change |
701 |
|
(BaseRenderer.projected_points): Instead of the shape id use the |
702 |
|
points list as parameter. |
703 |
|
(BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape) |
704 |
|
(BaseRenderer.draw_point_shape): Adapt to projected_points() |
705 |
|
change and accept the points list as parameter instead of the |
706 |
|
shape id. |
707 |
|
|
708 |
|
* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return |
709 |
|
the useraw flag as required by the BaseRenderer |
710 |
|
(ScreenRenderer.draw_shape_layer): Adapt to low-level renderer |
711 |
|
changes. |
712 |
|
|
713 |
|
* test/test_baserenderer.py |
714 |
|
(TestBaseRenderer.test_point_with_classification): New test for |
715 |
|
rendering a map with classifications. |
716 |
|
|
717 |
|
2003-08-15 Bernhard Herzog <[email protected]> |
718 |
|
|
719 |
|
* Thuban/UI/viewport.py (ViewPort.find_shape_at) |
720 |
|
(ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer) |
721 |
|
(ViewPort._get_hit_tester, ViewPort.projected_points) |
722 |
|
(ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon) |
723 |
|
(ViewPort._find_label_at): Split the find_shape_at method into |
724 |
|
several new methods and use the functions in the hit-test module. |
725 |
|
|
726 |
|
* Thuban/UI/hittest.py: New module with Python-level hit-testing |
727 |
|
functions |
728 |
|
|
729 |
|
* test/test_hittest.py: New. Test for the new hittest module |
730 |
|
|
731 |
|
2003-08-15 Bernhard Herzog <[email protected]> |
732 |
|
|
733 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer |
734 |
|
projection to all corners of the bounding box to get a better |
735 |
|
approximation of the projected bounding box |
736 |
|
|
737 |
|
* test/test_layer.py (TestLayer.test_point_layer_with_projection): |
738 |
|
New. Test coordinate handling of a layer with a projection. |
739 |
|
Catches the bug fixed in Layer.ShapesInRegion |
740 |
|
|
741 |
|
2003-08-15 Bernhard Herzog <[email protected]> |
742 |
|
|
743 |
|
Move some of the mock objects in test_baserenderer into their own |
744 |
|
module so they can easily be used from other tests |
745 |
|
|
746 |
|
* test/mockgeo.py: New test helper module with some mock objects |
747 |
|
for geometry related things like shapes, shapestores and |
748 |
|
projections. |
749 |
|
|
750 |
|
* test/test_mockgeo.py: New. Tests for the new helper module |
751 |
|
|
752 |
|
* test/test_baserenderer.py: Some of the mock-objects are in |
753 |
|
mockgeo now. |
754 |
|
|
755 |
|
2003-08-12 Jan-Oliver Wagner <[email protected]> |
756 |
|
|
757 |
|
* Thuban/UI/about.py (About.__init__): Added Bj�rn Broscheit. |
758 |
|
|
759 |
2003-08-12 Bernhard Herzog <[email protected]> |
2003-08-12 Bernhard Herzog <[email protected]> |
760 |
|
|
761 |
* po/de.po: New. German translations by Bjoern Broscheit |
* po/de.po: New. German translations by Bjoern Broscheit |