/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1665 - (show annotations)
Wed Aug 27 15:21:06 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 276954 byte(s)
update ChangeLog

1 2003-08-27 Bernhard Herzog <[email protected]>
2
3 As preparation for the 0.9 release, switch thuban files to a
4 non-dev namespace
5
6 * Thuban/Model/save.py (SessionSaver.write_session): Write files
7 with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
8 namespace
9
10 * Thuban/Model/load.py (SessionLoader.__init__): Accept the
11 http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
12
13 * test/test_save.py (SaveSessionTest.dtd)
14 (SaveSessionTest.testEmptySession)
15 (SaveSessionTest.testSingleLayer)
16 (SaveSessionTest.testLayerProjection)
17 (SaveSessionTest.testRasterLayer)
18 (SaveSessionTest.testClassifiedLayer)
19 (SaveSessionTest.test_dbf_table)
20 (SaveSessionTest.test_joined_table)
21 (SaveSessionTest.test_save_postgis): Update for new namespace
22
23 * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
24 (TestLayerVisibility.file_contents, TestLabels.file_contents)
25 (TestLayerProjection.file_contents)
26 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
27 (TestPostGISLayer.file_contents)
28 (TestPostGISLayerPassword.file_contents)
29 (TestLoadError.file_contents, TestLoadError.test): Update for new
30 namespace
31
32 2003-08-27 Bernhard Herzog <[email protected]>
33
34 Make the table interface distinguish between row ids (an integer
35 that uniquely identifies a row) and row ordinals (a simple row
36 count from 0 to NumRows() - 1)
37
38 * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
39 (PostGISTable.RowOrdinalToId): New methods to conver between row
40 ids and row ordinals
41 (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
42 parameter row_is_ordinal to indicate whether the row parameter is
43 the row id or the ordinal
44
45 * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
46 (TransientTableBase.RowOrdinalToId)
47 (AutoTransientTable.RowIdToOrdinal)
48 (AutoTransientTable.RowOrdinalToId): Same new methods as in
49 PostGISTable.
50 (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
51 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
52 Same new parameter as in PostGISTable.
53
54 * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
55 (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
56 (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
57 (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
58 (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
59 parameter as in PostGISTable.
60
61 * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
62 (DataTable.RowOrdinalToId): New methods to convert between row ids
63 and row ordinals.
64 (TableGrid.SelectRowById): New method to select a row based on its
65 ID as opposed to its ordinal
66 (DataTable.GetValue, TableGrid.OnRangeSelect)
67 (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
68 (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
69 (LayerTableFrame.__init__): Convert between row ids and row
70 ordinals as appropriate
71
72 * test/postgissupport.py (PostGISDatabase.__init__): Add
73 doc-string.
74 (PostGISDatabase.initdb): The optional third item in a tuple in
75 tables is now a (key, value) list with additional arguments to
76 pass to upload_shapefile
77 (upload_shapefile): New parameter gid_offset to allow gids that
78 are not the same as the shapeids in the shapefile
79 (PostgreSQLServer.get_default_static_data_db): Use the new
80 gid_offset to make the gids in landmarks 1000 higher than the
81 shapeids in the shapefile
82
83 * test/test_viewport.py
84 (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
85 new shapeids in the landmarks table
86
87 * test/test_transientdb.py
88 (TestTransientTable.run_iceland_political_tests)
89 (TestTransientTable.test_transient_joined_table): Add tests for
90 the new table methods and new keywords arguments.
91
92 * test/test_postgis_db.py
93 (TestPostGISTable.test_read_row_as_dict_row_count_mode)
94 (TestPostGISTable.test_read_value_row_count_mode)
95 (TestPostGISTable.test_row_id_to_ordinal)
96 (TestPostGISTable.test_row_oridnal_to_id): New test for the new
97 table methods and the new arguments
98 (TestPostGISShapestorePoint.test_shapes_in_region)
99 (TestPostGISShapestorePoint.test_shape_raw_data)
100 (TestPostGISShapestorePoint.test_shape_points)
101 (TestPostGISShapestorePoint.test_shape_shapeid)
102 (TestPostGISShapestorePoint.test_all_shapes)
103 (TestPostGISTable.test_simple_query)
104 (TestPostGISTable.test_simple_query)
105 (TestPostGISTable.test_simple_query)
106 (TestPostGISTable.test_read_value)
107 (TestPostGISTable.test_read_row_as_dict): Adapt to the new
108 shapeids in the landmarks table
109
110 * test/test_memory_table.py
111 (TestMemoryTable.test_read_row_as_dict_row_count_mode)
112 (TestMemoryTable.test_read_value_row_count_mode)
113 (TestMemoryTable.test_row_id_to_ordinal)
114 (TestMemoryTable.test_row_oridnal_to_id): New test for the new
115 table methods and the new arguments
116
117 * test/test_dbf_table.py
118 (TestDBFTable.test_read_row_as_dict_row_count_mode)
119 (TestDBFTable.test_read_value_row_count_mode)
120 (TestDBFTable.test_row_id_to_ordinal)
121 (TestDBFTable.test_row_oridnal_to_id): New test for the new table
122 methods and the new arguments
123
124 2003-08-26 Bernhard Herzog <[email protected]>
125
126 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
127 more postgis specific but much faster method to get the bounding
128 box
129
130 2003-08-26 Bernhard Herzog <[email protected]>
131
132 * Thuban/Model/postgisdb.py (PostGISTable.Title)
133 (PostGISShapeStore.AllShapes): Add these missing methods.
134 (PostGISShapeStore.ShapesInRegion): No need to raise
135 StopIteration. We can simply return
136
137 * test/test_postgis_db.py (TestPostGISTable.test_title)
138 (TestPostGISShapestorePoint.test_all_shapes): New tests for the
139 new methods
140
141 2003-08-25 Bernhard Herzog <[email protected]>
142
143 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
144
145 * test/test_postgis_db.py (PolygonTests): New class containing
146 those tests from TestPostGISShapestorePolygon that can also be
147 used to test MUTLIPOLYGON tables
148 (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
149 so derive from that
150 (TestPostGISShapestoreMultiPolygon): New class with tests for
151 MUTLIPOLYGON tables
152
153 * test/postgissupport.py (PostGISDatabase.initdb): Allow the
154 tables argument to have tuples with three items to override the
155 WKT type used.
156 (PostgreSQLServer.get_default_static_data_db): Use the above to
157 create a polygon table with MUTLIPOLYGONs
158 (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
159 (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
160 coords_to*
161 (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
162 (wkt_converter): New. Map WKT types to converters
163 (upload_shapefile): New parameter force_wkt_type to use a
164 different WKT type than the default
165
166 2003-08-25 Bernhard Herzog <[email protected]>
167
168 * Thuban/UI/application.py
169 (ThubanApplication.run_db_param_dialog): New. Suitable as a
170 db_connection_callback. Main difference is that the dialog run
171 from this method doesn't have a parent so it can be used even when
172 there is no main window
173 (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
174 no db_connection_callback was given. This way the dialog pops up
175 even when the .thuban file was given as a command line parameter.
176
177 2003-08-25 Bernhard Herzog <[email protected]>
178
179 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
180 before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
181 which leads to an effectively frozen X session because the user
182 can only interact with the dialog but the mouse is still grabbed
183 by the canvas.
184 Also, call the tool's Hide method before MouseLeftUp because
185 MouseLeftUp may change the tool's coordinates.
186
187 2003-08-25 Bernhard Herzog <[email protected]>
188
189 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
190 LoadCancelled exceptions and handle them by returning immediately.
191
192 2003-08-25 Bernhard Herzog <[email protected]>
193
194 GUI part of loading sessions with postgis connections which may
195 require user interaction to get passwords or updated parameters
196
197 * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
198 bit nucer and be more generic.
199 (DBFrame.OnAdd): Adapt to new DBDialog interface
200
201 * Thuban/UI/application.py (ThubanApplication.OpenSession): New
202 optional parameter db_connection_callback which is passed to
203 load_session.
204
205 * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
206 Suitable as a db_connection_callback
207 (MainWindow.OpenSession): Use self.run_db_param_dialog as the
208 db_connection_callback of the application's OpenSession method
209
210
211 2003-08-25 Bernhard Herzog <[email protected]>
212
213 Basic loading of sessions containing postgis connections:
214
215 * Thuban/Model/load.py (LoadError): Add doc-string
216 (LoadCancelled): New exception class to indicate a cancelled load
217 (SessionLoader.__init__): Add the db_connection_callback parameter
218 which will be used by the loader to get updated parameters and a
219 password for a database connection
220 (SessionLoader.__init__): Add the new XML elements to the
221 dispatchers dictionary
222 (SessionLoader.check_attrs): Two new conversions, ascii to convert
223 to a byte-string object and idref as a generic id reference
224 (SessionLoader.start_dbconnection)
225 (SessionLoader.start_dbshapesource): New. Handlers for the new XML
226 elements
227 (load_session): Add the db_connection_callback to pass through the
228 SessionLoader
229
230 * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
231 New classes to test loading of sessions with postgis database
232 connections.
233
234 2003-08-25 Bernhard Herzog <[email protected]>
235
236 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
237 replace it and the comment with __BuildDate__ by the Source: and
238 Id: cvs keywords as used in the other files.
239
240 2003-08-25 Bernhard Herzog <[email protected]>
241
242 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
243 LoadError when a required attribute is missing. The code used to
244 be commented out for some reason, but probably should have been
245 active.
246
247 * test/test_load.py (TestLoadError.test): Test the message in the
248 LoadError too to make sure it really is about the missing
249 attribute
250
251 2003-08-22 Bernhard Herzog <[email protected]>
252
253 * test/test_save.py (SaveSessionTest.test_dbf_table)
254 (SaveSessionTest.test_joined_table): Add XML validation tests.
255
256 2003-08-22 Bernhard Herzog <[email protected]>
257
258 Implement saving a session with a postgis connection
259
260 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
261 elements for database connections and shapestores using db
262 connections
263 (session): Add the dbconnections to the content model
264
265 * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
266 Write the db connections
267 (SessionSaver.write_session): Call write_db_connections to write
268 the connection before the data sources
269 (SessionSaver.write_data_containers): Handle postgis shapestores
270
271 * test/test_save.py (SaveSessionTest.thubanids)
272 (SaveSessionTest.thubanidrefs): Update for new DTD
273 (SaveSessionTest.test_save_postgis): New. Test saving a session
274 with postgis connections
275
276 * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
277 (PostGISTable.TableName): New accessor methods for the connection
278 and table name
279
280 * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
281 (TestPostGISTable.test_dbname): New methods to test the new
282 PostGISConnection methods
283
284 2003-08-22 Bernhard Herzog <[email protected]>
285
286 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
287 for exceptions occurring when establishing a Database connection
288 (PostGISConnection.connect): Catch psycopg.OperationalError during
289 connects and raise ConnectionError.
290
291 * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
292 tests for database exceptions
293
294 2003-08-22 Bernhard Herzog <[email protected]>
295
296 Prepare the test suite for tests with required authentication
297
298 * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
299 variables with two predefined users/passwords, one for the admin
300 and one for a non-privileged user.
301 (PostgreSQLServer.createdb): Pass the admin name to initdb and add
302 the non-privileged user to the database and set the admin password
303 (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
304 Better error reporting
305 (PostgreSQLServer.connection_params)
306 (PostgreSQLServer.connection_string): New methods to return
307 information about how to connect to the server
308 (PostgreSQLServer.execute_sql): New. Convenience method to execute
309 SQL statements
310 (PostgreSQLServer.require_authentication): Toggle whether the
311 server requires authentication
312 (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
313 Add or alter users
314 (PostGISDatabase.initdb): Pass the admin name one the
315 subprocesses' command lines. Grant select rights on
316 geometry_columns to everybody.
317 (upload_shapefile): Use the admin name and password when
318 connecting. Grant select rights on the new table to everybody.
319
320 * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
321 server's new methods to get the connection parameters.
322
323 * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
324 (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
325 server's new methods to get the connection parameters.
326
327 * test/test_postgis_db.py
328 (TestPostGISConnection.test_gis_tables_empty)
329 (TestPostGISConnection.test_gis_tables_non_empty)
330 (PostGISStaticTests.setUp): Use the server's new methods to get
331 the connection parameters.
332
333 2003-08-22 Bernhard Herzog <[email protected]>
334
335 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
336
337 * Thuban/version.py: Add psycopg version
338
339 * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
340 version of the psycopg module
341
342 2003-08-22 Bernhard Herzog <[email protected]>
343
344 * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
345 (DBFrame.OnEdit): Removed because it's not used and wouldn't work
346 at the moment. The functionality should probably be implemented
347 some time, though.
348 (DBFrame.OnRemove): Display a message if the connection can't be
349 removed because it's still in use.
350
351 2003-08-22 Jan-Oliver Wagner <[email protected]>
352
353 * Thuban/UI/about.py (About.__init__): split up the huge about
354 text into elements/lists for easier translation. This fixes bug
355 https://intevation.de/rt/webrt?serial_num=2058
356 Also, made some forgotten string available for the i18n.
357
358 2003-08-21 Bernhard Herzog <[email protected]>
359
360 Make postgis support really optional including insensitive menu
361 items.
362
363 * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
364 whether the postgis is supported.
365
366 * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
367 to make postgis support optional
368
369 * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
370 version of Thuban.Model.postgisdb.has_postgis_support
371 (database_management command): Make it only sensitive if postgis
372 is supported.
373
374 2003-08-21 Jan-Oliver Wagner <[email protected]>
375
376 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
377 (section Adding and Removing Layers): Added text and described
378 multi-selection.
379 (chapter Extensions): New.
380
381 2003-08-21 Jan-Oliver Wagner <[email protected]>
382
383 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
384 settings to allow multiple files to load into the map.
385 Also reduced selection to *.shp as a default.
386
387 2003-08-20 Bernhard Herzog <[email protected]>
388
389 Add dialogs and commands to open database connections and add
390 database layers.
391
392 * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
393 method to open the database connection management dialog
394 (MainWindow.AddDBLayer): New method to add a layer from a database
395 (_has_dbconnections): New helper function to use for sensitivity
396 (database_management command, layer_add_db command): New commands
397 that call the above new methods.
398 (main_menu): Add the new commands to the menu.
399
400 * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
401 (PostGISConnection.connect): Establish the actual connection in a
402 separate method and call it in __init__. This makes it easier to
403 override the behavior in test cases
404 (PostGISConnection.BriefDescription): New method to return a brief
405 description for use in dialogs.
406
407 * test/test_postgis_db.py (NonConnection): DB connection that
408 doesn't actually connect
409 (TestBriefDescription): New class with tests for the new
410 BriefDescription method
411
412 2003-08-19 Jan-Oliver Wagner <[email protected]>
413
414 Moved anything from extensions to libraries.
415
416 * libraries: New.
417
418 * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
419
420 * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
421 Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
422 been moved here from thuban/extensions/pyprojection/
423 See there in the Attic for the older history.
424
425 * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
426 dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
427 shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
428 have been moved here from thuban/extensions/pyshapelib/
429 See there in the Attic for the older history.
430
431 * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
432 files have been moved here from thuban/extensions/shapelib/
433 See there in the Attic for the older history.
434
435 * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
436 gdalwarp.cpp, wxproj.cpp: These files have been moved here from
437 thuban/extensions/thuban/
438 See there in the Attic for the older history.
439
440 * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
441
442 * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
443 gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
444
445 * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
446 Moved to libraries/shapelib.
447
448 * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
449 shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
450 ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
451 Moved to libraries/pyshapelib.
452
453 * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
454 LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
455 Moved to libraries/pyprojection.
456
457 * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
458
459 * extensions: Removed.
460
461 2003-08-19 Bernhard Herzog <[email protected]>
462
463 * test/test_viewport.py (ViewPortTest): We don't use the
464 facilities of FileTestMixin so don't derive from it.
465 (TestViewportWithPostGIS): New class with tests for using a
466 viewport on a map with postgis layers.
467
468 2003-08-19 Bernhard Herzog <[email protected]>
469
470 Add the db connection management to the session.
471
472 * Thuban/Model/session.py (Session.__init__): New instance
473 variable db_connections
474 (Session.AddDBConnection, Session.DBConnections)
475 (Session.HasDBConnections, Session.CanRemoveDBConnection)
476 (Session.RemoveDBConnection): New methods to manage and query the
477 db connections managed by the session
478 (Session.OpenDBShapeStore): New method to open a shapestore from a
479 db connection
480
481 * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
482 messages for the db connection handling in the session
483
484 * test/test_postgis_session.py: New. test cases for the session's
485 db connection handling with postgis connections
486
487 2003-08-19 Bernhard Herzog <[email protected]>
488
489 Add very basic postgis database support and the corresponding test
490 cases. The test cases require a PostgreSQL + postgis installation
491 but no existing database. The database will be created
492 automatically by the test cases
493
494 * test/README: Add note about skipped tests and the requirements
495 of the postgis tests.
496
497 * Thuban/Model/postgisdb.py: New. Basic postgis database support.
498
499 * test/test_postgis_db.py: New. Test cases for the postgis
500 support.
501
502 * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
503 format
504
505 * test/test_wellknowntext.py: New. Test cases for the
506 wellknowntext parser
507
508 * test/postgissupport.py: New. Support module for tests involving
509 a postgis database.
510
511 * test/support.py (execute_as_testsuite): Shut down the postmaster
512 if it's still running after the tests
513
514 * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
515 well known text format
516
517 2003-08-19 Jan-Oliver Wagner <[email protected]>
518
519 * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
520 message dialog.
521
522 2003-08-18 Bernhard Herzog <[email protected]>
523
524 * test/support.py (ThubanTestResult.printErrors): Indent the
525 reason for the skips in the output to make it a bit more readable.
526 (execute_as_testsuite): New helper function to run a test suite
527 and print some more information.
528 (run_tests): Use execute_as_testsuite to run the tests
529
530 * test/runtests.py (main): Use execute_as_testsuite to run the
531 tests
532
533 2003-08-18 Bernhard Herzog <[email protected]>
534
535 Fix some bugs in Thuban and the test suite that were uncovered by
536 changes introduced in Python 2.3:
537
538 * Thuban/Model/table.py (DBFTable.__init__): Make sure the
539 filename is an absolute name
540
541 * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
542 filename is an absolute name
543
544 * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
545 unique filename to save to and use the correct relative filename
546 in the expected output.
547 (SaveSessionTest.test_dbf_table): Use the correct relative
548 filename in the expected output.
549
550 * test/test_layer.py (TestLayer.test_raster_layer): Update the
551 test to check whether the filename is absolute.
552
553 2003-08-18 Jan-Oliver Wagner <[email protected]>
554
555 * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
556
557 2003-08-15 Bernhard Herzog <[email protected]>
558
559 Change the way shapes are returned by a shape store. The
560 ShapesInRegion method returns an iterator over actual shape
561 objects instead of a list of shape ids.
562
563 * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
564 id.
565 (ShapefileStore.ShapesInRegion): Return an iterator over the
566 shapes which yields shape objects instead of returning a list of
567 shape ids
568 (ShapefileStore.AllShapes): New. Return an iterator over all
569 shapes in the shape store
570 (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
571
572 * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
573 doc-string.
574
575 * Thuban/UI/baserenderer.py
576 (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
577 layer_shapes and make it return an iterator containg shapes
578 instead of a list of ids.
579 (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
580 layer_shapes() change
581
582 * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
583 (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
584
585 * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
586 changes in the ShapesInRegion return value.
587 (ViewPort._get_hit_tester): Remove commented out code
588
589 * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
590 new return value.
591 (SimpleShapeStore.AllShapes): New. Implement this method too.
592
593 * test/test_layer.py (TestLayer.test_arc_layer)
594 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
595 (TestLayer.test_point_layer_with_projection)
596 (TestLayer.test_derived_store): Adapt to changes in the
597 ShapesInRegion return value.
598
599 * test/test_shapefilestore.py
600 (TestShapefileStoreArc.test_shapes_in_region)
601 (TestShapefileStorePolygon.test_shapes_in_region)
602 (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
603 in the ShapesInRegion return value.
604 (TestShapefileStorePoint.test_all_shapes)
605 (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
606 methods
607
608 * test/test_derivedshapestore.py
609 (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
610 the ShapesInRegion return value.
611 (TestDerivedShapeStore.test_all_shapes)
612 (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
613 methods
614
615 2003-08-15 Bernhard Herzog <[email protected]>
616
617 Make the renderers deal correctly with raw vs. python level
618 representation of shape geometries
619
620 * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
621 Return a flag useraw in addition to the callable and the parameter
622 to indicate whether the callable can deal with the raw shape data
623 or uses the higher level python lists of coordinates. The callable
624 now should accept either the raw data or the return value of the
625 shape's Points() method.
626 (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
627 change
628 (BaseRenderer.projected_points): Instead of the shape id use the
629 points list as parameter.
630 (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
631 (BaseRenderer.draw_point_shape): Adapt to projected_points()
632 change and accept the points list as parameter instead of the
633 shape id.
634
635 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
636 the useraw flag as required by the BaseRenderer
637 (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
638 changes.
639
640 * test/test_baserenderer.py
641 (TestBaseRenderer.test_point_with_classification): New test for
642 rendering a map with classifications.
643
644 2003-08-15 Bernhard Herzog <[email protected]>
645
646 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
647 (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
648 (ViewPort._get_hit_tester, ViewPort.projected_points)
649 (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
650 (ViewPort._find_label_at): Split the find_shape_at method into
651 several new methods and use the functions in the hit-test module.
652
653 * Thuban/UI/hittest.py: New module with Python-level hit-testing
654 functions
655
656 * test/test_hittest.py: New. Test for the new hittest module
657
658 2003-08-15 Bernhard Herzog <[email protected]>
659
660 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
661 projection to all corners of the bounding box to get a better
662 approximation of the projected bounding box
663
664 * test/test_layer.py (TestLayer.test_point_layer_with_projection):
665 New. Test coordinate handling of a layer with a projection.
666 Catches the bug fixed in Layer.ShapesInRegion
667
668 2003-08-15 Bernhard Herzog <[email protected]>
669
670 Move some of the mock objects in test_baserenderer into their own
671 module so they can easily be used from other tests
672
673 * test/mockgeo.py: New test helper module with some mock objects
674 for geometry related things like shapes, shapestores and
675 projections.
676
677 * test/test_mockgeo.py: New. Tests for the new helper module
678
679 * test/test_baserenderer.py: Some of the mock-objects are in
680 mockgeo now.
681
682 2003-08-12 Jan-Oliver Wagner <[email protected]>
683
684 * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
685
686 2003-08-12 Bernhard Herzog <[email protected]>
687
688 * po/de.po: New. German translations by Bjoern Broscheit
689
690 2003-08-12 Bernhard Herzog <[email protected]>
691
692 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
693 strings have to be one string literal.
694
695 2003-08-11 Bernhard Herzog <[email protected]>
696
697 * test/support.py (FloatComparisonMixin.assertPointListEquals):
698 New. This method was used in various derived classes, but it's
699 better to have it here.
700
701 * test/test_shapefilestore.py
702 (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
703 FloatComparisonMixin
704
705 * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
706 It's now in FloatComparisonMixin
707
708 * test/test_derivedshapestore.py
709 (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
710 in FloatComparisonMixin
711
712 2003-08-11 Bernhard Herzog <[email protected]>
713
714 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
715 error message
716
717 2003-08-08 Jan-Oliver Wagner <[email protected]>
718
719 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
720 with version number.
721 Changed title to reflect version number of Thuban.
722
723 2003-08-08 Jan-Oliver Wagner <[email protected]>
724
725 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
726 the list corresponds to the "About" web page.
727
728 2003-08-08 Bernhard Herzog <[email protected]>
729
730 * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
731 Make sure translated strings are recognized as one string literal.
732
733 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
734 Make sure translated strings are recognized as one string literal.
735
736 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
737 translated strings are recognized as one string literal.
738
739 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
740 sure translated strings are recognized as one string literal.
741
742 2003-08-07 Bernhard Herzog <[email protected]>
743
744 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
745 Simply delegates to the original shapestore.
746
747 * test/test_derivedshapestore.py
748 (TestDerivedShapeStore.test_raw_format): New. Test case for
749 DerivedShapeStore.RawShapeFormat
750
751 2003-08-07 Bernhard Herzog <[email protected]>
752
753 Add raw data interface to shape objects.
754
755 * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
756 class to ShapefileShape which now holds shapefile specific
757 information.
758 (ShapefileShape.compute_bbox): Simplified to not cache any
759 information. The way this method is used that shouldn't matter
760 performance wise.
761 (ShapefileShape.RawData): New. Return the shapeid which is the raw
762 data format for shapes from shapefiles.
763 (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
764 in the shape objects returned by a shapestore. For a
765 ShapefileStore this is always RAW_SHAPEFILE.
766 (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
767 method.
768
769 * test/test_shapefilestore.py
770 (TestShapefileStore.test_raw_format): New test to test the raw
771 format feature of shapes.
772
773 * Thuban/Model/layer.py: Remove the unused import of Shape from
774 data. It was only there for interface compatibility but it's not
775 used inside of Thuban and the generic Shape class has gone away.
776
777 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
778 the raw data format and only use an optimized version of its a
779 shapefile.
780
781 2003-08-07 Bernhard Herzog <[email protected]>
782
783 * test/test_baserenderer.py (SimpleShape): Shape class for the
784 tests.
785 (SimpleShapeStore.Shape): Use SimpleShape instead of
786 Thuban.Model.data.Shape to make the tests independed of the coming
787 changes.
788
789 2003-08-07 Bernhard Herzog <[email protected]>
790
791 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
792 (ThubanTestProgram): New classes that extend the respective
793 classes from unittest. These new version support skipping tests
794 under certain expected conditions. In the Thuban test suite we
795 uses this for tests that require the optional gdal support.
796 (run_tests): Use ThubanTestProgram instead of the unittest.main()
797
798 * test/runtests.py (main): Use the new ThubanTestRunner instead of
799 the normal one from unittest
800
801 * test/test_layer.py (TestLayer.test_raster_layer): If this test
802 is not run because gdal support isn't available report this to the
803 runner.
804
805 * test/test_baserenderer.py
806 (TestBaseRenderer.test_raster_no_projection): Do not run this test
807 if gdal support isn't available and report this to the runner.
808
809 2003-08-06 Bernhard Herzog <[email protected]>
810
811 Rearrange the renderers a bit, partly in preparation for changes
812 required for the postgis merge, partly to make it more testable.
813 Also make the representation of coordinates in Shapes more
814 consistent.
815
816 * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
817 this class is now in BaseRenderer. This class is now practically
818 only a specialization of BaseRenderer for rendering to an actual
819 wx DC.
820 (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
821 to get the shapetype specific rendering functions.
822
823 * Thuban/UI/baserenderer.py: New file with the basic rendering
824 logic. The code in this file is completely independend of wx.
825 (BaseRenderer): Class with the basic rendering logic
826
827 * test/test_baserenderer.py: New. Test cases for BaseRenderer
828
829 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
830 error_on_redraw to guard agains endless loops and stack overflows
831 when there's a bug in the rendering code that raises exceptions.
832 (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
833 rendering into a separate method _do_redraw so that error handling
834 is a bit easier. When an exception occurs, set error_on_redraw to
835 true. When it's true on entry to OnIdle do nothing and return
836 immediately.
837
838 * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
839 Shape object will always have the coordinates as a list of list of
840 coordinate pairs (tuples).
841 (Shape.compute_bbox): Adapt to new representation.
842
843 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
844 (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
845 Shape objects.
846
847 * test/test_shapefilestore.py
848 (ShapefileStoreTests.assertFloatTuplesEqual)
849 (ShapefileStoreTests.assertPointListEquals): Rename to
850 assertPointListEquals and change purpose to checking equality of
851 the lists returned by Shape.Points().
852 (TestShapefileStoreArc.test_shape)
853 (TestShapefileStorePolygon.test_shape)
854 (TestShapefileStorePoint.test_shape): Use the new
855 assertPointListEquals instead of assertFloatTuplesEqual
856
857 * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
858 (TestLayer.assertPointListEquals): Rename to assertPointListEquals
859 and change purpose to checking equality of the lists returned by
860 Shape.Points().
861 (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
862 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
863 (TestLayer.test_derived_store): Use the new assertPointListEquals
864 instead of assertFloatTuplesEqual
865
866 * test/test_derivedshapestore.py
867 (TestDerivedShapeStore.assertFloatTuplesEqual)
868 (TestDerivedShapeStore.assertPointListEquals): Rename to
869 assertPointListEquals and change purpose to checking equality of
870 the lists returned by Shape.Points().
871 (TestDerivedShapeStore.test_shape): Use the new
872 assertPointListEquals instead of assertFloatTuplesEqual
873
874 2003-08-06 Jan-Oliver Wagner <[email protected]>
875
876 * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
877 a bounding box. A dialog is raised in case, no bounding box
878 is found. This fixes bug #2043:
879 https://intevation.de/rt/webrt?serial_num=2043
880
881 2003-08-05 Bernhard Herzog <[email protected]>
882
883 * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
884 object look like a Color instantiation. Formerly it looked like a
885 tuple.
886
887 * test/test_color.py (TestColor.test_repr)
888 (TestColor.test_equality, TestColor.test_inequality): New. test
889 some more apects of the Color class
890 (TestTransparent.test_repr, TestTransparent.test_hex)
891 (TestTransparent.test_equality): New. Test cases for the
892 Transparent object.
893
894 2003-08-04 Jan-Oliver Wagner <[email protected]>
895
896 * Doc/manual/thuban-manual.xml: a number of small improvements.
897 The resulting file is the version submitted for GREAT-ER II.
898
899 2003-08-01 Bernhard Herzog <[email protected]>
900
901 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
902 Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
903 Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
904
905 * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
906 (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
907 (ThubanEndBusyCursor): Add doc-strings
908
909 2003-08-01 Bernhard Herzog <[email protected]>
910
911 First step towards PostGIS integration. More abstraction by movin
912 more code from the layer to the shapestore. More methods of the
913 layer are now simply delegated to the equivalent method of the
914 shapestore. The SHAPETYPE_* constants are now in data not in
915 layer.
916
917 * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
918 (SHAPETYPE_POINT, Shape): Move these constants and classes from
919 layer.py to data.py
920 (ShapefileStore.__init__): More Initialization for the new methods
921 and functionality.
922 (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
923 (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
924 (ShapefileStore.Shape): New methods that were formerly implemented
925 in the layer.
926 (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
927 (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
928 (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
929 equivalents of the new shape methods. These versions are simply
930 delegated to the original shapstore.
931
932 * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
933 (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
934 (Layer.SetShapeStore): Removed the initializatin of instance
935 variables that were needed for the stuff that's now in
936 ShapefileStore
937 (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
938 (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
939 shapestore.
940
941 * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
942 Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
943 instead of layer.
944
945 * test/test_shapefilestore.py: New. Tests for ShapefileStore.
946
947 * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
948
949 * test/test_layer.py: Import the SHAPETYPE_* constants from data
950 instead of layer.
951 (TestLayer.test_derived_store): Remove the test for the exception
952 when instantiating the DerivedShapeStore with an incompatible
953 table which is now in test_derivedshapestore.py. Add some more
954 tests of the layer methods to determine whether they work for a
955 DerivedShapeStore as well.
956
957 2003-07-31 Jonathan Coles <[email protected]>
958
959 * Doc/manual/thuban-manual.xml: Fix the list of required packages
960 by just listing the name and where they can be found.
961
962 2003-07-31 Frank Koormann <[email protected]>
963
964 * Doc/manual/thuban-manual.xml:
965 Changed the screenshot elements to figure.
966 Changed some variablelist elements to itemizedlist.
967 Added section on GDAL formats.
968
969 2003-07-31 Jonathan Coles <[email protected]>
970
971 * Doc/manual/thuban-manual.xml: Added a few sentences about
972 the Fix Border Color option when generating classes.
973
974 2003-07-30 Jonathan Coles <[email protected]>
975
976 * Thuban/Model/classgen.py: Add docstrings. Rename specific
977 Ramp instances to use lower_case_style.
978
979 * Thuban/UI/classgen.py: Use renamed Ramp instances.
980
981 * Thuban/UI/classifier.py: Add docstrings.
982
983 * Thuban/UI/dock.py: Add docstrings.
984
985 * test/test_classgen.py: Use renamed Ramp instances.
986
987 2003-07-30 Bernhard Herzog <[email protected]>
988
989 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
990 was never used in Thuban.
991
992 2003-07-30 Bernhard Herzog <[email protected]>
993
994 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
995 method directly instead of going through the transient_table
996 method. This faster because transient_table may force the copy of
997 a DBF file into the transient database and setting a table's title
998 doesnm't affect the title of the associated transient table, so
999 this fixes RT #2042
1000
1001 * Thuban/UI/main.py (__version__): Don't import the already
1002 removed show_exception_dialog.
1003
1004 2003-07-29 Jonathan Coles <[email protected]>
1005
1006 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1007 Put back this method and remove the equivalent function since we
1008 are setting the exception hook from within this class (OnInit).
1009
1010 2003-07-29 Jonathan Coles <[email protected]>
1011
1012 * Doc/manual/images/5_2_custom_ramp.png,
1013 Doc/manual/images/5_2_quantiles.png,
1014 Doc/manual/images/5_2_uniform_dist.png,
1015 Doc/manual/images/5_2_unique_values.png,
1016 Doc/manual/images/8_int_error.png: New screen shots.
1017
1018 * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
1019 some points, and added more screen shots.
1020
1021 2003-07-29 Bernhard Herzog <[email protected]>
1022
1023 * Thuban/Model/data.py: Remove the now unused import of warnings
1024
1025 2003-07-29 Bernhard Herzog <[email protected]>
1026
1027 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
1028 deprecated since before the 0.8 release and isn't used in Thuban
1029 itself anymore.
1030
1031 * Thuban/Model/transientdb.py: Remove some unnecessary imports
1032
1033 2003-07-29 Jonathan Coles <[email protected]>
1034
1035 * Thuban/UI/application.py (ThubanApplication.OnInit): set the
1036 python exception hook here so that we are sure to catch any
1037 Thuban exception that happen during initialization.
1038
1039 * Thuban/UI/main.py (main): Don't set the exception hook here,
1040 it will get set in ThubanApplication.OnInit.
1041
1042 2003-07-29 Jonathan Coles <[email protected]>
1043
1044 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1045 Removed and called it show_exception_dialog() so that the exception
1046 handler can be set before the class is created.
1047
1048 * Thuban/UI/main.py (main): Install the exception handler before
1049 a ThubanApplication is created.
1050
1051 2003-07-29 Bernhard Herzog <[email protected]>
1052
1053 * po/it.po: New. Italian translation by Maurizio Napolitano
1054
1055 * po/ru.po: New. Russian translation by Alex Shevlakov
1056
1057 2003-07-29 Frank Koormann <[email protected]>
1058
1059 * Doc/manual/thuban-manual.xml: Extended section on supported
1060 projections.
1061
1062 2003-07-29 Frank Koormann <[email protected]>
1063
1064 * Doc/manual/thuban-manual.xml: gaspell-checked.
1065
1066 2003-07-29 Jonathan Coles <[email protected]>
1067
1068 * Doc/manual/images/3_5_legend.png: Added border to improve look
1069 on white background.
1070
1071 2003-07-29 Jonathan Coles <[email protected]>
1072
1073 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
1074 descriptions for the legend toolbar.
1075
1076 * Doc/manual/images/4_2_raster_layer_properties.png: Removed
1077 cursor from dialog box.
1078
1079 2003-07-28 Jonathan Coles <[email protected]>
1080
1081 * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
1082
1083 * Doc/manual/images/2_4_session_tree.png,
1084 Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
1085 Doc/manual/images/4_2_layer_properties.png,
1086 Doc/manual/images/4_2_raster_layer_properties.png,
1087 Doc/manual/images/5_3_genclass.png,
1088 Doc/manual/images/5_classification.png,
1089 Doc/manual/images/6_projection.png,
1090 Doc/manual/images/7_1_table_view.png,
1091 Doc/manual/images/7_2_5_join.png: New screenshots.
1092
1093 2003-07-24 Jonathan Coles <[email protected]>
1094
1095 * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
1096
1097 2003-07-24 Jonathan Coles <[email protected]>
1098
1099 * Doc/manual/thuban-manual.xml: Added EPS images and wrote
1100 chapter on Layer Management.
1101
1102 * Doc/manual/Makefile: New. Makefile to generate all formats for the
1103 manual and images.
1104
1105 2003-07-24 Bernhard Herzog <[email protected]>
1106
1107 * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
1108 it annoys lintian which warns about these files not being
1109 executable. The #1 isn't necessary here since if you absolutely
1110 must execute them you can always say "python <filename>".
1111
1112 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
1113 superfluous code to set brush and pen for point shapes
1114
1115 * Thuban/UI/viewport.py: Remove commented out code that wouldn't
1116 belong in viewport anyway
1117
1118 2003-07-24 Frank Koormann <[email protected]>
1119
1120 * Doc/manual/thuban-manual.xml: Added section on table management.
1121
1122 2003-07-24 Bernhard Herzog <[email protected]>
1123
1124 * test/runtests.py (main): Recognize the long "verbose" option
1125 correctly.
1126
1127 2003-07-22 Jonathan Coles <[email protected]>
1128
1129 * Doc/manual/thuban-manual.xml: Continue to write first revision
1130 of the manual.
1131
1132 * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
1133 with Begin/EndDrawing() calls to ensure we aren't doing to
1134 many updates to the dc during rendering.
1135 (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
1136 a pen and brush argument so they need to be passed to the function.
1137
1138 * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
1139 Calculates the minimum and maximum scale values. Factored out
1140 of set_view_transform so that it could be used to zoom all the
1141 way into a single point.
1142 (ViewPort.set_view_transform): Call calc_min_max_scales().
1143 (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
1144 if only a single point is selected.
1145
1146 * Doc/manual/images/1_2_legend_close.png,
1147 Doc/manual/images/1_2_legend_dock.png,
1148 Doc/manual/images/1_2_mainwindow.png,
1149 Doc/manual/images/1_2_mainwindow.ps,
1150 Doc/manual/images/1_2_mainwindow.sk,
1151 Doc/manual/images/3_2_fullextent.png,
1152 Doc/manual/images/3_2_fulllayerextent.png,
1153 Doc/manual/images/3_2_fullshapeextent.png,
1154 Doc/manual/images/3_2_pan.png,
1155 Doc/manual/images/3_2_zoomin.png,
1156 Doc/manual/images/3_2_zoomout.png,
1157 Doc/manual/images/3_3_identify.png,
1158 Doc/manual/images/3_3_label.png,
1159 Doc/manual/images/3_5_invisible.png,
1160 Doc/manual/images/3_5_movedown.png,
1161 Doc/manual/images/3_5_moveup.png,
1162 Doc/manual/images/3_5_props.png,
1163 Doc/manual/images/3_5_tobottom.png,
1164 Doc/manual/images/3_5_totop.png,
1165 Doc/manual/images/3_5_visible.png: New. Images for the documentation.
1166
1167 2003-07-18 Bernhard Herzog <[email protected]>
1168
1169 * Thuban/UI/messages.py (MAP_REPLACED): New message.
1170
1171 * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
1172 after the new map has been assigned
1173
1174 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
1175 Delegate MAP_REPLACED to the canvas too
1176 (MainWindow.prepare_new_session): Removed. Thanks to the new
1177 MAP_REPLACED message it's no longer needed
1178 (MainWindow.OpenSession, MainWindow.NewSession):
1179 prepare_new_session has been removed.
1180
1181 * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
1182 MAP_REPLACED so that we can close the dialog if a new map is set.
1183 (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
1184 (Classifier.map_replaced): Handle MAP_REPLACED by closing the
1185 dialog
1186
1187 * test/test_viewport.py (SimpleViewPortTest)
1188 (SimpleViewPortTest.test_default_size): Add doc-strings
1189 (ViewPortTest.setUp): Bind map to self.map so we can use it in
1190 tests. Subscribe to MAP_REPLACED messages too.
1191 (ViewPortTest.tearDown): No need to explicitly unsubscribe
1192 (ViewPortTest.test_set_map): New test for the SetMap method.
1193
1194 2003-07-18 Bernhard Herzog <[email protected]>
1195
1196 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
1197 Move this test from ViewPortTest.setUp to this new separate test
1198 case. setUp is not the place for the actual tests.
1199 (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
1200 more of the test from setUp to the new test test_inital_settings.
1201 (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
1202 (ViewPortTest.test_proj_conv): Split test_proj_conv into
1203 test_win_to_proj and test_proj_to_win and make the tests easier to
1204 understand
1205 (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
1206 (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
1207 (ViewPortTest.test_unprojected_rect_around_point)
1208 (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
1209 Reformat to increase readability.
1210
1211 2003-07-18 Bernhard Herzog <[email protected]>
1212
1213 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
1214
1215 2003-07-18 Bernhard Herzog <[email protected]>
1216
1217 * test/runtests.py: The test suite can now be run without an X
1218 connection. To make sure this remains true, remove the DISPLAY
1219 environment variable so that an error occurs if the wxGTK is
1220 imported accidentally
1221
1222 2003-07-18 Bernhard Herzog <[email protected]>
1223
1224 * Thuban/UI/viewport.py: Remove unused imports
1225
1226 * Thuban/UI/view.py: Remove unused imports
1227
1228 2003-07-18 Bernhard Herzog <[email protected]>
1229
1230 * test/test_export.py Remove unused imports. The OutputTransform
1231 function is now in viewport.py and is called output_transform
1232 (TestScalebar.test_output_transform)
1233 (TestScalebar.test_OutputTransform): Renamed to
1234 test_output_transform and updated to use output_transform instead
1235 of OutputTransform
1236
1237 * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
1238 renamed.
1239 (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
1240 renamed to output_transform
1241
1242 * Thuban/UI/viewport.py (OutputTransform, output_transform):
1243 Rename to output_transform
1244
1245 2003-07-18 Bernhard Herzog <[email protected]>
1246
1247 * Thuban/Model/layer.py (Layer.__init__): Rename
1248 classificationField to classificatin_column and init it here so
1249 that it can be used in SetClassificationColumn
1250 (Layer.GetClassificationColumn, Layer.GetClassificationField):
1251 Rename to GetClassificationColumn.
1252 (Layer.SetClassificationColumn, Layer.SetClassificationField):
1253 Rename to SetClassificationColumn and issue a LAYER_CHANGED
1254 message if the column changes.
1255 (Layer._classification_changed, Layer.ClassChanged): Rename to
1256 _classification_changed. Update the callers.
1257 (Layer.SetShapeStore): Further field->column renames.
1258
1259 * Thuban/Model/load.py (SessionLoader.start_classification)
1260 (SessionLoader.start_clpoint): Updates because of
1261 field->column method name changes in the Layer class
1262
1263 * Thuban/Model/save.py (SessionSaver.write_classification): Updates
1264 because of field->column method name changes in the Layer class
1265
1266 * Thuban/UI/classifier.py (Classifier.__init__)
1267 (Classifier._OnTry, Classifier._OnRevert): Updates because of
1268 field->column method name changes in the Layer class
1269
1270 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
1271 because of field->column method name changes in the Layer class
1272
1273 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
1274 of field->column method name changes in the Layer class
1275
1276 * test/test_save.py (SaveSessionTest.testClassifiedLayer)
1277 (SaveSessionTest.testClassifiedLayer): Update because of
1278 field->column method name changes in the Layer class
1279
1280 * test/test_layer.py (SetShapeStoreTests.setUp)
1281 (SetShapeStoreTests.test_sanity): Update because of field->column
1282 method name changes in the Layer class
1283 (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
1284 (TestLayerModification.test_sanity)
1285 (TestLayerModification.test_initial_settings): remove unsued code
1286 and rename to test_sanity.
1287 (TestLayerModification.test_set_classification): New test for
1288 SetClassification and SetClassificationField.
1289
1290 2003-07-18 Bernhard Herzog <[email protected]>
1291
1292 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
1293 the non-fixed values as well. The old test would have accepted a
1294 fixed ramp that only returnes the fixed properties
1295
1296 2003-07-17 Jonathan Coles <[email protected]>
1297
1298 * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
1299 shots for the manual. The XCF file is the source image and
1300 has additional layers to support changes.
1301
1302 * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
1303
1304 * Thuban/UI/classifier.py (Classifier.__BuildClassification):
1305 Return both the new class and the field name.
1306
1307 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
1308 fit the map to the window as this changes any zoom level that
1309 the user may have set.
1310
1311 2003-07-16 Jonathan Coles <[email protected]>
1312
1313 * Thuban/Model/classgen.py (generate_singletons,
1314 generate_uniform_distribution, generate_quantiles): Remove
1315 fixes parameter, but maintain the same functionality by having
1316 the calling function pass a FixedRamp object for the ramp.
1317 (FixedRamp): New. Adapts a ramp to have fixed property values.
1318
1319 * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
1320 (Classification): Inherit from Publisher.
1321 (Classification.__init__): Remove the layer parameter.
1322 Classifications no longer need to have a parent layer.
1323 (Classification.GetField, Classification.GetFieldType,
1324 Classification.SetFieldInfo): Removed. The field name is stored
1325 in the layer, and the type can be retreived by calling
1326 Layer.GetFieldType().
1327 (Classification._set_layer, Classification.GetLayer): Removed.
1328 Classifications no longer have a parent layer.
1329
1330 * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
1331 classification.
1332 (Layer.SetShapeStore): Reset the classification first while
1333 we still have the old shape store to work with.
1334 (Layer.GetClassificationField, Layer.SetClassificationField):
1335 New. Method for getting/setting the field to classify on.
1336 (Layer.SetClassification): Simplified now that the layer
1337 simply has to hold a reference to the classification and not
1338 tell the classification who owns it.
1339 Fixes RTbug #2023.
1340
1341 * Thuban/Model/load.py (SessionLoader.start_classification):
1342 Set the field name on the layer, not the classification.
1343
1344 * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
1345 classification is modified.
1346
1347 * Thuban/Model/save.py (SessionSaver.write_classification):
1348 Get the field name and type from the layer.
1349
1350 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
1351 parameter records to rows and add docstring. Fixes RTbug #1997.
1352
1353 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
1354 ramp when we need to fix certain values of a ramp rather than
1355 using the old fixes parameter. Fixes RTbug #2024.
1356
1357 * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
1358 parameter.
1359 (ClassTable.Reset): Add fieldType parameter and use it, rather
1360 than asking the classification.
1361 (Classifier.__init__): Remember the original class's field
1362 and ask the layer for the field type, rather than the classification.
1363 (Classifier.__SetGridTable): Retrieve the field and field type
1364 for the table because they are not in the classification.
1365 (Classifier._OnTry, Classifier._OnRevert): Set the classification
1366 field on the layer in addition to the classification itself.
1367
1368 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
1369 classification field from layer.
1370
1371 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
1372 classification field from layer. Split up tests and remove
1373 *-imports. Fixes RTbug #1992.
1374
1375 * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
1376
1377 * test/test_classification.py
1378 (TestClassification.test_classification): Remove tests for methods
1379 that no longer exist.
1380
1381 * test/test_layer.py (SetShapeStoreTests.setUp): Classification
1382 __init__ no longer has a field parameter, use SetClassificationField.
1383 (SetShapeStoreTests.test_sanity): Use layer object to get class
1384 field info.
1385
1386 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
1387 SetClassificationField on layer to set class field info.
1388
1389 * test/test_viewport.py: Renamed from test/test_view.py.
1390
1391 2003-07-16 Jan-Oliver Wagner <[email protected]>
1392
1393 * Doc/manual/thuban-manual.xml: Added authors and an initial
1394 coarse structure.
1395
1396 2003-07-15 Bernhard Herzog <[email protected]>
1397
1398 * test/support.py (FloatComparisonMixin): This is a mix-in class
1399 and therefore should not be derived from any other class.
1400
1401 * test/test_range.py (RangeTest): FloatComparisonMixin is a
1402 mix-in, so derive from TestCase as well.
1403
1404 2003-07-15 Bernhard Herzog <[email protected]>
1405
1406 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
1407 draw_func handling a bit to remove one layer of indirection. This
1408 makes the renderer about 10% faster in the non-classifying case
1409 and the code a bit cleaner
1410 (MapRenderer.draw_point_shape): Add the pen and brush parameters
1411 and set them in the dc. Now the draw_point_shape method and
1412 wxproj's draw_polygon_shape function have basically the same
1413 signature so that both can be directly used as draw_func
1414
1415 2003-07-15 Bernhard Herzog <[email protected]>
1416
1417 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
1418 string values (in addition to the labels) as UTF 8
1419
1420 * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
1421 values if the field type is string
1422
1423 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
1424 saving a session with non-ascii string classification values.
1425
1426 * test/test_load.py (TestClassification.file_contents)
1427 (TestClassification.test): Check for non-ascii values in string
1428 classifications
1429
1430 2003-07-14 Jonathan Coles <[email protected]>
1431
1432 * test/test_view.py: New. Tests for ViewPort.
1433
1434 2003-07-14 Frank Koormann <[email protected]>
1435
1436 * Thuban/Model/load.py (SessionLoader.start_map): Encode map
1437 title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
1438
1439 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
1440 unicode strings from session file: session title, map title and
1441 projection name.
1442
1443 2003-07-10 Jonathan Coles <[email protected]>
1444
1445 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
1446 drag_stop, not drag_move when the mouse is released.
1447
1448 2003-07-10 Jonathan Coles <[email protected]>
1449
1450 The most important part of this is the seperation of view.py into
1451 two pieces. viewport.py now has a class called ViewPort which
1452 contains all the non-wx parts of view.py and can therefore be
1453 tested. view.py contains only the wx-specific parts and is fairly
1454 simple.
1455
1456 * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
1457 RTTbug #1992.
1458 * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
1459 RTTbug #1992.
1460
1461 * Thuban/Model/classgen.py (generate_singletons,
1462 generate_uniform_distribution, generate_quantiles):
1463 Added 'fixes' parameter so that property attributes can
1464 be held constant over the generated classification groups.
1465 (CustomRamp.GetProperties): Remove unused variables.
1466
1467 * Thuban/Model/map.py (Map.SetProjection): Send the old
1468 projection as an argument to listeners of the MAP_PROJECTION_CHANGED
1469 event.
1470
1471 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
1472 parameter which is a list of records that restricts which
1473 records are saved. Fixes RTbug #1997.
1474
1475 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1476 Port exception dialog from GREAT-ER. Fixes RTbug #1993.
1477
1478 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
1479 to allow the user to fix line color/width on generated groups.
1480 (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
1481 functions to optionally fix group properties.
1482
1483 * Thuban/UI/main.py (main): Set exception hook to the
1484 ShowExceptionDialog. Fixes RTbug #1993.
1485
1486 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
1487 the table window when it is selectd to be shown.
1488
1489 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
1490 Export Selection button and move the export buttons underneath
1491 the table.
1492 (QueryTableFrame.UpdateStatusText): Added event argument so
1493 that it can respond to grid selection events. The status text
1494 is now updated even when the table is not associated with a
1495 layer as was previously assumed.
1496 (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
1497 UpdateStatusText responds to these events.
1498 (QueryTableFrame.OnSaveAs): Renamed to doExport.
1499 (QueryTableFrame.doExport): Helper function that saves the
1500 entire table, or selected rows, to a file.
1501 (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
1502 Respond to export button events and call doExport.
1503
1504 * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
1505 the function doesn't return NULL without first setting a Python
1506 Error.
1507
1508 * test/runtests.py (main): Only print "Unknown option" for
1509 unsupported options.
1510
1511 * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
1512 optional epsilon argument to specify floating point accuracy.
1513 (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
1514 for each item test.
1515
1516 * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
1517 tests for saving selected records.
1518
1519 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
1520 tests for saving selected records.
1521
1522 * test/test_map.py (TestMapWithContents.test_set_projection):
1523 MAP_PROJECTION_CHANGED events send the old projection.
1524
1525 * test/test_session.py
1526 (TestSessionWithContent.test_forward_map_projection):
1527 MAP_PROJECTION_CHANGED events send the old projection.
1528
1529 * test/test_table.py (TableTest): Update tests to use non-deprecated
1530 functions.
1531
1532 2003-07-08 Bernhard Herzog <[email protected]>
1533
1534 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
1535 constants in the column objects are the standard ones defined in
1536 the table module.
1537
1538 * test/test_transientdb.py
1539 (TestTransientTable.test_transienttable_to_dbf): New. Test whether
1540 exporting transient tables as DBF works. This should catch the bug
1541 just fixed in TransientTableBase.Width.
1542
1543 2003-07-08 Bernhard Herzog <[email protected]>
1544
1545 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
1546 interpolated colors correctly.
1547
1548 * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
1549 New. Test case for the fix in classgen.py
1550
1551 2003-07-08 Bernhard Herzog <[email protected]>
1552
1553 * test/runtests.py (main): Make the default output less verbose
1554 and add a verbosity option (-v) to get the old output
1555
1556 2003-07-08 Bernhard Herzog <[email protected]>
1557
1558 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
1559 0.9.
1560
1561 * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
1562 New. Return the join type
1563
1564 * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
1565 DTD
1566 (SessionSaver.write_data_containers): Save the join type for
1567 joined tables
1568
1569 * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
1570 namespace
1571 (SessionLoader.start_jointable): Handle the jointype attribute
1572
1573 * test/test_load_0_8.py: New. Effectively a copy of test_load.py
1574 as of Thuban 0.8. These are now tests to determine whether Thuban
1575 can still read files generated by Thuban 0.8
1576
1577 * test/test_load.py (LoadSessionTest.dtd)
1578 (TestSingleLayer.file_contents)
1579 (TestLayerVisibility.file_contents, TestLabels.file_contents)
1580 (TestLayerProjection.file_contents)
1581 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
1582 (TestJoinedTable.file_contents)
1583 (TestLoadError.file_contents): Update for new DTD
1584 (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
1585 for new join type attribute
1586
1587 * test/test_save.py (SaveSessionTest.dtd)
1588 (SaveSessionTest.testEmptySession)
1589 (SaveSessionTest.testSingleLayer)
1590 (SaveSessionTest.testLayerProjection)
1591 (SaveSessionTest.testRasterLayer)
1592 (SaveSessionTest.testClassifiedLayer)
1593 (SaveSessionTest.test_dbf_table)
1594 (SaveSessionTest.test_joined_table): Update for new DTD
1595 (SaveSessionTest.test_joined_table): Add test for new join type
1596 attribute
1597
1598 2003-07-04 Bernhard Herzog <[email protected]>
1599
1600 * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
1601 function for table_to_dbf
1602 (table_to_dbf): Deal with names longer than the 10 character limit
1603
1604 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
1605 doc-string
1606 (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
1607 long column names
1608
1609 2003-07-03 Bernhard Herzog <[email protected]>
1610
1611 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
1612
1613 2003-07-03 Bernhard Herzog <[email protected]>
1614
1615 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
1616 for the Thuban manual and README with some basic information about
1617 the manual
1618
1619 2003-07-03 Bernhard Herzog <[email protected]>
1620
1621 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1622 Update doc-string
1623 (TransientJoinedTable.create): Do not modify the column objects of
1624 the input tables in place and copy all columns of the input tables
1625 into the joined table after all.
1626
1627 * test/test_transientdb.py
1628 (TestTransientTable.test_transient_joined_table_same_column_name):
1629 Update to reflect the new behavior
1630 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
1631 Update to reflect the new behavior
1632 (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
1633 New test case for a bug which modified the column objects in place
1634
1635 2003-07-02 Jonathan Coles <[email protected]>
1636
1637 * Thuban/Model/classgen.py (generate_singletons,
1638 generate_uniform_distribution, generate_quantiles,
1639 GenQuantiles0): Make sure maxValue isn't less than
1640 one, otherwise we could divide by zero.
1641
1642 * test/test_classgen.py (ClassGenTest.doClassRangeTest,
1643 ClassGenTest.doClassSingleTest): Call doBoundsTest to
1644 check the end classification groups against the
1645 proper property values.
1646 (ClassGenTest.doBoundsTest): New. Checks the first and
1647 last classification groups to make sure their properties
1648 are the correct upper and lower bounds for a color ramp.
1649
1650 2003-07-02 Jonathan Coles <[email protected]>
1651
1652 * Thuban/Model/classgen.py (generate_singletons,
1653 generate_uniform_distribution, generate_quantiles,
1654 GenQuantiles0): The denominator was one to high when
1655 calculating the index for the ramp causing the index
1656 to never to reach one.
1657
1658 2003-07-02 Jonathan Coles <[email protected]>
1659
1660 Changed the singature of ClassGroupRange.__init__ and
1661 ClassGroupRange.SetRange() so that the min/max values are
1662 passed as a tuple. This makes a better calling scheme for
1663 when a Range object is passed instead.
1664
1665 * Thuban/Model/classgen.py: Fixed parameters to
1666 ClassGroupRange constructor.
1667
1668 * Thuban/Model/classification.py (ClassGroupRange.__init__):
1669 Consolidate the min/max parameters into a single _range which
1670 can either be a tuple or a Range object.
1671 (ClassGroupRange.SetRange): Consolidate the min/max parameters
1672 into a single _range which can either be a tuple or a Range object.
1673
1674 * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
1675 call to ClassGroupRange constructor to use a tuple.
1676
1677 * Thuban/Model/layer.py (Layer.SetClassification): Switch
1678 the classification instance variable to the new class
1679 before calling _set_layer otherwise subscribers to a
1680 LAYER_CHANGED event will not see any difference.
1681
1682 * test/test_classification.py: Fix tests of ClassGroupRange
1683 so that they use the new signature.
1684
1685 * test/test_load.py: Fix use of ClassGroupRange so that it
1686 uses the new signature.
1687
1688 * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
1689 uses the new signature.
1690
1691 * test/test_save.py: Fix use of ClassGroupRange so that it
1692 uses the new signature.
1693
1694
1695 2003-07-01 Jonathan Coles <[email protected]>
1696
1697 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
1698 Import used objects/class from color.
1699 (generate_singletons): We don't
1700 need the numGroups parameter anymore because we are using
1701 the new ramps with GetProperties().
1702 (generate_uniform_distribution): Use new ramp method
1703 GetProperties().
1704 (generate_quantiles, GenQuantiles0): Use new ramp method
1705 GetProperties().
1706 (CustomRamp.SetNumGroups): Removed. The ramps now map
1707 a value from 0 to 1 to class properties so the number
1708 of groups is not needed ahead of time.
1709 (CustomRamp.next): Removed. CustomRamp does not support
1710 interation anymore.
1711 (CustomRamp.GetProperties): Returns a ClassGroupProperties
1712 object based on the index value from 0 to 1 that is
1713 passed to it.
1714 (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
1715 Made into instances of Monochromatic class instread of
1716 deriving from it.
1717 (HotToCold.SetNumGroups): Removed. See CustomRamp.
1718 (HotToCold.next): Removed. See CustomRamp.
1719
1720 * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
1721 (Classification.SetField, Classification.SetFieldType):
1722 Replaced with SetFieldInfo.
1723 (Classification.SetFieldInfo): New. Does a better job of
1724 what SetField and SetFieldType used to do by combining
1725 their function since they should really always be done
1726 at the same time.
1727 (Classification.SetLayer): Renamed to _set_layer.
1728 (Classification._set_layer): Should only be called from
1729 Layer's SetClassification. This does not cause a recursive
1730 call as SetLayer did because we know that Layer knows about
1731 the classification.
1732
1733 * Thuban/Model/color.py: Fixes RTbug #1971.
1734 (_Transparent): Renamed from Transparent so it doesn't
1735 conflict with the module variable.
1736 (Transparent, Black): Renamed from Color.Transparent,
1737 Color.Black so they are not class variables.
1738
1739 * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
1740 (Layer.Destroy): We don't need to call SetClassification
1741 anymore to clear out the back reference in the classifcation
1742 to the layer. It's better to set it to None using _set_layer,
1743 and we won't be creating another clas object too.
1744 (Layer.SetClassification): Classification._set_layer is not
1745 recursive so remove all the locking variables. Also clean
1746 up the code so that it remains unchanged if something fails.
1747
1748 * Thuban/Model/load.py: Fixes RTbug #1971.
1749 (SessionLoader.start_classification): Call
1750 Classification.SetFieldInfo().
1751
1752 * Thuban/Model/save.py: Removed import of Color which wasn't
1753 being used.
1754
1755 * Thuban/UI/classgen.py: Fixes RTbug #1972.
1756 (ClassGenDialog.__init__): Color ramps are now instances
1757 already so we don't need to create any new objects.
1758 (ClassGenDialog.OnOK): Check for numGroups is no longer
1759 necessary because we never use it.
1760
1761 * Thuban/UI/classifier.py: Fixes RTbug #1971.
1762 (Classifier.__BuildClassification, Classifier.__SetGridTable):
1763 Call Classification.SetFieldInfo() instead of SetFieldType.
1764
1765 * Thuban/UI/renderer.py: Fixes RTbug #1971.
1766
1767 * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
1768 (MapCanvas.__init__): Subscribe to the idle time event. Set
1769 background color to white.
1770 (MapCanvas.OnPaint): Set a flag indicating that we should
1771 render the map during idle time. If we already have a bitmap
1772 just draw it now.
1773 (MapCanvas.OnIdle): New. Render the map only during idle time.
1774 This also fixes a problem with the busy cursor under gtk.
1775
1776 * test/test_classgen.py (ClassGenTest.test_generate_singletons):
1777 Fix calls to generate_singletons because the signature changed.
1778
1779 * test/test_classification.py: Fix color references and
1780 change calls to Classification.[SetField|SetFieldType] to
1781 SetFieldInfo.
1782
1783 * test/test_load.py: Fix color references.
1784
1785 * test/test_load_0_2.py: Fix color references.
1786
1787 * test/test_save.py (SaveSessionTest.testClassifiedLayer):
1788 Change calls to Classification.[SetField|SetFieldType] to
1789 SetFieldInfo.
1790
1791 2003-07-01 Frank Koormann <[email protected]>
1792
1793 MERGE from the greater-ms3 branch.
1794
1795 * test/test_transientdb.py
1796 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
1797 New. Test join of two tables with partly equal column names.
1798
1799 * Thuban/Model/transientdb.py (TransientJoinedTable.create):
1800 If duplicates in left and right tables column names are found,
1801 append '_' (underscores) to the name until it is unique.
1802 Create always new internal names for the resulting table and reference
1803 columns in the join statement with <table>.<column>
1804
1805 2003-07-01 Bernhard Herzog <[email protected]>
1806
1807 * test/test_transientdb.py
1808 (TestTransientTable.test_transient_joined_table_same_column_name):
1809 New. Test whether joining on columns with the same names in both
1810 tables works.
1811
1812 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
1813 sure to use the right internal names even when joining on field
1814 with the same names in both tables. Also, detect duplicate names
1815 in the joined table correctly.
1816
1817 2003-07-01 Frank Koormann <[email protected]>
1818
1819 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
1820 Reverse List of layers to render in same order as in desktop legend.
1821
1822 2003-06-30 Jonathan Coles <[email protected]>
1823
1824 * Thuban/version.py (make_tuple): Takes a version string
1825 and splits it into a tuple of at most three integers.
1826 Used make_tuple() to make tuple versions of the version
1827 numbers.
1828
1829 * Thuban/UI/about.py: Add Thuban email addresses.
1830
1831 2003-06-30 Jonathan Coles <[email protected]>
1832
1833 * Thuban/version.py: SQLite/PySQLite version dependencies
1834 were too high.
1835
1836 2003-06-30 Jonathan Coles <[email protected]>
1837
1838 * Thuban/version.py: Update version to 0.8.1
1839
1840 * MANIFEST.in: Added Projections so that default.proj is
1841 included.
1842
1843 2003-06-26 Jonathan Coles <[email protected]>
1844
1845 New About box with lots more information including library
1846 versions and credits. More/better version checking before
1847 Thuban starts.
1848
1849 * Thuban/UI/about.py: New. New About box that displays
1850 library version information and credits.
1851
1852 * Thuban/version.py: Added new 'versions' dictionary which
1853 contains the verions of various libraries which are checked
1854 when the module loads.
1855 (verify_versions): Check all version numbers and returns
1856 a list of errors.
1857
1858 * Thuban/UI/classifier.py (Classifier.__EnableButtons):
1859 Reset the status of the buttons as the situation warrants,
1860 but in a better more reliable way by not relying on the
1861 current status to determine what needs to change.
1862
1863 * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
1864 (verify_versions): Remove most of the code since it is
1865 now in Thuban.version.verify_versions.o
1866
1867 * Thuban/UI/mainwindow.py (MainWindow.About): Call new
1868 About box in Thuban.UI.about.
1869
1870 * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
1871 Returns the version of gdal library being used as a string.
1872
1873 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1874 Removed.
1875 (get_proj_version): Return the version of PROJ that the file
1876 was compiled with.
1877 (get_gtk_version): Return th version of GTK that the file
1878 was compiled with.
1879
1880 2003-06-25 Jonathan Coles <[email protected]>
1881
1882 * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
1883 of the SelectPropertiesDialog should be self so the window
1884 appears on top.
1885 (ClassGroupPropertiesCtrl.DoEdit): The parent
1886 of the SelectPropertiesDialog should be self so the window
1887 appears on top.
1888
1889 * Thuban/UI/resource.py: Cleaned up how we determine file
1890 extensions.
1891 (GetImageResource): Return an wxImage from our Resources.
1892
1893 2003-06-24 Jonathan Coles <[email protected]>
1894
1895 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
1896 Check that a layer has a classification before trying
1897 to get it. Raster layers don't have classifications.
1898
1899 2003-06-23 Jonathan Coles <[email protected]>
1900
1901 * setup.py: Add Resources/XML to resource list.
1902
1903 2003-06-23 Jonathan Coles <[email protected]>
1904
1905 * setup.cfg: Fix copyright dates
1906
1907 2003-06-23 Jonathan Coles <[email protected]>
1908
1909 * MANIFEST.in: Update with Resources/XML
1910
1911 * setup.py: Don't include Locale resources yet as we don't
1912 have any and it causes problems building the distribution
1913 for Windows. Update version to 0.8.0.
1914
1915 * Doc/thuban.dtd: Removed since it is now in Resources/XML.
1916
1917 * Thuban/UI/mainwindow.py: Add blank line at the end because
1918 file was not being read correctly building the Windows
1919 distribution.
1920
1921 2003-06-23 Jonathan Coles <[email protected]>
1922
1923 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
1924
1925 * Thuban/version.py: Temporarily update longversion for
1926 the 0.8 release so that it doesn't have the cvs revision.
1927
1928 2003-06-23 Jonathan Coles <[email protected]>
1929
1930 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
1931 to make sure that we don't create reentrant possibilities with
1932 wxYield.
1933
1934 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
1935 directly to avoid the wxSafeYield() call which generates an
1936 OnPaint event causing infinite recursion. Don't try to catch
1937 exception anymore. This was for before there were limits on map
1938 scaling.
1939
1940 2003-06-23 Bernhard Herzog <[email protected]>
1941
1942 Bug fix for RT #1961:
1943
1944 * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
1945 Register DerivedShapestores with the session
1946
1947 * Thuban/Model/session.py (Session.Tables): Make sure each table
1948 is only listed once.
1949
1950 * test/test_load.py (TestJoinedTable.test): Add check_format call.
1951 Update file contents to match the one written out.
1952
1953 2003-06-20 Bernhard Herzog <[email protected]>
1954
1955 * test/xmlsupport.py (SaxEventLister.startElementNS)
1956 (SaxEventLister.endElementNS): Do not include the qname. Python
1957 2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
1958 is (presumably incorrectly) None, whereas it's a string with the
1959 element name in the later versions.
1960
1961 * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
1962 (TestEventList.test_even_list_namespace): Update tests to reflect
1963 the new behaviour
1964 (TestEventList.test_even_list_id_normalization): Fix doc-string
1965
1966 2003-06-20 Jonathan Coles <[email protected]>
1967
1968 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
1969 by deriving classes to determine if that layer supports shapes.
1970 (Layer): Override HasShapes and return true.
1971
1972 * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
1973 instead of a direct call to wx[Begin|End]CusyCursor().
1974 (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
1975 table data.
1976
1977 * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
1978 New. Wrappers around the wxWindows functions that allow us to
1979 make additional calls such as wxYield which gives the native
1980 system a chance to update the cursor correctly.
1981
1982 * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
1983 instead of a direct call to wx[Begin|End]CusyCursor().
1984
1985 * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
1986 instead of a direct call to wx[Begin|End]CusyCursor().
1987 (MapCanvas.find_shape_at): Check if the current search layer
1988 support shapes, otherwise go on to the next layer.
1989
1990 * test/test_layer.py: Add tests in each type of layer for
1991 HasClassification() and HasShapes()
1992
1993 2003-06-20 Jonathan Coles <[email protected]>
1994
1995 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
1996 turning on the busy cursor to allow the system to change the
1997 cursor before we begin painting. This fixes a problem that
1998 was occuring only under GTK. Fixes RTbug #1840.
1999
2000 2003-06-20 Bernhard Herzog <[email protected]>
2001
2002 * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
2003 version.
2004
2005 * Thuban/Model/save.py (sort_data_stores): New. Make topological
2006 sort of the data sources so they can be written with sources that
2007 data sources that depend on other data sources come after the
2008 sources they depend on.
2009 (SessionSaver.__init__): Add idmap instance variable to map from
2010 objects to the ids used in the file.
2011 (SessionSaver.get_id, SessionSaver.define_id)
2012 (SessionSaver.has_id): New. Methods to manage the idmap
2013 (SessionSaver.write): Use thuban-0.8.dtd
2014 (SessionSaver.write_session): Add a namespace on the session and
2015 write out the data sources before the maps.
2016 (SessionSaver.write_data_containers): New. Write the data
2017 containers.
2018 (SessionSaver.write_layer): Layer elements now refer to a
2019 shapestore and don't contain filenames anymore.
2020
2021 * Thuban/Model/load.py (LoadError): Exception class to raise when
2022 errors in the files are discovered
2023 (SessionLoader.__init__): Define dispatchers for elements with a
2024 thuban-0.8 namespace too.
2025 (SessionLoader.check_attrs): New helper method to check and
2026 convert attributes
2027 (AttrDesc): New. Helper class for SessionLoader.check_attrs
2028 (SessionLoader.start_fileshapesource)
2029 (SessionLoader.start_derivedshapesource)
2030 (SessionLoader.start_filetable, SessionLoader.start_jointable):
2031 Handlers for the new elements in the new fileformat
2032 (SessionLoader.start_layer): Handle the shapestore attribute in
2033 addition to filename.
2034 (SessionLoader.start_table, SessionLoader.end_table): Removed.
2035 They were never used in the old formats and aren't needed for the
2036 new.
2037
2038 * Thuban/Model/session.py (Session.DataContainers): New method to
2039 return all "data containers", i.e. shapestores and tables
2040
2041 * test/xmlsupport.py (SaxEventLister.__init__)
2042 (SaxEventLister.startElementNS, sax_eventlist): Add support to
2043 normalize IDs.
2044
2045 * test/test_xmlsupport.py
2046 (TestEventList.test_even_list_id_normalization): New test case for
2047 id normalization
2048
2049 * test/test_load.py (LoadSessionTest.check_format): Use ID
2050 normalization
2051 (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
2052 class atrributes used for ID normalization
2053 (TestSingleLayer, TestLayerVisibility, TestLabels.test)
2054 (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
2055 file format
2056 (TestJoinedTable): New test for loading sessions with joined
2057 tables.
2058 (TestLoadError): New. Test whether missing required attributes
2059 cause a LoadError.
2060
2061 * test/test_save.py (SaveSessionTest.thubanids)
2062 (SaveSessionTest.thubanidrefs): New class attributes for ID
2063 normalization in .thuban files.
2064 (SaveSessionTest.compare_xml): Use id-normalization.
2065 (SaveSessionTest.testEmptySession)
2066 (SaveSessionTest.testLayerProjection)
2067 (SaveSessionTest.testRasterLayer)
2068 (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
2069 (SaveSessionTest.testLayerProjection): The filename used was the
2070 same as for testSingleLayer. Use a different one.
2071 (SaveSessionTest.test_dbf_table)
2072 (SaveSessionTest.test_joined_table): New test cases for saving the
2073 new data sources structures.
2074 (TestStoreSort, MockDataStore): Classes to test the sorting of the
2075 data stores for writing.
2076
2077 * test/runtests.py: Add CVS keywords
2078
2079 2003-06-20 Jonathan Coles <[email protected]>
2080
2081 * test/test_session.py
2082 (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
2083 Use the cultural_landmark-point.dbf file for the store so that
2084 the table rows and shape count match.
2085
2086 2003-06-20 Jonathan Coles <[email protected]>
2087
2088 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
2089 an exception if the number of shapes is different from the
2090 number of rows in the table. Address RTbug #1933.
2091
2092 * test/test_layer.py (TestLayer.test_derived_store): Add
2093 a test for the new exception in DerivedShapeStore.__init__.
2094
2095 * test/support.py (FloatTestCase): Removed since there is
2096 already FloatComparisonMixin. Fixes RTbug #1954.
2097 (FloatComparisonMixin.assertFloatEqual): Include test for
2098 infinity that was part of FloatTestCase.
2099
2100 * test/test_range.py (RangeTest): Inherit from
2101 support.FloatComparisonMixin now that we don't have
2102 support.FloatTestCase.
2103
2104 2003-06-20 Bernhard Herzog <[email protected]>
2105
2106 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
2107 the implementation in xmlsupport instead.
2108 (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
2109
2110 * test/test_proj.py: Import sax_eventlist from xmlsupport instead
2111 of test_save
2112
2113 2003-06-20 Bernhard Herzog <[email protected]>
2114
2115 * test/test_load.py (LoadSessionTest.check_format): New helper
2116 method to make sure the test files we load might have been written
2117 by the current thuban version.
2118 (ClassificationTest.TestLayers, TestSingleLayer.test)
2119 (TestLayerVisibility.test, TestClassification.test)
2120 (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
2121 Add check_format() calls and fix the thuban data to match the data
2122 that would be written by saving the session loaded from it.
2123
2124 * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
2125 the same class and function in test_save.
2126
2127 * test/test_xmlsupport.py (TestEventList): New. test cases for
2128 sax_eventlist
2129
2130 2003-06-20 Bernhard Herzog <[email protected]>
2131
2132 * Resources/XML/thuban.dtd: Add comment about which versions of
2133 Thuban are covered by this DTD
2134 (map): Fix content model for layers and raster layers. There can
2135 be any number or layers and raster layers in any order.
2136
2137 2003-06-20 Jonathan Coles <[email protected]>
2138
2139 This is mainly about fixing RTbug #1949.
2140
2141 * Thuban/Model/classification.py: Remove "from __future__"
2142 import statement since python 2.2 is the earliest supported
2143 version.
2144
2145 * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
2146 Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
2147 depending on the units this projection *forwards* into.
2148
2149 * Thuban/Model/save.py (SessionSaver.write_classification):
2150 Remove unnecessary use of lambdas and nested functions.
2151
2152 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
2153 adjustment here if the map projection uses degrees.
2154
2155 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
2156 scale adjust code since it is now done before calling
2157 this method. Don't do anything if the map projection
2158 is None.
2159
2160 2003-06-19 Bernhard Herzog <[email protected]>
2161
2162 Move version specific load tests to their own file.
2163
2164 * test/test_load.py: Expand the doc-string to explain a bit how to
2165 handle file format changes.
2166 (TestClassification.test): Update the docstring as this test is
2167 not about Thuban 0.2 anymore.
2168
2169 * test/test_load_0_2.py: New file with the load tests for thuban
2170 files created with Thuban 0.2 and earlier.
2171
2172 2003-06-19 Bernhard Herzog <[email protected]>
2173
2174 Add XML validation to some of the tests. Validation will only be
2175 done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
2176 To make the DTD available to the test cases it's moved into
2177 Resources/XML
2178
2179 * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
2180 for versions up to and including 0.2. Two slight changes: added an
2181 encoding specification and fixed the comment which refered to
2182 GRASS, not Thuban
2183
2184 * test/xmlsupport.py: New support module for tests involving XML.
2185 Currently there's a mix-in class for XML validation.
2186
2187 * test/test_xmlsupport.py: New. Tests for the xmlsupport module
2188
2189 * test/test_save.py (SaveSessionTest): Derive from ValidationTest
2190 so that we can validate the
2191 (SaveSessionTest.testEmptySession)
2192 (SaveSessionTest.testSingleLayer)
2193 (SaveSessionTest.testSingleLayer)
2194 (SaveSessionTest.testLayerProjection)
2195 (SaveSessionTest.testRasterLayer)
2196 (SaveSessionTest.testClassifiedLayer): Validate the generated XML
2197
2198 * test/runtests.py (main): Call print_additional_summary instead
2199 of print_garbage_information
2200
2201 * test/support.py (resource_dir): New function to return the
2202 "Resource" subdirectory
2203 (print_additional_summary): New function to combine several
2204 summary functions
2205 (run_tests): Use print_additional_summary instead of calling
2206 print_garbage_information directly
2207
2208 2003-06-19 Bernhard Herzog <[email protected]>
2209
2210 * Doc/thuban.dtd (classification): Correct the content model of
2211 the classification element.
2212 (projection): Add the "name" attribute
2213
2214 2003-06-19 Frank Koormann <[email protected]>
2215
2216 MERGE from the greater-ms3 branch.
2217
2218 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
2219 scale if projection is latlong to get better estimate.
2220
2221 Fix problem of hidden properties dialog under windows after double
2222 click on layer tree:
2223 The tree control always gets an Expanded / Collapsed event after
2224 the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply
2225 raises the already displayed window.
2226
2227 * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
2228 raiseProperties initialized to prevent endless loops
2229 (LegendTree._OnItemActivated): Depending on self.raiseProperties
2230 simply raise the properties or open the dialog and issue a second
2231 event.
2232
2233 2003-06-18 Jonathan Coles <[email protected]>
2234
2235 * setup.py: Fix a few problems that occured under Windows.
2236
2237 2003-06-18 Jonathan Coles <[email protected]>
2238
2239 When Thuban loaded the map was redrawn twice because the
2240 legend was being opened after the mainwindow was created
2241 and not during its creation. This meant the map was drawn
2242 initially and then had to be redrawn when the legend
2243 caused the display to change. Now the legend is opened
2244 in the mainwindow constructor which resolves this issue.
2245
2246 Also, although we were checking for the existence of
2247 gdal and gdalwarp modules, the gdalwarp extension was
2248 still being compiled (which may fail if the system doesn't
2249 have gdal installed). the build_ext command to setup.py
2250 now accepts the flags --with-gdal and --without-gdal.
2251 If --without-gdal is specified setup.py will try to
2252 use the gdal parameters specified by gdal-config. Under
2253 windows, those parameters have to be set in setup.py
2254 as with proj4 an wxWindows.
2255
2256 * setup.py: Use a list instead of seperate variables for
2257 extension parameters so we can create a generic function
2258 that runs an appropriate *-config script.
2259 (run_cs_script): Renamed from run_wx_script and modified
2260 to accept a second argument which is a list of lists to
2261 be filled in by the values returned from running the command.
2262 (thuban_build_ext): New. Extends the build_ext command and
2263 provides the options --with-gdal/--without-gdal which then
2264 optionally includes the gdalwarp extension.
2265
2266 * Thuban/Model/resource.py: First check if we can import
2267 the gdalwarp Thuban extension before checking for gdal.
2268 Also added some comments.
2269
2270 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
2271 the map is None which may be the case if none has been loaded
2272 yet.
2273
2274 * Thuban/UI/main.py (main): Remove call to ShowLegend.
2275
2276 * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
2277
2278 * Thuban/UI/renderer.py: Check for gdal support before importing
2279 gdalwarp.
2280 (MapRenderer.render_map): Only try to optimize if we have gdal
2281 support otherwise nothing will get drawn.
2282
2283 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
2284 during startup before a map has been created. Check if map is None
2285 before using it and do nothing if it is.
2286
2287 2003-06-17 Jonathan Coles <[email protected]>
2288
2289 Fix the problem with raster layers under Windows that caused
2290 Thuban to crash. The view should respond to layer projection
2291 changed events to update the display. Changes to a projection
2292 should not cause the map to be set to full extent.
2293
2294 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
2295 current_map_proj to remember the current map projection so that
2296 when the projection changes we know what the previous projection
2297 was.
2298 (MapCanvas.SetMap): Unsubscribe and subscribe to
2299 LAYER_PROJECTION_CHANGED events.
2300 (MapCanvas.projection_changed): Split into two methods that respond
2301 to map and layer projection changes.
2302 (MapCanvas.map_projection_changed): New. Takes the current view and
2303 projects it using the new projection. This does not cause the
2304 map to be redrawn at full extent.
2305 (MapCanvas.layer_projection_changed): New. Cause a redraw which
2306 will draw each layer in its new projection.
2307
2308 * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
2309 VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
2310 under Windows.
2311
2312 * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
2313 to twice sizeof(void*) because there are two digits for each
2314 hex byte.
2315
2316 2003-06-16 Bernhard Herzog <[email protected]>
2317
2318 Update to the layer interface: Direct access to the table,
2319 shapetable, shapefile and filename attributes is now actively
2320 deprecated by issuing deprecation warnings for all places where
2321 this happens.
2322
2323 * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
2324 to the instance variables table, shapetable, shapefile and
2325 filename via __getattr__ so that we can issue a deprecation
2326 warning.
2327 (Layer.SetShapeStore): Don't set the deprecated instance variables
2328 any more
2329 (Layer.SetShapeStore): Don't use deprecated layer instance
2330 variables
2331 (Layer.Destroy): No need to explicitly remove the instance
2332 variables any more
2333 (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
2334 instance variables
2335
2336 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2337 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
2338 (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
2339 use deprecated layer instance variables
2340
2341 * Thuban/UI/classifier.py (Classifier.__init__): Don't use
2342 deprecated layer instance variables
2343
2344 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
2345 (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
2346 instance variables
2347
2348 * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
2349 deprecated layer instance variables
2350
2351 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
2352 deprecated layer instance variables
2353
2354 * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
2355 deprecated layer instance variables
2356
2357 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
2358 (MapRenderer.polygon_render_param): Don't use deprecated layer instance
2359 variables
2360
2361 * test/runtests.py (main): Turn Thuban's deprecation warnings into
2362 errors so that they're cought by the tests
2363
2364 * test/test_load.py (TestSingleLayer.test): Don't use deprecated
2365 layer instance variables
2366
2367 2003-06-16 Jonathan Coles <[email protected]>
2368
2369 Fix a problem under Windows whereby if the user double-clicks on a
2370 layer in the legend that tree item will expand or collapse as well
2371 as open the layer properties dialog. The state of the tree item
2372 should not be affected.
2373
2374 * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
2375 preventExpandCollapse and subscribe to expanding and collapsing
2376 events.
2377 (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
2378 collapsing events and will veto the event if it has been triggered
2379 by the user double clicking on a layer.
2380 (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
2381 that an expanding/collapsing event should be vetoed.
2382
2383 2003-06-13 Bernhard Herzog <[email protected]>
2384
2385 * Thuban/UI/classifier.py (Classifier.OnClose)
2386 (Classifier.map_layers_removed)
2387 (Classifier.layer_shapestore_replaced): Unsubscribe the messages
2388 in OnClose and not in map_layers_removed or
2389 layer_shapestore_replaced to make sure it always happens when the
2390 dialog is closed
2391
2392 2003-06-13 Jonathan Coles <[email protected]>
2393
2394 This puts back a fix for Windows where a panel is needed so that
2395 the background of the table view appears correctly.
2396
2397 * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
2398 object that can be used by derived classes to place any
2399 controls (including the grid) onto.
2400 (QueryTableFrame.__init__): Use the panel as the parent window
2401 for all the controls. Reparent the grid so that the panel is
2402 the parent. Call UpdateStatusText() to correctly initialize
2403 the status bar.
2404
2405 2003-06-13 Jonathan Coles <[email protected]>
2406
2407 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
2408 from wxFrame (as opposed to wxDialog like the other classes)
2409 but otherwise behaves like the other classes. This is needed
2410 for the TableView which isn't really a dialog and needs to
2411 have a status bar and control buttons.
2412
2413 * Thuban/UI/tableview.py (TableGrid.__init__): Create an
2414 instance variable to keep track of how many rows are selected.
2415 Subscribe once to the the events we are interested in.
2416 (ThubanGrid.OnRangeSelect): Only handle event if event handling
2417 hasn't been turned off.
2418 (ThubanGrid.OnSelectCell): Only handle event if event handling
2419 hasn't been turned off.
2420 (ThubanGrid.ToggleEventListeners): Rather than subscribe None
2421 as an event listener (which changes the event handler stack)
2422 simply set an instance variable to False. This is checked in
2423 the event handlers.
2424 (ThubanGrid.GetNumberSelected): Return the number of currently
2425 selected rows.
2426 (TableFrame): Inherit from ThubanFrame so we can have a
2427 status bar and control buttons.
2428 (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
2429 Explicitly set which items are selected in the operator choice and
2430 action choice so there is always a valid selection. Fixes RTbug #1941.
2431 Subscribe to grid cell selection events so we can update the
2432 status bar.
2433 (QueryTableFrame.UpdateStatusText): Update the status bar with
2434 how many rows are in the grid, how many columns, and how many
2435 rows are selected.
2436 (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
2437 Call UpdateStatusText when cells are (de)selected.
2438 (QueryTableFrame.OnQuery): Use the string value in the value
2439 combo if either the selected item index is 0 or if the string
2440 cannot be found in the predefined list (this happens if the
2441 user changes the text). Fixes RTbug #1940.
2442 Only turn off the grid event listeners if there a query comes
2443 back with a none empty list of ids. in the case that the list
2444 is empty this causes a grid.ClearSelection() call to actually
2445 clear the grid selection which causes the selected items in
2446 the map to be deselected. Fixes RTbug #1939.
2447
2448 * test/test_save.py (XMLWriterTest.Encode): Check return values.
2449 Fixes RTbug #1851.
2450
2451 2003-06-13 Bernhard Herzog <[email protected]>
2452
2453 * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
2454 self.selected_shape with the current selection to make sure the
2455 contents of the dialog are up to date when it's shown for the
2456 first time.
2457 The dialog used to work without this by luck. The recent fix to
2458 the connector module 'broke' a 'feature' the identify view was
2459 relying on, i.e that subscribing to a message in response to
2460 receiving a message of that type would mean that the new
2461 subscriber would also be called for the same message.
2462
2463 2003-06-12 Jonathan Coles <[email protected]>
2464
2465 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
2466 the image is rendered. Fixes RTbug #1937.
2467
2468 2003-06-12 Jonathan Coles <[email protected]>
2469
2470 * Thuban/Lib/fileutil.py: As is done under Windows, create the
2471 user directory if it doesn't exist on a posix system.
2472 Fixes RTbug #1815.
2473
2474 * Thuban/Model/resource.py (get_user_proj_files): Moved the
2475 called to get_application_dir here, so that the directory
2476 will only be called if this method is invoked.
2477
2478 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
2479 the projfilepath if no projection is selected.
2480
2481 2003-06-12 Jonathan Coles <[email protected]>
2482
2483 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
2484 the scalebar if the current map has no projection set.
2485
2486 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
2487 projfilepath label to just the basename of the projection file
2488 rather than include the entire path.
2489
2490 * Thuban/Model/resource.py: Fix missed proj functions that
2491 needed to be renamed.
2492
2493 2003-06-12 Jonathan Coles <[email protected]>
2494
2495 * Thuban/Model/classification.py: Removed assert statements that
2496 tested if the variable was an instance of Color.
2497
2498 * Thuban/Model/color.py (Color): Remove commented code that isn't
2499 used.
2500 (Transparent): Renamed from NoColor. Doesn't inherit from Color.
2501 Fixes RTbug #1835.
2502 (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
2503 Needed now that the class doesn't inherit from Color.
2504
2505 2003-06-12 Jonathan Coles <[email protected]>
2506
2507 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
2508 check unicode strings.
2509
2510 * test/test_layer.py: Check for existence of gdal.
2511
2512 2003-06-12 Jonathan Coles <[email protected]>
2513
2514 * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
2515 that was in load.py
2516
2517 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
2518 that was in save.py
2519
2520 2003-06-12 Jonathan Coles <[email protected]>
2521
2522 This is largely a collection of bug fixes. We also handle the
2523 case where gdal is not on the system. The XMLReader and XMLWriter
2524 classes were moved into there own files to resolve some circular
2525 import references and because they shouldn't really be in the
2526 file that is dediciated to reading/writing session files since
2527 they are also used elsewhere.
2528
2529 * Thuban/Model/classgen.py: Renamed functions to follow the
2530 function_names_with_underscores style. Fixes RTbug #1903.
2531 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
2532
2533 * Thuban/Model/layer.py: Import gdal only if it available.
2534 (RasterLayer): Handle the case where the gdal library is unavailable.
2535 Addresses RTbug #1877.
2536
2537 * Thuban/Model/load.py (XMLReader): Moved into seperate file
2538 xmlreader.py.
2539
2540 2003-06-12 Jonathan Coles <[email protected]>
2541
2542 This is largely a collection of bug fixes. We also handle the
2543 case where gdal is not on the system. The XMLReader and XMLWriter
2544 classes were moved into there own files to resolve some circular
2545 import references and because they shouldn't really be in the
2546 file that is dediciated to reading/writing session files since
2547 they are also used elsewhere.
2548
2549 * Thuban/Model/classgen.py: Renamed functions to follow the
2550 function_names_with_underscores style. Fixes RTbug #1903.
2551 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
2552
2553 * Thuban/Model/layer.py: Import gdal only if it available.
2554 (RasterLayer): Handle the case where the gdal library is unavailable.
2555 Addresses RTbug #1877.
2556
2557 * Thuban/Model/load.py (XMLReader): Moved into seperate file
2558 xmlreader.py.
2559
2560 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
2561 file xmlwriter.py.
2562
2563 * Thuban/Model/resource.py: Renamed functions to following the
2564 function_names_with_underscores style.
2565 (has_gdal_support): New function that returns true if the gdal
2566 library is available. Addresses RTbug #1877.
2567
2568 * Thuban/UI/application.py (ThubanApplication.OpenSession):
2569 Display a message box if the gdal library is not available, but
2570 only if there are any layers that would use it. Addresses RTbug #1877.
2571
2572 * Thuban/UI/classgen.py: Use renamed projection resource functions.
2573 (GenUniformPanel.__CalcStepping): Fix a slight discrepency
2574 when using integers versus floats.
2575
2576 * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
2577 determine if the "Add Image Layer" menu option should be
2578 greyed out or not. Addresses RTbug #1877.
2579
2580 * Thuban/UI/projdialog.py: Use renamed projection resource functions.
2581
2582 * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
2583 optimize if a raster layer is visible. Fixes RTbug #1931.
2584 Only draw the raster layer if the gdal library is available.
2585 Addresses RTbug #1877.
2586
2587 * test/test_classgen.py: Add tests for generate_singletons,
2588 generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
2589 (test_calculate_quantiles): Fix some tests to catch the new
2590 ValueError that is raised.
2591
2592 * test/test_proj.py: Use renamed projection resource functions.
2593
2594 * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
2595 test for saving classified layers. Fixes RTbug #1902.
2596 (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
2597
2598 2003-06-12 Jan-Oliver Wagner <[email protected]>
2599
2600 Fix for http://intevation.de/rt/webrt?serial_num=1900.
2601
2602 * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
2603
2604 * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
2605 multiplechoicedialog.py rather than from the wxPython library.
2606
2607 2003-06-11 Frank Koormann <[email protected]>
2608
2609 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
2610 update.
2611
2612 2003-06-11 Frank Koormann <[email protected]>
2613
2614 * Thuban/Lib/fileutil.py (get_application_dir): New function to
2615 determine the absolute .thuban/thuban directory under
2616 "posix" (os.expanduser) and "nt" (read AppData registry key).
2617
2618 * Thuban/Model/resource.py: Use get_application_dir
2619
2620 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
2621 Use get_application_dir.
2622
2623 2003-06-10 Bernhard Herzog <[email protected]>
2624
2625 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
2626 the messages MAP_LAYERS_REMOVED messages
2627 (LayerTableFrame.OnClose): Unsubscribe from it.
2628 (LayerTableFrame.map_layers_removed): New. Receiver for
2629 MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
2630 dialog is showing is removed.
2631
2632 2003-06-10 Bernhard Herzog <[email protected]>
2633
2634 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
2635 of the receivers list so that unsubscribing in a receiver doesn't
2636 modify it while iterating over it.
2637
2638 * test/test_connector.py
2639 (ConnectorTest.test_disconnect_in_receiver): New. Test whether
2640 unsubscribing in a receiver works correctly. See docstring for
2641 details
2642
2643 2003-06-10 Bernhard Herzog <[email protected]>
2644
2645 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
2646 message.
2647
2648 * Thuban/Model/layer.py (Layer.SetShapeStore): Send
2649 LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
2650 LAYER_CHANGED will still be sent if the classification changes.
2651
2652 * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
2653 parameter so we can subscribe to some of its messages
2654 (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
2655 and the layer's LAYER_SHAPESTORE_REPLACED
2656 (Classifier.unsubscribe_messages): New. Unsubscribe from message
2657 subscribed to in __init__
2658 (Classifier.map_layers_removed)
2659 (Classifier.layer_shapestore_replaced): receivers for the messages
2660 subscribed to in __init__. Unsubscribe and close the dialog
2661
2662 * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
2663 the map to the Classifier dialog
2664
2665 * test/test_layer.py (SetShapeStoreTests): Derive from
2666 SubscriberMixin as well so we can test messages
2667 (SetShapeStoreTests.setUp): Subscribe to some of the layer's
2668 messages
2669 (SetShapeStoreTests.tearDown): Clear the messages again
2670 (SetShapeStoreTests.test_sanity): Expand the doc-string and check
2671 for the modified flag too
2672 (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
2673 to check whether SetShapeStore sets the modified flag
2674 (SetShapeStoreTests.test_set_shape_store_different_field_name)
2675 (SetShapeStoreTests.test_set_shape_store_same_field)
2676 (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
2677 Add tests for the messages. This checks both the new
2678 LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
2679
2680 2003-06-06 Jan-Oliver Wagner <[email protected]>
2681
2682 * Thuban/UI/mainwindow.py: Improved and partly added help texts for
2683 the menu items.
2684
2685 2003-06-05 Frank Koormann <[email protected]>
2686
2687 * Thuban/UI/identifyview.py (IdentifyView.__init__):
2688 Layout reimplemented without panel. Make life easier to fit the list
2689 in the dialog.
2690
2691 2003-06-05 Frank Koormann <[email protected]>
2692
2693 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
2694 once on initialisation (Former implementation resulted in multiple
2695 entries for each projection).
2696 (ProjFrame.__FillAvailList): selectProj as second optional parameter,
2697 if set, select the projection found under the specified name. This
2698 overwrites any other selection estimate.
2699 Removed projchoice filling from this method.
2700 (ProjFrame._OnSave, ProjFrame._OnAddToList):
2701 Updated call of ProjFrame.__FillAvailList
2702 (LCCPanel._DoLayout): Moved parameter controls in more common order.
2703
2704 * Resources/Projections/defaults.proj: Extended defaults representing
2705 various common European projections.
2706
2707 2003-06-05 Frank Koormann <[email protected]>
2708
2709 * Thuban/UI/identifyview.py (IdentifyView.__init__):
2710 Use ListCtrl instead of GridCtrl
2711
2712 * Thuban/Model/resource.py:
2713 Guess location of .thuban directory from tempdir parent directory.
2714
2715 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
2716 Guess location of .thuban directory from tempdir parent directory.
2717
2718 2003-06-04 Bernhard Herzog <[email protected]>
2719
2720 Do not cache the values returned by the tree widget's
2721 GetFirstChild and GetNextChild methods because it led to lots of
2722 segfaults. The new way requires more brute force but is more
2723 reliable.
2724
2725 * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
2726 variable layer2id
2727 (LegendTree.find_layer): New method to do with brute force what
2728 layer2id tried to accomplish
2729 (LegendTree._OnMsgLayerChanged)
2730 (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
2731 Use find_layer instead of layer2id
2732 (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
2733 update layer2id anymore
2734 (LegendTree._OnMsgMapLayersRemoved)
2735 (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
2736
2737 2003-06-03 Thomas Koester <[email protected]>
2738
2739 * Thuban/Model/classgen.py (GenQuantiles0): New function.
2740
2741 2003-06-02 Bernhard Herzog <[email protected]>
2742
2743 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
2744 New commands.
2745 (main_menu): Add the new commands.
2746 (MainWindow.TableRename): New. Implementation of the table_rename
2747 command.
2748 (MainWindow.RenameLayer): New. Implementation of the layer_rename
2749 command.
2750
2751 * Thuban/Model/session.py (Session.AddTable): call self.changed to
2752 set the modified flag
2753
2754 * test/test_session.py (TestSessionSimple.test_add_table): Test
2755 whether the modified flag is set properly
2756
2757 * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
2758 instead of issue so that the modified flags get updated.
2759
2760 * test/test_base.py (SomeTitledObject): Derive from Modifiable
2761 instead of Publisher to reflect reality better and to accomodate
2762 the fact that SetTitle now calls changed instead of issue
2763
2764 2003-06-02 Bernhard Herzog <[email protected]>
2765
2766 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
2767 acquisition has to happen before the try in a try-finally.
2768
2769 2003-06-02 Bernhard Herzog <[email protected]>
2770
2771 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
2772 possible that a layer is removed that is not currently selected in
2773 the legend so don't check for this.
2774
2775 2003-05-30 Bernhard Herzog <[email protected]>
2776
2777 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
2778 variables to None that have direct or indirect references to
2779 shapefiles or dbf files to make sure that they do go away and the
2780 files are closed.
2781
2782 2003-05-30 Bernhard Herzog <[email protected]>
2783
2784 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
2785 availImgListIndices when a new image list is created
2786
2787 2003-05-30 Bernhard Herzog <[email protected]>
2788
2789 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
2790 changing_selection to indicate whether the LegendTree code itself
2791 is currently changing the selection
2792 (LegendTree.normalize_selection): New method to normalize the
2793 selection by selecting the layer item even if the user clicked on
2794 the classification.
2795 (LegendTree._OnSelChanged): normalize the selection. This works
2796 around a bug in wx which doesn't keep track of the selection
2797 properly when subtrees are deleted.
2798
2799 2003-05-30 Bernhard Herzog <[email protected]>
2800
2801 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
2802 maximum and minimum scale factors.
2803
2804 * test/test_classgen.py (ClassGenTest.test): Update to reflect the
2805 changes in classgen.py
2806
2807 2003-05-30 Jonathan Coles <[email protected]>
2808
2809 * Thuban/Model/classgen.py: Remove ClassGenerator class but make
2810 all the methods functions. Fixes RTBug #1903.
2811
2812 * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
2813 to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
2814 RTBug #1907.
2815
2816 * Thuban/UI/classgen.py: Use classgen functions that were part
2817 of the ClassGenerator class. Put try/finally blocks around
2818 code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
2819 RTBug #1904.
2820
2821 * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
2822
2823 * Thuban/UI/legend.py: The legend was cleared and repopulated any
2824 time something changed which caused some state to be lost such
2825 as which children were expanded or collapsed. Fixes RTBug #1901.
2826 (LegendTree._OnMsgMapLayersAdded): Add only new layers.
2827 (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
2828 the legend but not in the map.
2829 (LegendTree.__FillTree): Move main functionality out into smaller
2830 methods that can be used by other methods.
2831 (LegendTree.__FillTreeLayer): Reuse old slots in the image list
2832 if they are available.
2833 (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
2834 that we override the wxTreeCtrl method. Iterate over children
2835 and call __RemoveLayer.
2836 (LegendTree.__AddLayer): New. Add a new layer to the legend.
2837 (LegendTree.__RemoveLayer): Remove a layer from the legend.
2838 (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
2839 Should only be called with the id of a layer branch.
2840 (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
2841 Returns the root item or creates one if necessary.
2842
2843 * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
2844 ProjectRasterFile with tuple arguments instead of strings.
2845
2846 * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
2847 with try/finally. Fixes RTBug #1904.
2848
2849 * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
2850 with try/finally. Fixes RTBug #1904.
2851 (MapCanvas.FitSelectedToWindow): If a single point is selected
2852 simply center it on the display. Fixes RTBug #1849.
2853
2854 * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
2855 to be compiled as a standalone app. Now the code can only be
2856 called from Python which simplifies the parameter passing.
2857 (ProjectRasterFile): Handle Python arguments. Remove code that
2858 checks for a destination dataset. Add more clean up code.
2859
2860 * test/test_map.py (TestMapWithContents.test_raise_layer_top,
2861 TestMapWithContents.test_lower_layer_bottom):
2862 Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
2863 Fixes RTBug #1907.
2864
2865 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
2866 extent to the map when the legend is toggled. Fixes RTBug #1881.
2867
2868 2003-05-29 Jan-Oliver Wagner <[email protected]>
2869
2870 * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
2871 unsubscribes all that is subcribed in __init__.
2872
2873 2003-05-28 Bernhard Herzog <[email protected]>
2874
2875 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
2876 (MainWindow.CanDuplicateLayer): New methods to implement the
2877 Layer/Duplicate command.
2878 (layer_duplicate command): New.
2879 (main_menu): Add layer_duplicate to the Layer menu.
2880
2881 2003-05-28 Bernhard Herzog <[email protected]>
2882
2883 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
2884 renderer so that NULL/None values get displayed differently (by a
2885 gray rectangle).
2886 (TableGrid.__init__): Override the default renderers
2887
2888 2003-05-28 Bernhard Herzog <[email protected]>
2889
2890 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
2891 classification to "None" if the type of the field has changed.
2892
2893 * test/test_layer.py (SetShapeStoreTests): New. Class with a few
2894 test for the Layer.SetShapeStore method
2895
2896 2003-05-28 Jan-Oliver Wagner <[email protected]>
2897
2898 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
2899 does not necessarily have a filename).
2900
2901 2003-05-28 Jan-Oliver Wagner <[email protected]>
2902
2903 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
2904 sort the selection list for the dialog.
2905
2906 2003-05-28 Frank Koormann <[email protected]>
2907
2908 * extensions/thuban/wxproj.cpp
2909 (project_point): Removed cast to int for projected point coordinates.
2910 (shape_centroid): Return last point if all polygon vertices fall
2911 to one point.
2912
2913 2003-05-28 Bernhard Herzog <[email protected]>
2914
2915 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
2916 with layers that don't have shapestores, i.e. raster layers.
2917
2918 2003-05-28 Bernhard Herzog <[email protected]>
2919
2920 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
2921 when determining the title from the filename.
2922
2923 * test/test_dbf_table.py (TestDBFTable.test_title): Update to
2924 reflect changes in the way the title is derived from the filename
2925
2926 2003-05-28 Frank Koormann <[email protected]>
2927
2928 * Thuban/UI/mainwindow.py (MainWindow.TableShow):
2929 Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
2930
2931 2003-05-27 Bernhard Herzog <[email protected]>
2932
2933 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
2934 delegate SelectedLayer.
2935 (MainWindow.LayerUnjoinTable): Implement.
2936 (_can_unjoin): New. Helper function for the sensitivity of the
2937 layer/unjoin command.
2938
2939 * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
2940 (DerivedShapeStore.OrigShapeStore): New. Return the original
2941 shapestore. Used to figure out how to unjoin.
2942 (DerivedShapeStore.Shapefile): Fix a typo.
2943
2944 2003-05-27 Bernhard Herzog <[email protected]>
2945
2946 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
2947 well
2948 (JoinDialog.__init__): Use the layer parameter and only build the
2949 left choice when a layer is given
2950 (JoinDialog.OnJoin): Handle layer joins as well
2951 (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
2952 that the user selects the "Select..." item. The sensitivitly
2953 updating is now in update_sensitivity
2954 (JoinDialog.y): New method to refactor the sensitivity update of
2955 the join button into its own method.
2956
2957 * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
2958
2959 2003-05-27 Bernhard Herzog <[email protected]>
2960
2961 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
2962 iff there are unreferenced tables in the session
2963
2964 2003-05-27 Bernhard Herzog <[email protected]>
2965
2966 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
2967
2968 * Thuban/Model/session.py (Session.UnreferencedTables): New method
2969 to return tables that are not referenced by other tables or shape
2970 stores and can be removed.
2971 (Session.RemoveTable): Issue a TABLE_REMOVED message after
2972 removing the table
2973
2974 * Thuban/UI/mainwindow.py: Remove unused imports
2975 (MainWindow.TableClose): Implement.
2976
2977 * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
2978 messages so that the frame will be automatically closed when a new
2979 session is opened or the table is removed.
2980 (TableFrame.OnClose): Unsubscribe the Subscriptions made in
2981 __init__
2982 (TableFrame.close_on_session_replaced)
2983 (TableFrame.close_on_table_removed): New. Subscribers that close
2984 the window
2985
2986 * test/test_session.py (TestSessionMessages.test_remove_table)
2987 (TestSessionSimple.test_remove_table): Move the test to
2988 TestSessionSimple and add test for the TABLE_REMOVED message
2989 (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
2990 (TestSessionSimple.test_unreferenced_tables) New. Test for the
2991 UnreferencedTables method.
2992 (UnreferencedTablesTests): New. Class with some more sophisticated
2993 tests for UnreferencedTables.
2994
2995 2003-05-27 Frank Koormann <[email protected]>
2996
2997 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
2998 display has some unwanted side effects. Removed again.
2999
3000 2003-05-27 Frank Koormann <[email protected]>
3001
3002 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
3003
3004 * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
3005
3006 2003-05-27 Jan-Oliver Wagner <[email protected]>
3007
3008 * test/test_menu.py (MenuTest.test): Added test for
3009 Menu.RemoveItem().
3010
3011 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
3012 the menu.
3013
3014 2003-05-27 Frank Koormann <[email protected]>
3015
3016 Nonmodal dialogs without parent (i.e. they can fall behind the main
3017 window)
3018
3019 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
3020 all dialogs in the dialogs dictionary and the canvas.
3021
3022 * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
3023 parent, i.e. can fall behind other windows.
3024 (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
3025 dictionary before removing it.
3026
3027 * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
3028
3029 * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
3030 * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
3031 * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
3032
3033 2003-05-27 Bernhard Herzog <[email protected]>
3034
3035 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
3036 tableview dialog
3037 (MainWindow.TableShow): Use ShowTableView to open the dialogs.
3038 Also, don't use the table's titles as the dialog names. The titles
3039 aren't guaranteed to be unique.
3040 (MainWindow.TableOpen): Open a table view dialog after opening the
3041 table
3042
3043 2003-05-27 Bernhard Herzog <[email protected]>
3044
3045 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
3046 effect can be achieved by simply closing the window showing the
3047 table.
3048 (MainWindow.TableHide): Removed.
3049 (main_menu): Removed "table_hide"
3050
3051 2003-05-27 Frank Koormann <[email protected]>
3052
3053 Fix legend tree display problems under Win32
3054
3055 * Thuban/UI/legend.py: BMP_SIZE_W = 15
3056 (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
3057 (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
3058
3059 * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
3060
3061 2003-05-27 Jan-Oliver Wagner <[email protected]>
3062
3063 * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
3064 'after' now allows to insert separators almost anywhere in the menu.
3065
3066 2003-05-27 Frank Koormann <[email protected]>
3067
3068 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
3069 "S" of selection box label to hint on hot key (Alt-S). Works under
3070 Win32 but is ignored under GTK.
3071
3072 2003-05-26 Frank Koormann <[email protected]>
3073
3074 * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
3075 Center Choices.
3076
3077 2003-05-26 Bernhard Herzog <[email protected]>
3078
3079 Remove the Precision methods again. They're too DBF specific to be
3080 part of the table interface and they're only used in table_to_dbf
3081 anyway.
3082
3083 * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
3084 fixed precision of 12 for doubles.
3085 (TransientTableBase.Precision): Removed
3086 (AutoTransientTable.Width): Delegate to self.table.
3087
3088 * Thuban/Model/table.py (DBFTable.Precision)
3089 (MemoryTable.Precision): Removed.
3090 (MemoryTable.Width): Use a fixed precision of 12 for doubles.
3091 (table_to_dbf): Use a fixed precision of 12 for floats unless the
3092 column object specifies something else.
3093
3094 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
3095 test for table_to_dbf
3096
3097 2003-05-26 Bernhard Herzog <[email protected]>
3098
3099 * test/test_transientdb.py
3100 (TestTransientTable.run_iceland_political_tests): Fix a comment.
3101
3102 2003-05-26 Bernhard Herzog <[email protected]>
3103
3104 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
3105 implementation. Mark parts of the file format strings for
3106 localization.
3107
3108 * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
3109 file and add the table to the tables managed by the session
3110
3111 * test/test_session.py (TestSessionSimple.test_open_table_file):
3112 New. test case for OpenTableFile
3113
3114 2003-05-26 Jan-Oliver Wagner <[email protected]>
3115
3116 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
3117 Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
3118 Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
3119 Replace the true/false of wxWindows by True/False of Python 2.2.1.
3120
3121 2003-05-26 Jan-Oliver Wagner <[email protected]>
3122
3123 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
3124 already a selection present, update the grid accordingly.
3125
3126 * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
3127 resizeable and increase its initial size.
3128
3129 2003-05-26 Frank Koormann <[email protected]>
3130
3131 Table export functionality
3132
3133 * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
3134 Return width (in characters) for a column.
3135 (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
3136 (table_to_dbf): Write table to dbf file.
3137 (table_to_csv): Write table to csv file.
3138
3139 * Thuban/Model/transientdb.py (TransientTableBase.Width,
3140 TransientTableBase.Precision): Return column width and precision.
3141
3142 * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
3143 or table_to_csv depending on file selection.
3144
3145 * test/test_dbf_table.py:
3146 Test table_to_dbf (extension of former part of test).
3147
3148 * test/test_csv_table.py:
3149 Test table_to_csv.
3150
3151 2003-05-23 Jan-Oliver Wagner <[email protected]>
3152
3153 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
3154 Use QueryTableFrame instead of TableFrame.
3155
3156 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
3157 table window with 'Layer Table:' instead of 'Table:'.
3158
3159 2003-05-23 Jan-Oliver Wagner <[email protected]>
3160
3161 Give all tables a title via mix-in TitledObject.LayerShowTable
3162
3163 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
3164 only if it exists.
3165
3166 * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
3167 and call its init-method with a default title. Remove Title() method.
3168
3169 * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
3170 AutoTransientTable): mix-in TitledObject and call its init-method with
3171 a default title. Remove Title() method.
3172
3173 2003-05-23 Bernhard Herzog <[email protected]>
3174
3175 * Thuban/Model/session.py (Session.AddShapeStore): Define
3176 AddShapeStore analogously to AddTable.
3177
3178 * test/test_session.py (TestSessionSimple.test_add_shapestore):
3179 New. Test for AddShapeStore
3180
3181 2003-05-23 Jan-Oliver Wagner <[email protected]>
3182
3183 Introducing QueryTableFrame and a very coarse ShowTable implementation.
3184
3185 * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
3186 class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
3187 The latter implements the selection GUI without dependency on a layer.
3188 LayerTableFrame now is derived from QueryTableFrame and connects
3189 to a layer.
3190
3191 * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
3192 implementation that still needs work.
3193
3194 * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
3195
3196 2003-05-22 Frank Koormann <[email protected]>
3197
3198 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
3199 Added "outer_join = False" as optional parameter.
3200 (TransientJoinedTable.create): If outer join is true, perform a
3201 "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
3202 the left table. Records not matching are filled with 0 / None.
3203
3204 * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
3205 (JoinDialog.OnJoin): Consider outer join check box.
3206
3207 2003-05-22 Bernhard Herzog <[email protected]>
3208
3209 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
3210 somewhat safer way. Storing the traceback in a local variable can
3211 lead to memory leaks
3212
3213 2003-05-22 Bernhard Herzog <[email protected]>
3214
3215 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
3216 the wxMessageDialog's Destroy() method.
3217
3218 2003-05-22 Frank Koormann <[email protected]>
3219
3220 * Thuban/UI/join.py (JoinDialog.__init__): Make use of
3221 TransientTable.Title()
3222
3223 2003-05-22 Frank Koormann <[email protected]>
3224
3225 Join Dialog, initial version.
3226
3227 * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
3228
3229 * Thuban/UI/join.py (JoinDialog): Functional implementation of
3230 former framework. Renamed Table1/Table2 to LeftTable/RightTable
3231 in all occurences.
3232
3233 * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
3234 Typo fixed.
3235
3236 2003-05-22 Bernhard Herzog <[email protected]>
3237
3238 Give the tables titles so that the GUI can display more meaningful
3239 names. For now the titles are fixed but depend on e.g. filenames
3240 or the titles of the joined tables.
3241
3242 * Thuban/Model/transientdb.py (TransientTable.Title)
3243 (TransientJoinedTable.Title, AutoTransientTable.Title): New.
3244
3245 * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
3246
3247 * test/test_transientdb.py
3248 (TestTransientTable.test_auto_transient_table_title): New. Test
3249 for the Title method
3250 (TestTransientTable.test_transient_joined_table)
3251 (TestTransientTable.test_transient_table): Add test for the Title
3252 methods
3253
3254 * test/test_memory_table.py (TestMemoryTable.test_title): New.
3255 Test for the Title method
3256
3257 * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
3258 the Title method
3259
3260 2003-05-22 Bernhard Herzog <[email protected]>
3261
3262 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3263 Provide a better way to destroy the layers
3264 (TestLayer.test_base_layer, TestLayer.test_arc_layer)
3265 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3266 (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
3267 the new way to destroy the layers.
3268 (TestLayer.test_derived_store): New. Test for using a layer with a
3269 DerivedShapeStore
3270
3271 * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
3272 filename if the shape store actually has one.
3273
3274 2003-05-22 Bernhard Herzog <[email protected]>
3275
3276 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
3277 for the filename
3278
3279 * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
3280 for the FileName method
3281 (TestDBFTableWriting.test_write): Fix spelling of filename
3282
3283 2003-05-22 Thomas Koester <[email protected]>
3284
3285 * Thuban/Model/range.py, test/test_range.py: Brought over new Range
3286 from SciParam that now really is immutable.
3287
3288 2003-05-22 Frank Koormann <[email protected]>
3289
3290 Layer Top/Bottom placement added to legend.
3291
3292 * Thuban/UI/legend.py
3293 (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
3294 bound to tool events.
3295 (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
3296 New, methods binding the event methods with the map methods.
3297
3298 * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
3299 layer at top/bottom of layer stack.
3300
3301 * Resources/Bitmaps/top_layer.xpm: New button icon.
3302
3303 * Resources/Bitmaps/bottom_layer.xpm: New button icon.
3304
3305 2003-05-22 Bernhard Herzog <[email protected]>
3306
3307 * Thuban/Model/session.py (Session.RemoveTable): New method to
3308 remove tables
3309
3310 * test/test_session.py (TestSessionSimple.test_remove_table): New.
3311 Test for RemoveTable
3312
3313 2003-05-22 Thomas Koester <[email protected]>
3314
3315 * Thuban/Model/classgen.py: Added short module doc string and CVS id.
3316 (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
3317
3318 2003-05-22 Bernhard Herzog <[email protected]>
3319
3320 Implement a way to discover dependencies between tables and
3321 shapestores.
3322
3323 * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
3324 (TransientJoinedTable.Dependencies)
3325 (AutoTransientTable.SimpleQuery): New. Implement the dependencies
3326 interface
3327 (TransientJoinedTable.__init__): Keep tack of the original table
3328 objects in addition to the corresponding transient tables.
3329
3330 * Thuban/Model/table.py (DBFTable.Dependencies)
3331 (MemoryTable.Dependencies): New. Implement the dependencies
3332 interface
3333
3334 * Thuban/Model/data.py (ShapeTable): New. Helper class for
3335 ShapefileStore
3336 (ShapefileStore.__init__): Use ShapeTable instead of
3337 AutoTransientTable
3338 (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
3339 (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
3340 methods for filename and type
3341 (ShapefileStore.Dependencies): New. Implement the dependencies
3342 interface
3343 (DerivedShapeStore): New class to replace SimpleStore. The main
3344 difference to SimpleStore is that it depends not on a shapefile
3345 but another shapestore which expresses the dependencies a bit
3346 better
3347 (SimpleStore.__init__): Add deprecation warning.
3348
3349 * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
3350 Test for the Dependencies method.
3351
3352 * test/test_memory_table.py (TestMemoryTable.test_dependencies):
3353 New. Test for the Dependencies method.
3354
3355 * test/test_transientdb.py
3356 (TestTransientTable.test_auto_transient_table_dependencies): New.
3357 Test for the Dependencies method.
3358 (TestTransientTable.test_transient_joined_table): Add test for the
3359 Dependencies method.
3360
3361 * test/test_session.py (TestSessionSimple.setUp)
3362 (TestSessionSimple.tearDown): New. Implement a better way to
3363 destroy the sessions.
3364 (TestSessionSimple.test_initial_state)
3365 (TestSessionSimple.test_add_table): Bind session to self.session
3366 so that it's destroyed by tearDown
3367 (TestSessionSimple.test_open_shapefile): New. Test for
3368 OpenShapefile and the object it returns
3369
3370 2003-05-22 Bernhard Herzog <[email protected]>
3371
3372 * Thuban/Model/session.py (Session.AddTable): New method to
3373 register tables with the session.
3374 (Session.Tables): Return the tables registered with AddTable too.
3375
3376 * test/test_session.py (TestSessionSimple.test_add_table): New.
3377 Test case for the AddTable method
3378
3379 2003-05-22 Frank Koormann <[email protected]>
3380
3381 UI polishing updates: Place main buttons (OK, Cancel, etc) in the
3382 lower right corner, center labels for selections, initialize controls
3383 in reasonable order for keyboard navigation.
3384
3385 * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
3386 (ProjFrame.__DoOnProjAvail): Determine position of current projection
3387 using the wxListBox.FindString() method. Still a problem (#1886)
3388
3389 * Thuban/UI/classifier.py
3390 (Classifier.__init__, SelectPropertiesDialog.__init__)
3391
3392 * Thuban/UI/classgen.py (ClassGenDialog.__init__,
3393 (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
3394 different classification types from here to __init__.
3395 (GenUniquePanel.__init__): Set the column width of the first field
3396 in the Field ListCtrl to the full width.
3397
3398 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
3399 Button to 'Export'. Center Buttons in Selection Box, set Focus to
3400 Grid.
3401 (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
3402 changes focus to the Selection when pressing "Alt-S".
3403
3404 * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
3405 the text if not visible. The italic font sometimes exceeds the
3406 rendering area.
3407
3408 2003-05-21 Jonathan Coles <[email protected]>
3409
3410 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
3411 to OnClose so that Thuban closes correctly.
3412
3413 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
3414 DockFrame.OnClose, not DockFrame._OnClose.
3415
3416 2003-05-21 Jonathan Coles <[email protected]>
3417
3418 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
3419 references to 'inf' and use new Range __init__ to pass floats
3420 directly rather than converting them to strings first.
3421 Fixes RTBug #1876.
3422
3423 * Thuban/Model/classification.py (ClassGroupRange.SetRange):
3424 Use new Range ___init__ to pass floats.
3425
3426 * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
3427 filename is a valid image file. Throw IOError otherwise.
3428
3429 * Thuban/Model/range.py: Brought over new Range from SciParam that
3430 is immutable and has an __init__ which can accept floats.
3431
3432 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
3433 into try block. AddLayer doesn't throw any exceptions anymore.
3434 (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
3435 try block.
3436
3437 * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
3438 the first item in choices. Fixes RTBug #1882.
3439
3440 * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
3441 has gone to 0 which is a serious problem. abort.
3442 (MapRenderer.draw_raster_layer): Catch IOError seperately and
3443 print the error from GDAL.
3444
3445 * Thuban/UI/tableview.py (TableGrid.__init__): Call
3446 ToggleEventListeners to turn on listening.
3447 (TableGrid.ToggleEventListeners): New. Turns event listening on
3448 and off so as to prevent excessive messages.
3449 (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
3450 to suppress excessive messages when selecting many rows.
3451 Fixes RTBug #1880.
3452
3453 * Thuban/UI/view.py: Added checks against if scale == 0. This
3454 is a serious problem that can occur when an image without
3455 geo data is loading and causes the map projection bounds to
3456 go to infinity. Right now, the solution is to simply try
3457 to recover.
3458
3459 * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
3460 to set the MFILEReceiver attributes even if the data is NULL.
3461
3462 * extensions/thuban/gdalwarp.cpp: Improved the error handling
3463 and passed GDAL messages back up to the Python layer. Also
3464 tried to fix some memory leaks that were present in the original
3465 utility but didn't matter because the program aborted.
3466
3467 * test/test_range.py: Copied over tests from SciParam. Removed
3468 tests against importing. Fixes RTBug #1867.
3469
3470 2003-05-21 Bernhard Herzog <[email protected]>
3471
3472 * test/test_load.py: Remove unused imports and restructure the
3473 test code
3474 (LoadSessionTest): Split into one class for each test and turn
3475 LoadSessionTest itself into the base class for all such session
3476 tests.
3477 (ClassificationTest): New base class for load tests that test
3478 classifications
3479 (TestSingleLayer, TestLayerVisibility, TestClassification)
3480 (TestLabels, TestLayerProjection, TestRasterLayer): New classes
3481 for the individual tests
3482
3483 * test/support.py (FileLoadTestCase.filename): New base class for
3484 file loading tests
3485
3486 2003-05-21 Jan-Oliver Wagner <[email protected]>
3487
3488 * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
3489 Mercator' to 'UTM Zone 32' as a more convenient example.
3490 Added 'Gauss Krueger Zone 6'.
3491
3492 * Data/iceland_sample_raster.thuban: political polygon now
3493 filled transparent to have the raster image visible at once.
3494
3495 2003-05-21 Frank Koormann <[email protected]>
3496
3497 * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
3498 OnClose() to keep in sync with extensions. Internally Thuban
3499 still uses "underscored" names.
3500
3501 2003-05-20 Jonathan Coles <[email protected]>
3502
3503 This puts back Raster layer support. These layers support projections
3504 through the GDAL library. Currently, the CVS version is being used.
3505 There are no Debian packages available although this may change soon.
3506 A GDAL driver was extended to support writing to memory rather to
3507 files.
3508
3509 There is still some work that needs to be done, such as some error
3510 handling when loading invalid images or when there is a problem
3511 projecting the image. This putback simply checks in the majority
3512 of the work.
3513
3514 * setup.py: Add gdalwarp library extension.
3515
3516 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
3517 Defaults to False, but can be overridden by subclasses if they
3518 support classification.
3519 (RasterLayer): New. Defines a new layer that represents an
3520 image.
3521
3522 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
3523 tag handler.
3524 (SessionLoader.start_layer): Encode the filename.
3525 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
3526 New. Supports reading a rasterlayer tag.
3527
3528 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
3529
3530 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
3531 get a string in Latin1. If we get such as string convert it to
3532 unicode first, otherwise leave if alone before encoding.
3533 (SessionSaver.write_layer): Add support for writing both Layers
3534 and RasterLayers.
3535
3536 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
3537 The right argument may not be a string, it could also be a Column.
3538
3539 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
3540 Make initial window size 600x400. Fixes RTBug #1872.
3541
3542 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
3543 the dialog is constructed so that we can support layers that
3544 do not have classifications.
3545 (Classifier._OnTry): Only build a classification if the layer
3546 supports one.
3547
3548 * Thuban/UI/legend.py: Change all checks that a layer is an
3549 instance of Layer into checks against BaseLayer.
3550 (LegendTree.__FillTreeLayer): Only add children to a branch if
3551 the layer supports classification.
3552
3553 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
3554 MainWindow.OpenSession): Don't proceed with an action if the
3555 user chooses Cancel when they are asked to save changes.
3556 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
3557 user to select an image file. Create a new RasterLayer and add
3558 it to the map.
3559
3560 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
3561 for rendering RasterLayer layers.
3562 (MapRenderer.draw_raster_layer): Actually method that calls
3563 the GDALWarp python wrapper and constructs an image from the
3564 data returned.
3565
3566 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
3567 Choices symbols to match those used in the table query method.
3568 Replace deprecated method calls on table with new method names.
3569
3570 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
3571 how small the scale can get. This still needs more testing.
3572
3573 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
3574 Provides a driver to output in .bmp format.
3575
3576 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
3577 New. Provides IO routines which write to memory, rather than a file.
3578
3579 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
3580 of the gdalwarp utility provided in GDAL. Added function calls
3581 that can be accessed from python.
3582
3583 * Data/iceland_sample_raster.thuban: New. Sample file that uses
3584 a raster layer.
3585
3586 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
3587 layer image data.
3588
3589 * Doc/thuban.dtd: Added rasterlayer attribute definition.
3590
3591 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
3592 tests associated with the raster layer code.
3593
3594 * test/test_transientdb.py
3595 (TestTransientTable.test_auto_transient_table_query): Added a test
3596 for using a Column object as the "right" parameter to a query.
3597
3598 2003-05-19 Frank Koormann <[email protected]>
3599
3600 * Thuban/version.py (get_changelog_date):
3601 Catch exceptions if ChangeLog does not exist.
3602
3603 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
3604
3605 2003-05-19 Frank Koormann <[email protected]>
3606
3607 Extended version information for Thuban
3608
3609 * Thuban/version.py: New, version information for Thuban: Last
3610 modification date and last ChangeLog entry date.
3611
3612 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
3613 information: Display Thuban, wxPython and Python version.
3614
3615 2003-05-16 Bernhard Herzog <[email protected]>
3616
3617 * Thuban/Model/save.py: Remove some unused imports including the
3618 __future__ import for nested_scopes as Thuban relies on Python 2.2
3619 now.
3620 (XMLWriter.encode): Remove the special case for a None argument.
3621 In the saver encode is always called with a string argument.
3622
3623 2003-05-16 Bernhard Herzog <[email protected]>
3624
3625 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
3626 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
3627 of the bug was that e.g. float("1.2") would fail. Thuban now
3628 requires 2.4.x.
3629
3630 2003-05-16 Frank Koormann <[email protected]>
3631
3632 Printing enhancement and WMF export (under Win32)
3633
3634 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
3635 ScreenRenderer. Renders Map, Legend and Scalebar for export.
3636 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
3637 PrintRender.
3638
3639 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
3640 to fullfil information needed for PrinterRenderer.
3641 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
3642 (MapCanvas.Print): Adapted to new MapPrintout.
3643 (OutputTransform): General calculations to transform from canvas
3644 coordinates to export/printing devices.
3645
3646 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
3647 new method_command to call ExportMap, with platform dependency (only
3648 __WXMSW__)
3649
3650 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
3651 of scalebar drawing area as new parameters.
3652
3653 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
3654
3655 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
3656 Update to extended scalebar.DrawScalebar header.
3657
3658 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
3659
3660 * test/test_scalebar.py: Made test executable as standalone.
3661
3662 2003-05-16 Bernhard Herzog <[email protected]>
3663
3664 * Thuban/Model/table.py (Table): Remove this compatibility alias
3665 for DBFTable.
3666
3667 * test/test_table.py: Import DBFTable as Table because that alias
3668 doesn't exist anymore.
3669
3670 * Thuban/UI/classgen.py: Remove some unused imports
3671
3672 2003-05-14 Jonathan Coles <[email protected]>
3673
3674 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
3675 Fix docstring.
3676 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
3677 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
3678 values of the supplied range to determine the beginning and end
3679 bounds of the generated classes.
3680
3681 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
3682 do not have a leading 0 (.5 is now accepted as well as 0.5).
3683
3684 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
3685 call to ClassGenerator.GenUniformDistribution.
3686
3687 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
3688 layout bug with the 'Projection' label.
3689
3690 * test/support.py (FloatTestCase): New. Needed for the Range tests.
3691
3692 * test/test_range.py: New. Imported from SciParam.
3693
3694 2003-05-12 Jonathan Coles <[email protected]>
3695
3696 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
3697 to table.UniqueValues() with calls that retrieve all the values
3698 from the table. This will need to be replaced by a method on table
3699 which can simply return the list (perhaps more efficiently).
3700
3701 2003-05-12 Jonathan Coles <[email protected]>
3702
3703 The return value of ClassGenerator.CalculateQuantiles has changed.
3704 Refer to the documentation for details.
3705
3706 * test/test_classgen.py: Modified Quantile tests to use the
3707 new return values.
3708
3709 * Thuban/Model/classgen.py
3710 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
3711 use new return values from CalculateQuantiles to produce the correct
3712 range bounds in the Classification.
3713 (ClassGenerator.CalculateQuantiles): Add more comments describing
3714 the return values and parameters. Make minor adjustments to improve
3715 the legibility of the code. Fix problem with adjusted not being set
3716 in most cases.
3717
3718 2003-05-12 Frank Koormann <[email protected]>
3719
3720 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
3721 and latin1. Fixes #1851 finally.
3722
3723 2003-05-09 Jonathan Coles <[email protected]>
3724
3725 * test/test_classgen.py: New. Tests the Quantile algorithm.
3726
3727 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
3728 Clean up debugging statement, add comments, fix a small bug in the
3729 returned adjusted percentiles.
3730
3731 2003-05-09 Jonathan Coles <[email protected]>
3732
3733 Introduces Range class from SciParam into the ClassGroupRange class,
3734 and such ranges can now be saved and loaded from disk.
3735
3736 Quantiles are now available in the Classification Generator.
3737
3738 Initial support for building Queries on a table. Doesn't do anything
3739 but run some tests.
3740
3741 * Thuban/Model/classification.py: Explicit imports.
3742 (ClassGroupRange): Use the Range class to store the underlying
3743 range information. The interface remains the same, except for
3744 GetRange(), and you can also supply a Range object as the min
3745 parameter to SetRange or __init__.
3746
3747 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
3748 string appropriately for use in Thuban. Fixes RTbug #1851.
3749 (SessionLoader.end_projection): Handle the context of the
3750 projection tag a bit better by looking at what objects are not
3751 None. There was an assumption that a projection tag for a map
3752 could occur before any layers.
3753 (SessionLoader.start_clrange): Provide backward compatibility for
3754 reading min/max values as well as the new range parameter.
3755
3756 * Thuban/Model/map.py: Explicit imports.
3757
3758 * Thuban/Model/resource.py: Import _.
3759 (ProjFileSaver.write): write header using projfile.dtd.
3760
3761 * Thuban/Model/save.py: Explicit imports.
3762 (XMLWriter.encode): New. Encode the given string from a format
3763 used by Thuban into UTF-8. Fixes RTbug #1851.
3764
3765 * Thuban/UI/classgen.py: Explicit imports.
3766 (ClassGenDialog.__init__): Clean up the code and add support
3767 for Quantiles.
3768 (ClassGenDialog.OnOK): Add support for Quantiles.
3769 (GenQuantilesPanel): New. Input panel for Quantiles.
3770 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
3771 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
3772
3773 * Thuban/Model/classgen.py: New. Contains all the classes named above.
3774
3775 * Thuban/UI/classifier.py: Explicit imports.
3776 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
3777 ClassTable.SetValueAsCustom): Reworked to use new Range class.
3778
3779 * Thuban/UI/legend.py: Explicit imports.
3780
3781 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
3782 a Table menu and associated method calls.
3783 (MainWindow.choose_color): Removed. No longer needed.
3784
3785 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
3786 should be disabled if no projection is selected in the available
3787 list.
3788
3789 * Thuban/UI/renderer.py: Explicit imports.
3790
3791 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
3792 with correctly selecting the rows and issuing the right events.
3793 Be sure to call Skip() to allow the grid to do some of its own
3794 handling which allows the rows to actually be selected.
3795 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
3796 selecting multiple shapes.
3797 (LayerTableFrame): Support for building Queries.
3798 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
3799
3800 * Thuban/UI/tree.py: Explicit imports.
3801
3802 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
3803 table view can call it.
3804
3805 * test/test_classification.py: Explicit imports.
3806 (TestClassification.test_ClassGroupRange): Fix test for new
3807 Range class.
3808
3809 * Doc/thuban.dtd: Add range parameter for clrange.
3810
3811 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
3812 object in ClassGroupRange, and also uesd for inputting ranges in
3813 the classifer table and elsewhere.
3814
3815 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
3816 yet.
3817
3818 2003-05-09 Frank Koormann <[email protected]>
3819
3820 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
3821
3822 2003-05-08 Frank Koormann <[email protected]>
3823
3824 Coding style updates
3825
3826 * test/test_scalebar.py: Replaced tab indentation by spaces.
3827
3828 * Thuban/UI/scalebar.py: Explicit imports.
3829
3830 2003-05-08 Frank Koormann <[email protected]>
3831
3832 * Thuban/UI/scalebar.py
3833 (ScaleBar.DrawScalebar): Format string bug fixed.
3834
3835 2003-05-08 Frank Koormann <[email protected]>
3836
3837 Reorganization of scalebar component (no wx in Thuban/Model)
3838
3839 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
3840 (deriveInterval):
3841 Calculate scalebar interval and unit which fits in width for scale.
3842 (roundInterval): Round float.
3843
3844 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
3845
3846 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
3847
3848 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
3849
3850 2003-05-08 Frank Koormann <[email protected]>
3851
3852 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
3853 Initialize ScaleBar with canvas.map
3854
3855 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
3856 round intervals to display smarter lengths
3857 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
3858 layer. If the maps has no projection applied grey the scalebar.
3859
3860 2003-05-07 Frank Koormann <[email protected]>
3861
3862 Basic Scalebar features added.
3863
3864 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
3865
3866 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
3867 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
3868 and the renderer.
3869
3870 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
3871
3872 * Thuban/UI/messages.py: SCALE_CHANGED added.
3873
3874 2003-05-07 Bernhard Herzog <[email protected]>
3875
3876 * Thuban/Model/session.py (Session.__init__): New instance
3877 variable shapestores to hold a list of all open shapestore objects
3878 (Session.ShapeStores): New. Accessor method for the shapestores
3879 list.
3880 (Session._add_shapestore, Session._clean_weak_store_refs): New.
3881 Internal methods to maintain the shapestores list.
3882 (Session.Tables): New. Return all tables open in the session.
3883 (Session.OpenShapefile): Insert the new ShapeStore into the
3884 shapestores list.
3885
3886 * test/test_session.py (TestSessionSimple.test_initial_state): Add
3887 tests for ShapeStores and Tables
3888 (TestSessionWithContent.test_shape_stores)
3889 (TestSessionWithContent.test_tables): New. Test cases for
3890 ShapeStores and Tables
3891
3892 2003-05-07 Bernhard Herzog <[email protected]>
3893
3894 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
3895 Add comments about the optimizations used.
3896 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
3897 Implement the ReadValue table interface method.
3898
3899 * test/test_transientdb.py
3900 (TestTransientTable.run_iceland_political_tests)
3901 (TestTransientTable.test_transient_joined_table): Add tests for
3902 ReadValue
3903
3904 2003-05-07 Frank Koormann <[email protected]>
3905
3906 * Resources/Bitmaps/fulllayerextent.xpm,
3907 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
3908 new icons.
3909
3910 2003-05-06 Bernhard Herzog <[email protected]>
3911
3912 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
3913 New. Simply delegate to the transient table's version.
3914
3915 * test/test_transientdb.py
3916 (TestTransientTable.test_auto_transient_table_query): New. Test
3917 case for AutoTransientTable's SimpleQuery
3918
3919 2003-05-06 Bernhard Herzog <[email protected]>
3920
3921 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
3922 Implement a simple query method for the query dialog
3923 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
3924 the row index or shapeid.
3925 (TransientTable.create): Insert the right value of the row index
3926 (TransientJoinedTable.create): Copy the row index of the left
3927 table to the joined result table
3928
3929 * test/test_transientdb.py
3930 (TestTransientTable.test_transient_table_read_twice): Fix
3931 doc-string
3932 (TestTransientTable.test_transient_table_query): New. Test for the
3933 SimpleQuery method
3934
3935 2003-05-06 Bernhard Herzog <[email protected]>
3936
3937 Convert all table users to use the new table interface. This only
3938 covers Thuban itself, not GREAT-ER or other applications built on
3939 Thuban yet, so the compatibility interface stays in place for the
3940 time being but it now issues DeprecationWarnings.
3941
3942 Finally, the new Table interface has a new method, HasColumn.
3943
3944 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
3945 issue deprecation warnings when they're. The warnings refer to the
3946 caller of the method.
3947 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
3948 for the deprecation warnings
3949
3950 * test/test_table.py: Ignore the deprecation warnings for the old
3951 table in the tests in this module. The purpose of the tests is to
3952 test the old interface, after all.
3953
3954 * test/test_transientdb.py
3955 (TestTransientTable.run_iceland_political_tests): Use the
3956 constants for the types. Add a test for HasColumn
3957 (TestTransientTable.test_transient_joined_table): Adapt to new
3958 table interface. Add a test for HasColumn
3959 (TestTransientTable.test_transient_table_read_twice): Adapt to new
3960 table interface
3961
3962 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
3963 Adapt to new table interface
3964
3965 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
3966 new table interface
3967
3968 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
3969 (RecordTable.SetTable): Adapt to new table interface
3970
3971 * Thuban/UI/classifier.py (Classifier.__init__)
3972 (Classifier.__init__): Adapt to new table interface
3973
3974 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
3975 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
3976 to new table interface
3977
3978 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
3979 (AutoTransientTable.HasColumn): Implement the new table interface
3980 method
3981 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
3982 (AutoTransientTable.UniqueValues): Adapt to new table interface
3983
3984 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
3985 Adapt to new table interface
3986
3987 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
3988 simplify opening shapefiles a bit easier.
3989 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3990 (TestLayer.test_point_layer): Use the new helper method
3991 (TestLayer.test_get_field_type): New. Test for the GetFieldType
3992 method
3993
3994 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
3995 the new table method
3996
3997 * test/test_memory_table.py (TestMemoryTable.test_has_column):
3998 Test for the new table method HasColumn
3999
4000 2003-05-06 Jonathan Coles <[email protected]>
4001
4002 Addresses the "Selection Extent" wish of RTbug #1787.
4003
4004 * Resources/Bitmaps/fulllayerextent.xpm,
4005 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
4006 extent. These are just place holders for the real bitmaps.
4007
4008 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
4009 calculate the bounding box once (the first time compute_bbox() is
4010 called).
4011 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
4012 the bounding box for the shapes in lat/long coordinates.
4013
4014 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
4015 option.
4016 (MainWindow.has_selected_shapes): New. Returns true if there are
4017 any selected shapes.
4018 (MainWindow.FullSelectionExtent): New. Calls
4019 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
4020 (_has_selected_shapes): New. Returns true if there are any
4021 selected shapes.
4022
4023 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
4024 true if there are any selected shapes.
4025
4026 * Thuban/UI/view.py (MapCanvas): Added delegated method
4027 HasSelectedShapes.
4028 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
4029 shapes on the canvas using the map projection (if any).
4030
4031 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
4032 for Layer.ShapesBoundingBox().
4033
4034 2003-05-06 Bernhard Herzog <[email protected]>
4035
4036 * Resources/Projections/defaults.proj: Fix spelling of Mercator
4037
4038 2003-05-05 Jonathan Coles <[email protected]>
4039
4040 Addresses the "Full Layer Extent" wish of RTbug #1787.
4041
4042 * Resources/Projections/defaults.proj: Added UK National Grid.
4043
4044 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
4045 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
4046 when the user selects the menu option.
4047
4048 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
4049 scales the given layer on the canvas using the map projection.
4050
4051 2003-05-05 Bernhard Herzog <[email protected]>
4052
4053 Convert the table implementations to a new table interface. All
4054 tables use a common mixin class to provide backwards compatibility
4055 until all table users have been updated.
4056
4057 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
4058 provide backwards compatibility for table classes implementing the
4059 new interface
4060 (DBFTable, MemoryTable): Implement the new table interface. Use
4061 OldTableInterfaceMixin as base for compatibility
4062 (DBFColumn, MemoryColumn): New. Column description for DBFTable
4063 and MemoryTable resp.
4064
4065 * test/test_dbf_table.py: New. Test cases for the DBFTable with
4066 the new table interface.
4067
4068 * test/test_memory_table.py: New. Test cases for the MemoryTable
4069 with the new table interface.
4070
4071 * test/test_table.py: Document the all tests in this file as only
4072 for backwards compatibility. The equivalent tests for the new
4073 interface are in test_memory_table.py and test_dbf_table.py
4074 (MemoryTableTest.test_read): field_info should be returning tuples
4075 with four items
4076 (MemoryTableTest.test_write): Make doc-string a more precise.
4077
4078 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
4079 table interface. Derive from from OldTableInterfaceMixin for
4080 compatibility.
4081 (TransientTableBase.create): New intance variable column_map to
4082 map from names and indices to column objects
4083 (TransientTable.create): Use the new table interface of the input
4084 table
4085 (AutoTransientTable): Convert to new table interface. Derive from
4086 from OldTableInterfaceMixin for compatibility.
4087 (AutoTransientTable.write_record): Removed. It's not implemented
4088 yet and we still have to decide how to handle writing with the new
4089 table and data framework.
4090
4091 * test/test_transientdb.py
4092 (TestTransientTable.run_iceland_political_tests)
4093 (TestTransientTable.test_transient_joined_table): Use the new
4094 table interface
4095
4096 2003-05-05 Jonathan Coles <[email protected]>
4097
4098 This is namely a collection of UI updates to improve user interactivity.
4099 Tabbing between controls now exists and you can use ESC to close dialog
4100 boxes; ENTER will active the default button.
4101
4102 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
4103 order that the controls are created so that tabbing works correctly.
4104 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
4105 wxDialog can handle the default button correctly.
4106 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
4107 same reasons as for OnOK.
4108 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
4109 when we ask the table for the maximum/minimum values of a field
4110 which could take a very long time.
4111
4112 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
4113 order that the controls are created so that tabbing works correctly.
4114 (SelectPropertiesDialog.__init__): Rearrange the order that the
4115 controls are created so that tabbing works correctly.
4116
4117 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
4118 to derive from a wxDialog but behave like the original implementation
4119 which was derived from a wxFrame. wxDialog provides useful key
4120 handling functionality like ESC calling OnCancel and ENTER calling
4121 OnOK which is lost with wxFrame.
4122
4123 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
4124 new dialogs.
4125
4126 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
4127 order that the controls are created so that tabbing works correctly.
4128 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
4129 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
4130 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
4131 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
4132 can provide the "UK National Grid" as a default projection.
4133 (UTMPanel.__init__): Rearrange the order that the controls are
4134 created so that tabbing works correctly.
4135
4136 2003-05-05 Bernhard Herzog <[email protected]>
4137
4138 * extensions/thuban/wxproj.cpp: Fix some of the comments.
4139 (project_point): If a map projection but no layer projection is
4140 given, convert degrees to radians before applying the map
4141 projection.
4142
4143 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
4144 (TableGrid.allow_messages): New methods to make it possible to
4145 inhibit message sending.
4146 (TableGrid.issue): Only send the message if not inhibited.
4147 (LayerTableGrid.select_shape): Use the new methods to make sure
4148 that no ROW_SELECTED message is sent while we're updating the
4149 selected rows to match the selected shapes.
4150
4151 2003-05-02 Jan-Oliver Wagner <[email protected]>
4152
4153 Implementation of MemoryTable.
4154
4155 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
4156 implementation that operates on a list of tuples. All of the data
4157 are kept in the memory.
4158
4159 * test/test_table.py (MemoryTableTest): New.
4160
4161 * test/test_transientdb.py (SimpleTable): Removed.
4162 (TestTransientTable.test_transient_joined_table,
4163 (TestTransientTable.test_transient_table_read_twice): Replaced
4164 SimpleTable by MemoryTable.
4165
4166 2003-04-30 Jonathan Coles <[email protected]>
4167
4168 * Data/iceland_sample.thuban: Now contains correct projections
4169 for each of the layers.
4170
4171 * Resources/Projections/defaults.proj: Geographic projection
4172 contains unit conversion parameter.
4173
4174 2003-04-30 Jonathan Coles <[email protected]>
4175
4176 The most important part of this putback is the projection changes.
4177 It should now be possible to specify the projection that a layer
4178 is in and then specify a different projection for the map. The
4179 projection dialog has an extra parameter for a geographic projection
4180 which lets the user select if the input is in degrees or radians.
4181
4182 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
4183 to say that the parameter is a tuple of unprojected
4184 points (which is what the callers to this method were assuming).
4185 Also, since the points are unprojected we need to projected them.
4186
4187 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
4188 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
4189 groups are selected, move the layer up/down. Fixes RTbug #1833.
4190
4191 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
4192
4193 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
4194 parameter in call to SetClientData.
4195 (GeoPanel): Add support for selecting the units that the
4196 source data is in (Radians or Degrees).
4197
4198 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
4199 the rendering loop by reducing the number of if's, removing the
4200 unnecessary try/except block, and checking if the old group
4201 is the same as the new one (which happens a lot if there is
4202 no classification, or lots of shapes are in the same group).
4203
4204 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
4205 around the redraw routine to try to catch problems that the user
4206 may create by selecting invalid projections for the data set and
4207 map. Clears the display if there are any problems and prints the
4208 error.
4209 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
4210 rectangle.
4211
4212 * extensions/thuban/wxproj.cpp (project_point): First invert the
4213 supplied point (which should be in projected coordinates) using
4214 the layer's projection and then project the point using the
4215 map's projection.
4216 (project_points): Use project_point() to project each point.
4217
4218 2003-04-30 Jan-Oliver Wagner <[email protected]>
4219
4220 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
4221 don't set the Classification to None if the classfication field
4222 is None (ie only a DEFAULT).
4223
4224 2003-04-30 Bernhard Herzog <[email protected]>
4225
4226 * Thuban/UI/view.py: Fix some typos.
4227
4228 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
4229 not pop up the dialog if the selection becomes empty (this could
4230 happen if e.g. a new selection is opened while the identify tool
4231 is active and dialog had been closed)
4232
4233 2003-04-30 Bernhard Herzog <[email protected]>
4234
4235 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
4236 instance variable read_record_last_result
4237 (TransientTableBase.read_record): Make sure reading the same
4238 record twice works. The implementation uses the new instance
4239 variable read_record_last_result
4240
4241 * test/test_transientdb.py
4242 (TestTransientTable.test_transient_table_read_twice): New test
4243 case for the above bug-fix.
4244
4245 2003-04-29 Jonathan Coles <[email protected]>
4246
4247 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
4248
4249 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
4250
4251 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
4252 (ClassTable.SetValueAsCustom): Rename keyword argument in
4253 ClassGroup* constructors to match argument name.
4254
4255 2003-04-29 Bernhard Herzog <[email protected]>
4256
4257 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
4258 transient DB if it exists to make sure it doesn't leave a journal
4259 file in the temp directory.
4260
4261 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
4262 self.conn to None after closing the connection to make sure it's
4263 not closed twice
4264
4265 2003-04-29 Jonathan Coles <[email protected]>
4266
4267 Add a visible parameter in the layer XML tag. The default value is
4268 "true". If anything other than "false" is specified we also assume
4269 "true". Addresses RTbug #1025.
4270
4271 * Doc/thuban.dtd: Add visible parameter to a layer.
4272
4273 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
4274 of visible from 1 to True.
4275 (Layer.__init__): Change default value of visible from 1 to True.
4276
4277 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
4278 parameter.
4279
4280 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
4281 parameter.
4282
4283 * test/test_load.py: Add new test data contents_test_visible.
4284 (LoadSessionTest.setUp): save test data.
4285 (LoadSessionTest.testLayerVisibility): Test if the visible flag
4286 is loaded correctly.
4287
4288 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
4289 for saving an invisible layer.
4290
4291 2003-04-29 Jonathan Coles <[email protected]>
4292
4293 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
4294 legend dialog box and tell it to change its map to the one
4295 supplied to SetMap(). Fixes RTbug #1770.
4296
4297 2003-04-29 Bernhard Herzog <[email protected]>
4298
4299 Next step of table implementation. Introduce a transient database
4300 using SQLite that some of the data is copied to on demand. This
4301 allows us to do joins and other operations that require an index
4302 for good performance with reasonable efficiency. Thuban now needs
4303 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
4304 haven't tested that.
4305
4306 * Thuban/Model/transientdb.py: New. Transient database
4307 implementation.
4308
4309 * test/test_transientdb.py: New. Tests for the transient DB
4310 classes.
4311
4312 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
4313 classes to help automatically remove temporary files and
4314 directories.
4315 (Session.__init__): New instance variables temp_dir for the
4316 temporary directory and transient_db for the SQLite database
4317 (Session.temp_directory): New. Create a temporary directory if not
4318 yet done and return its name. Use AutoRemoveDir to have it
4319 automatically deleted
4320 (Session.TransientDB): Instantiate the transient database if not
4321 done yet and return it.
4322
4323 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
4324 AutoTransientTable so that data is copied to the transient DB on
4325 demand.
4326 (SimpleStore): New class that simply combines a table and a
4327 shapefile
4328
4329 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
4330 DBFTable and update its doc-string to reflect the fact that this
4331 is only the table interface to a DBF file. Table is now an alias
4332 for DBFTable for temporary backwards compatibility.
4333
4334 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
4335 the last reference to the session goes away so that the temporary
4336 files are removed properly.
4337
4338 * test/test_load.py (LoadSessionTest.tearDown): Remove the
4339 reference to the session to make sure the temporary files are
4340 removed.
4341
4342 2003-04-29 Bernhard Herzog <[email protected]>
4343
4344 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
4345 the __parser instance variable into a normal local variable in
4346 read. It's only used there and read will never be called more than
4347 once. Plus it introduces a reference cycle that keeps can keep the
4348 session object alive for a long time.
4349
4350 2003-04-29 Jonathan Coles <[email protected]>
4351
4352 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
4353 Projection an immutable item. Fixes RTbug #1825.
4354 (Projection.__init__): Initialize instance variables here.
4355 (ProjFile.Replace): New. Replace the given projection object with
4356 the new projection object. This solves the problem of needing the
4357 mutator Projection.SetProjection() in the ProjFrame class and
4358 allows a projection to change parameters without changing its
4359 location in the file.
4360
4361 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
4362 be of type wxSAVE and should verify overwriting a file.
4363
4364 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
4365 ProjFile.Replace() method instead of the mutator
4366 Projection.SetProjection(). Also requires that we reassign the
4367 client data to the new projection.
4368
4369 * test/test_proj.py (TestProjection.test): Test GetName() and
4370 GetAllParameters()
4371 (TestProjFile.test): Remove tests for Set*() methods. Add tests
4372 for Replace().
4373
4374 2003-04-25 Jonathan Coles <[email protected]>
4375
4376 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
4377 to save the name of the projection.
4378
4379 * test/test_save.py (SaveSessionTest.testLayerProjection): New
4380 test to verify layer projections are saved correctly.
4381
4382 2003-04-25 Jonathan Coles <[email protected]>
4383
4384 * Thuban/Model/proj.py (Projection.SetName): Set the name
4385 to "Unknown" if name is None.
4386 (Projection.SetAllParameters): New. Set the projection's
4387 parameter list to the one supplied.
4388 (Projection.SetProjection): New. Set the projection's
4389 properties to those of the supplied Projection.
4390
4391 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
4392 the dialog title to include the map's title.
4393 (MainWindow.LayerProjection): Set the dialog title to include
4394 the layer's title.
4395
4396 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
4397 error dialogs into a single method call.
4398 (ProjFrame.__VerifyButtons): Add more states to check.
4399 (ProjFrame.__GetProjection): Return the current state of an
4400 edited projection or None.
4401 (ProjFrame.__FillAvailList): Remove checks for states that
4402 shouldn't exist.
4403 (ProjFrame._OnNew): Clear all selected items and supply
4404 a projection panel if necessary.
4405
4406 * test/test_proj.py (TestProjFile.test): Add tests for
4407 ProjFile.SetAllParameters, ProjFile.SetProjection,
4408 ProjFile.SetName.
4409
4410 2003-04-25 Jonathan Coles <[email protected]>
4411
4412 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
4413 takes an optional argument to select the current projection.
4414 This does not guarantee that the item is visible due to
4415 limited wxWindows functionality. Fixes RTBug #1821.
4416
4417 2003-04-25 Jonathan Coles <[email protected]>
4418
4419 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
4420 the projection name and use it when constructing the Projection
4421 object.
4422
4423 * Thuban/Model/proj.py (Projection.__init__): Change the default
4424 value for 'name' to None and then test if name is equal to None
4425 in the body of the constructor. This way the caller doesn't have to
4426 know what the default value should be. Namely, useful in load.py
4427 where we have to pick a default value if the 'name' parameter
4428 doesn't exist in the XML file.
4429
4430 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
4431 Tests a file where a layer has a projection.
4432
4433 2003-04-25 Jonathan Coles <[email protected]>
4434
4435 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
4436 tree for projection information.
4437
4438 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
4439 XMLReader.GetFileName.
4440 (SessionLoader): Added support for loading projection tags that
4441 appear inside a layer.
4442
4443 * Thuban/Model/proj.py (ProjFile): Document the class. Move
4444 back to using a list because the order of the projections in
4445 the file is important to maintain. Fixes RTbug #1817.
4446
4447 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
4448 to ProjFile.GetFilename.
4449
4450 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
4451 information.
4452
4453 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
4454 ProjFrame._OnSaveAs. Removed old dead code from previous
4455 implementation.
4456 (ProjFrame._OnExport): Add support for exporting more than one
4457 projection to a single file.
4458 (ProjFrame.__FillAvailList): use string formatting (% operator)
4459 to build strings that are (partly) translated. Fixes RTbug #1818.
4460
4461 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
4462 class.
4463
4464 2003-04-24 Bernhard Herzog <[email protected]>
4465
4466 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
4467
4468 * po/fr.po: New. French translation by Daniel Calvelo Aros
4469
4470 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
4471 empty strings.
4472
4473 2003-04-24 Jonathan Coles <[email protected]>
4474
4475 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
4476 implement the interface that the ProjFrame dialog expects.
4477
4478 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
4479 name of the projection to be changed.
4480 (ProjFile): Use a dictionary instead of a list so that removing
4481 projections is easier and we are sure about uniqueness.
4482 (ProjFile.Remove): Remove the given projection object.
4483
4484 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
4485 Return a list with only one projection file instead of searching for
4486 any projection file. This simplifies many things if the user can
4487 only have one system file and one user file.
4488
4489 * Thuban/UI/classgen.py: Change all references to
4490 genCombo to genChoice.
4491
4492 * Thuban/UI/mainwindow.py: Add a Projection option under the
4493 layer menu.
4494 (MainWindow.LayerProjection): New. Open up a projection window
4495 for a layer.
4496
4497 * Thuban/UI/projdialog.py: Large changes to how the dialog is
4498 laid out. Use three panels instead of one. One for the list of
4499 projections, one for the edit controls, and one for the buttons.
4500 Fixed resizing problems so that the dialog resizes correctly
4501 when the projection panel changes. Added import/export, save, and
4502 new buttons/functionality.
4503
4504 2003-04-24 Bernhard Herzog <[email protected]>
4505
4506 First step towards table management. Introduce a simple data
4507 abstraction so that we replace the data a layer uses more easily
4508 in the next step.
4509
4510 * Thuban/Model/data.py: New file with a simple data abstraction
4511 that bundles shapefile and dbffile into one object.
4512
4513 * Thuban/Model/session.py (Session.OpenShapefile): New method to
4514 open shapefiles and return a shape store object
4515
4516 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
4517 object instead of a shapefile filename. This introduces a new
4518 instance variable store holding the datastore. For intermediate
4519 backwards compatibility keep the old instance variables.
4520 (open_shapefile): Removed. No longer needed with the shape store.
4521 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
4522 get the shape store used by a layer.
4523 (Layer.Destroy): No need to explicitly destroy the shapefile or
4524 table anymore.
4525
4526 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
4527 (MainWindow.AddLayer): Use the session's OpenShapefile method to
4528 open shapefiles
4529
4530 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
4531 session's OpenShapefile method to open shapefiles
4532
4533 * test/test_classification.py
4534 (TestClassification.test_classification): Use the session's
4535 OpenShapefile method to open shapefiles and build the filename in
4536 a more platform independed way
4537
4538 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
4539 Implement to have a session to use in the tests
4540 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
4541 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
4542 session's OpenShapefile method to open shapefiles
4543 (TestLayerLegend.setUp): Instantiate a session so that we can use
4544 it to open shapefiles.
4545 (TestLayerLegend.tearDown): Make sure that all references to
4546 layers and session are removed otherwise we may get a resource
4547 leak
4548
4549 * test/test_map.py (TestMapAddLayer.test_add_layer)
4550 (TestMapWithContents.setUp): Instantiate a session so that we can
4551 use it to open shapefiles.
4552 (TestMapWithContents.tearDown): Make sure that all references to
4553 layers, maps and sessions are removed otherwise we may get a
4554 resource leak
4555 ("__main__"): use support.run_tests() so that more info about
4556 uncollected garbage is printed
4557
4558 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
4559 session's OpenShapefile method to open shapefiles
4560 ("__main__"): use support.run_tests() so that more info about
4561 uncollected garbage is printed
4562
4563 * test/test_selection.py (TestSelection.tearDown): Make sure that
4564 all references to the session and the selection are removed
4565 otherwise we may get a resource leak
4566 (TestSelection.get_layer): Instantiate a session so that we can
4567 use it to open shapefiles.
4568 ("__main__"): use support.run_tests() so that more info about
4569 uncollected garbage is printed
4570
4571 * test/test_session.py (TestSessionBase.tearDown)
4572 (TestSessionWithContent.tearDown): Make sure that all references
4573 to the session and layers are removed otherwise we may get a
4574 resource leak
4575 (TestSessionWithContent.setUp): Use the session's OpenShapefile
4576 method to open shapefiles
4577
4578 2003-04-24 Jonathan Coles <[email protected]>
4579
4580 * Thuban/Model/load.py (XMLReader.read): Should have been checking
4581 if the file_or_filename object had the 'read' attribute.
4582
4583 2003-04-23 Jonathan Coles <[email protected]>
4584
4585 * Thuban/Model/resource.py: Fixes RTbug #1813.
4586 (ReadProjFile): Add documentation about which exceptions are raised.
4587 Always pass the exceptions up to the caller.
4588 (GetProjFiles): If the directory can't be read return an empty list.
4589 If any of the proj files can't be read skip that file and go
4590 on to the next one.
4591
4592 * test/test_proj.py: Added test cases to handle nonexistent files,
4593 unreadable files, and files that don't parse correctly.
4594
4595 2003-04-23 Jonathan Coles <[email protected]>
4596
4597 Projection dialog. Allows the user to select from a list
4598 of projection templates and optionally edit them and save new ones.
4599
4600 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
4601 (ProjPanel): Base class for projection specific panels.
4602 (TMPanel): Projection panel for Transverse Mercartor.
4603 (UTMPanel): Projection panel for Universal Transverse Mercartor.
4604 (LCCPanel): Projection panel for Lambert Conic Conformal.
4605 (GeoPanel): Projetion panel for Geographic Projection.
4606
4607 2003-04-23 Jonathan Coles <[email protected]>
4608
4609 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
4610 promote symmetry. There now exists XMLReader and XMLWriter.
4611 (XMLReader.read): New. Call to read the given file descriptor or
4612 filename.
4613 (XMLReader.close): New. Make sure the file is closed.
4614 (XMLReader.GetFileName): New. Return just the file name that is being
4615 read from.
4616 (XMLReader.GetDirectory): New. Return just the directory of the file
4617 that is being read.
4618 (XMLReader.AddDispatchers): New. Take a dictionary which contains
4619 the names of functions to call as the XML tree is parsed.
4620 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
4621 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
4622 (SessionLoader): Removed class variables start_dispatcher and
4623 end_dispatcher since this functionality is now part of a class
4624 instance. Fixes RTbug #1808.
4625 (SessionLoader.__init__): Add dispatcher functions.
4626 (load_xmlfile): Code was moved into the XMLReader.read().
4627 (load_session): Use modified SessionLoader.
4628
4629 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
4630 map's projection.
4631
4632 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
4633 GetAllParameters.
4634 (Projection.GetParameter): Returns the value for the given parameter.
4635
4636 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
4637 (GetProjFiles): Renamed from GetProjections. Now returns a list
4638 of ProjFile objects.
4639 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
4640 a list of ProjFile objects whose files are not user defined.
4641 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
4642 list of ProjFile objects whose files are user defined.
4643 (ProjFileReader): Extend new XMLReader.
4644
4645 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
4646 promote symmetry.
4647
4648 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
4649 control instead of a wxComboBox. wxChoice controls do not generate
4650 events as the uses highlights possible choices which fixes problems
4651 with resizing the dialog when the use selects an option.
4652
4653 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
4654 control instead of a wxComboBox.
4655
4656 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
4657 dialog.
4658
4659 * test/test_proj.py (TestProjection.test): New tests for GetParameter
4660 method.
4661
4662 2003-04-22 Bernhard Herzog <[email protected]>
4663
4664 * Thuban/UI/mainwindow.py: Remove some unused imports and global
4665 constants
4666
4667 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
4668 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
4669
4670 2003-04-17 Bernhard Herzog <[email protected]>
4671
4672 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
4673 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
4674 anymore.
4675 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
4676 (Layer.ShapeType, Layer.Shape): No need to call
4677 self.open_shapefile since it's always called in __init__
4678
4679 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
4680 In wxPython 2.4 there's no need to extend MainLoop anymore since
4681 wxPython itself makes sure OnExit is called.
4682
4683 2003-04-16 Jonathan Coles <[email protected]>
4684
4685 Initial putback of projection management code. Includes new
4686 classes to read and write projection files. The current load
4687 and save classes were abstracted a bit so they could be reused.
4688 The Projection class was extended to provide new methods and
4689 have a name.
4690
4691 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
4692 general XML reading methods that were part of ProcessSession.
4693
4694 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
4695 name.
4696 (ProjFile): New. Represents a file that contains projection
4697 information.
4698
4699 * Thuban/Model/resource.py: New. Contains general utilities
4700 for read and writing projection files.
4701
4702 * Thuban/Model/save.py (XMLSaver): New. Contains all the
4703 general XML writing methods that were part of SessionSaver.
4704 (SessionSaver): Renamed from Saver.
4705
4706 * test/test_proj.py: New test cases for the projection
4707 file read and write functions.
4708
4709 2003-04-16 Jonathan Coles <[email protected]>
4710
4711 * Thuban/Model/classification.py: Use repr() around values
4712 in the ClassGroup*.__repr__() methods so it is clearer when
4713 a value is a string and when it is a number.
4714
4715 * test/test_load.py: Rework the classification test to test
4716 that we can load old files.
4717 (testLabels): Test a file where the groups have labels.
4718
4719 2003-04-16 Bernhard Herzog <[email protected]>
4720
4721 Safer implementation of the performance enhancements of the
4722 low-level renderer:
4723
4724 * extensions/thuban/wxproj.cpp (extract_projection)
4725 (extract_pointer): Rename extract_projection to extract_pointer
4726 and redefine its purpose to return the pointer stored in a CObject
4727 returned by the object's cobject method. Update all callers.
4728 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
4729 handling of these low-level parameters so that each s_draw_info
4730 instance is handled as a CObject at python level that also
4731 contains real references to the actual python objects which
4732 contain the values in the struct. Add free_draw_info as the
4733 destructor.
4734 (draw_polygon_shape): Add the py_draw_info parameter which must a
4735 cobject containing an s_draw_info pointer.
4736
4737 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
4738 method to instantiat the low-level render parameter
4739 (MapRenderer.draw_shape_layer): Use the new method. Remove some
4740 commented out code.
4741 (MapRenderer.draw_polygon_shape): Make the first parameter not the
4742 layer but the low-level render parameter
4743 (ScreenRenderer.draw_shape_layer): Use the low-level render
4744 parameter.
4745
4746 2003-04-15 Jonathan Coles <[email protected]>
4747
4748 * Thuban/Model/classification.py: Implemented __repr__ for
4749 the ClassGroup* classes to make debugging a bit easier.
4750 (ClassGroup.SetLabel): Check that the string is an instance
4751 of StringTypes not StringType. Accounts for Unicode strings.
4752
4753 * Thuban/Model/color.py: Implemented __repr__ to make
4754 debugging a bit easier.
4755
4756 * Thuban/Model/save.py (Saver.write_classification): Need to
4757 save the group label.
4758
4759 * test/test_load.py (testClassification): New. Loads the
4760 iceland_sample_test.thuban file and checks if it was loaded
4761 correctly.
4762
4763 2003-04-15 Jonathan Coles <[email protected]>
4764
4765 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
4766 to improve rendering performance by initializing the variables
4767 that are not change each time draw_polygon_shape() is called.
4768 The values are stored in a global struct draw_info.
4769 (draw_polygon_shape): Removed initialization code that is
4770 now in draw_polygon_init().
4771
4772 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
4773 drawing initialization call to draw_polygon_init()
4774 (MapRenderer.draw_polygon_shape): Use new signature of
4775 draw_polygon_shape.
4776
4777 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
4778 weirdness by setting the range to (1, maxint).
4779
4780 * Thuban/Model/classification.py (ClassGroupProperties): Make
4781 instance variables private and optimize comparison operator
4782 by first checking if the color references are the same.
4783 (ClassGroupSingleton): Make instance variables private.
4784 (ClassGroupRange): Make instance variables private.
4785
4786 * HOWTO-Release: Filled in missing steps for releasing packages.
4787
4788 2003-04-15 Bernhard Herzog <[email protected]>
4789
4790 First stab at internationalized messages:
4791
4792 * Thuban/__init__.py (_): Implement the translation function for
4793 real using the python gettext module.
4794
4795 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
4796 translate empty strings.
4797
4798 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
4799 Add a missing space to a warning message
4800
4801 * po/README: New. Notes about the management of the translation
4802 files.
4803
4804 * po/Makefile: New. Makefile to help manage the translation files.
4805
4806 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
4807
4808 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
4809 translations and support files in po/
4810
4811 * setup.py (data_files): Add the *.mo files to the data_files too
4812
4813 * README: Add note about the translations when building from CVS
4814
4815 2003-04-14 Jonathan Coles <[email protected]>
4816
4817 * Thuban/UI/dock.py: Fixes some window resizing problems most
4818 noticable under windows. Always assume the button bitmaps will
4819 be there. Code clean up.
4820 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
4821 images for the dock/undock button to the same images.
4822 Work around for RTbug #1801.
4823
4824 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
4825 be allowed to grow within the sizer. Fixes a bug under Windows
4826 where the toolbar wasn't being drawn.
4827
4828 2003-04-14 Frank Koormann <[email protected]>
4829
4830 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
4831 Updated design to try to make the button functionality more
4832 transparent.
4833
4834 2003-04-14 Jonathan Coles <[email protected]>
4835
4836 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
4837 finalize the intialization of the panel.
4838
4839 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
4840 creation of the panel. Should be the last thing called in the
4841 initializer of a subclass.
4842
4843 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
4844 set the current selections in the combo boxes. This is needed
4845 under Windows.
4846
4847 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
4848 level panel to the dialog so that the background colors are
4849 consistent under Windows.
4850
4851 2003-04-11 Jonathan Coles <[email protected]>
4852
4853 * Thuban/UI/classgen.py: Change color ramps to start at white
4854 not black.
4855
4856 * Thuban/UI/legend.py: Enable/disable the legend buttons when
4857 the legend changes. Fixes RTbug #1793.
4858
4859 * test/test_classification.py: Added test for copying of
4860 classifications.
4861
4862 2003-04-11 Jonathan Coles <[email protected]>
4863
4864 * Thuban/UI/resource.py: New. Centralize the loading of resources
4865 such as bitmaps.
4866
4867 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
4868 added images to the move buttons, added 'reverse' button.
4869 (CustomRampPanel.__init__): Added images to the move buttons.
4870 (GreyRamp): New. Generates a ramp from white to black.
4871 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
4872
4873 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
4874 ID_PROPERTY_*.
4875 (Classifier.__init__): Minor changes to the layout.
4876 (Classifier._OnTitleChanged): Listen for when the user edits the
4877 title and update the dialog's title and the layer's title.
4878
4879 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
4880
4881 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
4882 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
4883 if the layer's title changes.
4884
4885 * Thuban/UI/mainwindow.py: Added new menu item and associated code
4886 to open a dialog to rename the map.
4887 (MainWindow): Use new resource class to import bitmaps.
4888
4889 2003-04-11 Jonathan Coles <[email protected]>
4890
4891 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
4892 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
4893 Resources/Bitmaps/group_use_none.xpm,
4894 Resources/Bitmaps/group_use_not.xpm,
4895 Resources/Bitmaps/hide_layer.xpm,
4896 Resources/Bitmaps/layer_properties.xpm,
4897 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
4898 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
4899 New.
4900
4901 2003-04-10 Jonathan Coles <[email protected]>
4902
4903 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
4904 Should pass group to ClassGroup constructor.
4905
4906 2003-04-10 Jonathan Coles <[email protected]>
4907
4908 * Thuban/Model/classification.py: (ClassGroup): Move all the common
4909 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
4910 here. Implement SetVisible(), IsVisible().
4911 (ClassGroup.__init__): Add group parameter which acts as a copy
4912 constructor.
4913
4914 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
4915 "Visible" check boxes.
4916 (Classifier): Rename the buttons and refactor the code to match
4917 the new labels.
4918
4919 * Thuban/UI/legend.py: Classify button is now called "Properties".
4920 Refactored the code to change variable names.
4921 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
4922
4923 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
4924 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
4925 renamed to MainWindow.LayerEditProperties.
4926 (MainWindow.ToggleLegend): Don't include map name in legend title.
4927 (MainWindow.SetMap): Added the map name to the window title.
4928 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
4929 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
4930 Functionality is found in the layer properties dialog.
4931
4932 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4933 draw visible groups.
4934
4935 2003-04-09 Jonathan Coles <[email protected]>
4936
4937 * Thuban/UI/classgen.py: Modifications to allow simple
4938 addition and selection of new color schemes.
4939 (MonochromaticRamp): New. Generates a ramp between two colors.
4940 (RedRamp): New. Generates a ramp of all red.
4941 (GreenRamp): New. Generates a ramp of all green.
4942 (BlueRamp): New. Generates a ramp of all blue.
4943
4944 2003-04-09 Jonathan Coles <[email protected]>
4945
4946 * Thuban/Model/classification.py (Classification.__deepcopy__):
4947 Need to copy over field and fieldType attributes.
4948
4949 * Thuban/Model/table.py (Table.field_range): New. Retrive the
4950 maximum and minimum values over the entire table for a given
4951 field.
4952 (Table.GetUniqueValues): New. Retrieve all the unique values
4953 in the table for a given field.
4954
4955 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
4956 (GenUniquePanel): New. Controls to allow the user to select
4957 which unique field values they would like in the classification.
4958 (CustomRampPanel): Code that was in ClassGenDialog that allows
4959 the user to select the properties for a custom ramp.
4960 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
4961
4962 * Thuban/UI/classifier.py: Removed a lot of debugging code.
4963 (Classifier._SetClassification): Callback method so that the
4964 class generator can set the classification in the grid.
4965 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
4966 editing of a group properties class into a wxWindows control.
4967
4968 * Thuban/UI/dock.py: It was decided that if the user closes
4969 a dockable window the window should simply hide itself. That
4970 way if the user wants to show the dock again it appears in the
4971 same place as it was when it was closed.
4972 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
4973 (DockableWindow._OnButtonClose): Hide the window instead of
4974 destroying it.
4975 (DockableWindow._OnClose): Hide the window instead of
4976 destroying it.
4977
4978 * Thuban/UI/legend.py (LegendTree): Use a private method to
4979 consistently set the font and style of the text. Fixes RTbug #1786.
4980
4981 * Thuban/UI/mainwindow.py: Import just the Classifier class.
4982
4983 2003-04-07 Bernhard Herzog <[email protected]>
4984
4985 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
4986 to the map module
4987
4988 2003-04-07 Bernhard Herzog <[email protected]>
4989
4990 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
4991 favor of ToggleSessionTree
4992 (MainWindow.ToggleSessionTree): New method to toggle visibility of
4993 the session tree.
4994 (MainWindow.SessionTreeShown): New method to return whether the
4995 session tree is currently shown.
4996 (MainWindow.ToggleLegend): New method to toggle visibility of the
4997 legend
4998 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
4999 LegendShown
5000 (MainWindow.LegendShown): New method to return whether the legend
5001 is currently shown.
5002 (_method_command): Add checked parameter so we can define check
5003 menu items
5004 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
5005 mainwindow methods.
5006 (show_session_tree, show_legend commands): Removed.
5007 (toggle_session_tree, toggle_legend commands): New commands to
5008 toggle the visibility of the dialogs
5009
5010 2003-04-07 Jonathan Coles <[email protected]>
5011
5012 * Thuban/UI/classgen.py: Fix Windows problem.
5013
5014 * Thuban/UI/dock.py: Fix Windows problem.
5015
5016 * Thuban/UI/mainwindow.py: Use False instead of false.
5017 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
5018
5019 2003-04-07 Jonathan Coles <[email protected]>
5020
5021 Since we now say that the order of the groups in a classification
5022 matters, it makes sense to be able to manipulate that order. Most
5023 of the changes to Thuban/Model/classification.py are to that end.
5024
5025 * Thuban/Model/classification.py (Classification.AppendGroup,
5026 Classification.InsertGroup, Classification.ReplaceGroup,
5027 Classification.RemoveGroup, Classification.GetGroup): Do as the
5028 names imply.
5029 (Classification.FindGroup): This was called GetGroup, but GetGroup
5030 takes an index, while FindGroup takes a value.
5031 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
5032 REFERENCE. Currently there is a cyclic reference between the layer
5033 and its classification. If the classification doesn't need to know
5034 its owning layer we can change this, since it may make sense to be
5035 able to use the same classification with different layers.
5036
5037 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
5038
5039 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
5040 not AddGroup()
5041
5042 * Thuban/UI/classifier.py: Now that we can depend on the order in
5043 a Classification and have methods to manipulate that order we don't
5044 need to use our own data structures in the grid. We can simply make
5045 the grid/table access the information they need from a copy of
5046 the classification object.
5047 (Classifier._OnCloseBtn): Event handler for when the user clicks
5048 'Close'. This is needed so if the user applies changes and then
5049 continues to change the table the user has the option of discarding
5050 the most recent changes and keeping what they applied.
5051
5052 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
5053 into the same group.
5054
5055 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
5056 with a really old version of proj, PJ_VERSION won't even be defined.
5057 If it isn't defined then just compile so that the function always
5058 returns Py_False.
5059
5060 * test/test_classification.py: Fix tests to use the renamed methods.
5061 Still need to write tests for the new methods.
5062
5063 2003-04-04 Jonathan Coles <[email protected]>
5064
5065 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
5066 call to SetSelection out of the method and before the call
5067 to __SelectField in __init__. This prevents a recursion of events
5068 when _OnFieldSelect is triggered by the user.
5069
5070 2003-04-04 Jonathan Coles <[email protected]>
5071
5072 * Thuban/Model/classification.py: Rename Color.None to
5073 Color.Transparent.
5074 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
5075 Don't bother copying the color, since Colors are immutable.
5076
5077 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
5078 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
5079 Thuban/UI/renderer.py, Thuban/UI/view.py:
5080 Rename Color.None to Color.Transparent.
5081
5082 * test/test_classification.py, test/test_load.py: Rename Color.None
5083 to Color.Transparent.
5084
5085 2003-04-04 Jonathan Coles <[email protected]>
5086
5087 * Thuban/Model/classification.py: Fix assert calls.
5088 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
5089 Copy the color parameter rather than hold onto a reference.
5090
5091 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
5092 the color object.
5093 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
5094 are sure there exists only one refernce to Color.None in the system.
5095 This allows us to use 'is' rather than the comparision functions.
5096
5097 * Thuban/Model/save.py: Fix assert calls.
5098
5099 * Thuban/UI/classifier.py: Fix assert calls.
5100 (ClassGrid._OnCellDClick): Call up to the classifier to open the
5101 dialog to edit the groups properties.
5102 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
5103 correctly if a cell is resized.
5104 (ClassTable.SetClassification): New. Changes the classification
5105 that is in the table.
5106 (ClassTable.__SetRow): Allow groups to be prepended.
5107 (Classifier): New code for opening the EditProperties and
5108 GenerateRanges dialogs.
5109 (SelectPropertiesDialog.__GetColor): Only set the color in the
5110 color dialog if the current color is not None.
5111
5112 * Thuban/UI/dock.py: Fix assert calls.
5113
5114 * Thuban/UI/legend.py: Fix assert calls.
5115
5116 * Thuban/UI/renderer.py: Fix assert calls.
5117
5118 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
5119 classifications.
5120 (GenRangePanel): Panel specific to range generation.
5121 (GenSingletonPanel): Panel specific to singleton generation.
5122 (ClassGenerator): Class responsible for actually generating
5123 the classification from the data gathered in the dialog box.
5124 (PropertyRamp): Generates properties whose values range from
5125 a starting property to an ending property.
5126
5127 2003-04-03 Bernhard Herzog <[email protected]>
5128
5129 * test/support.py (print_garbage_information): New function that
5130 prints information about still connected messages and memory
5131 leaks.
5132 (run_suite): Removed.
5133 (run_tests): New function for use as a replacement of
5134 unittest.main in the test_* files. This one calls
5135 print_garbage_information at the end.
5136
5137 * test/runtests.py (main): Use support.print_garbage_information
5138
5139 * test/test_layer.py: Use support.run_tests instead of
5140 unittest.main so we get memory leak information
5141 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
5142 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
5143 (TestLayerLegend.test_visibility): Call the layer's Destroy method
5144 to fix a memory leak.
5145
5146 * test/test_classification.py: Use support.run_tests instead of
5147 unittest.main so we get memory leak information
5148 (TestClassification.test_classification): Call the layer's Destroy
5149 method to fix a memory leak.
5150
5151 2003-04-02 Bernhard Herzog <[email protected]>
5152
5153 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5154 Handle the reference counts of the return value and errors in
5155 PyArg_ParseTuple correctly.
5156
5157 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
5158 sure the filename is absolute to avoid problems when saving the
5159 session again
5160
5161 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
5162
5163 2003-04-01 Jonathan Coles <[email protected]>
5164
5165 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
5166 that there actually are points in the returned list of points
5167 before trying to index into the list. The list may be empty if
5168 the shape is a Null Shape.
5169
5170 2003-04-01 Bernhard Herzog <[email protected]>
5171
5172 * test/test_map.py: Don't use from <module> import *
5173
5174 2003-04-01 Jonathan Coles <[email protected]>
5175
5176 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
5177 LAYER_LEGEND_CHANGED
5178
5179 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
5180 self.Destroy() to close the window after yesterday's changes.
5181
5182 * test/test_map.py, test/test_session.py: Fix messages that
5183 are sent from maps and layers.
5184
5185 2003-03-31 Jonathan Coles <[email protected]>
5186
5187 * Thuban/UI/classifier.py: Commented out some debugging statements.
5188 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
5189 RTbug #1769.
5190
5191 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
5192 position (although position doesn't work yet under GTK).
5193 (DockableWindow.Destroy): New. Called when the window must be
5194 closed. Namely needed when the DockFrame closes and must close
5195 its children.
5196 (DockFrame): Listen for EVT_CLOSE and destroy all children.
5197
5198 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
5199 when then window is told to close.
5200 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
5201 comment in source for more info.
5202
5203 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
5204
5205 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
5206 symmetry with other such methods.
5207 (MainWindow.ShowLegend): Show the legend docked by default.
5208
5209 2003-03-28 Jonathan Coles <[email protected]>
5210
5211 * Thuban/UI/classifier.py: Support for highlighting a specific
5212 group within the grid when the classification dialog is opened.
5213 Also contains a lot of debugging printouts which will later
5214 be removed.
5215
5216 * Thuban/UI/dock.py: Complete rework on the dock code so that
5217 that it is fairly removed from the rest of the Thuban application.
5218 It is easy to add new docks which the rest of the program having
5219 to be aware of them.
5220
5221 * Thuban/UI/legend.py: Modifications to support selecting a
5222 specific group in the classification dialog. Changed how layers
5223 are drawn when the layer is visible/invisible.
5224
5225 * Thuban/UI/mainwindow.py: Removed legend specific code and
5226 replaced it with calls to the new dock code.
5227
5228 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
5229 to check if scale > 0. Trying to track down a divide by zero.
5230
5231 2003-03-26 Jonathan Coles <[email protected]>
5232
5233 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
5234 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
5235 now part of DockableWindow.
5236 (LegendPanel.DoOnSelChanged): Select the current layer in the
5237 map.
5238 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
5239 with the selected layer and/or group.
5240
5241 2003-03-26 Jonathan Coles <[email protected]>
5242
5243 This putback contains the code for dockable windows. There is
5244 no support in wxWindows as of this date for windows that can
5245 attach themselves to other windows.
5246
5247 The current model contains a DockableWindow which has a parent
5248 window for when it is detached and a dock window that it puts
5249 its contents in when it is docked. The contents of a DockableWindow
5250 must be a DockPanel. DockPanel itself derives from wxPanel.
5251
5252 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
5253 message, not a LAYER_LEGEND_CHANGED message.
5254
5255 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
5256
5257 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
5258 as one of the style properties for the fieldTypeText item to
5259 be sure that its size is correct when the text changes.
5260
5261 * Thuban/UI/dock.py: New. Classes for the DockPanel and
5262 DockableWindow.
5263
5264 * Thuban/UI/legend.py: Added some more buttons and made the
5265 LegendPanel a DockPanel.
5266
5267 * Thuban/UI/mainwindow.py: Added sash windows to the main window
5268 and supporting functions for manipulating the sashes.
5269 (MainWindow.ShowLegend): Create a DockableWindow with the
5270 LegendPanel as the contents.
5271
5272 * Thuban/UI/messages.py: Added DOCKABLE_* messages
5273
5274 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
5275 not LAYER_LEGEND_CHANGED, messages.
5276
5277 2003-03-25 Jonathan Coles <[email protected]>
5278
5279 * setup.py: Added custom script bdist_rpm_build_script so that
5280 when the rpm is built the path to wx-config is correct.
5281
5282 * setup.cfg: Added line saying to use the custom build script
5283
5284 2003-03-20 Jonathan Coles <[email protected]>
5285
5286 Initial implementation of the Legend.
5287
5288 * Thuban/UI/legend.py: New. Creates a window that shows the map's
5289 Legend information and allows the user to add/modify classifications
5290 and how the layers are drawn on the map.
5291
5292 * setup.py: New command 'build_docs' which currently uses
5293 happydoc to generate html documentation for Thuban.
5294
5295 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
5296 Returns a string which is appropriately describes the group.
5297
5298 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
5299 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
5300
5301 * Thuban/Model/map.py (Map): Rename messages and use new, more
5302 specific, messages.
5303
5304 * Thuban/Model/messages.py: New message to indicate that a layer's
5305 data has changed (LAYER_CHANGED). New map messages to indicate
5306 when layers have been added/removed/changed or if the stacking order
5307 of the layers has changed.
5308
5309 * Thuban/Model/session.py: Rename and use new messages.
5310
5311 * Thuban/UI/classifier.py: Remember if any changes have actually
5312 been applied so that if the dialog is cancelled without an application
5313 of changes we don't have to set a new classification.
5314 (ClassDataPreviewer): Pulled out the window specific code and put it
5315 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
5316 symbols on any DC.
5317
5318 * Thuban/UI/mainwindow.py: New code to open the legend.
5319
5320 * Thuban/UI/view.py: Use new message names.
5321
5322 2003-03-19 Jonathan Coles <[email protected]>
5323
5324 * Thuban/UI/main.py (verify_versions): New. Checks the versions
5325 of Python, wxPython, and some other libraries.
5326
5327 * extensions/thuban/wxproj.cpp (check_version): Checks the given
5328 version against what wxproj was compiled with.
5329 (check_version_gtk): If wxproj was compiled with gtk then check
5330 the given version against the version of the gtk library
5331 currently being used.
5332
5333 2003-03-14 Bernhard Herzog <[email protected]>
5334
5335 * test/test_command.py: Run the tests when the module is run as a
5336 script
5337
5338 2003-03-14 Bernhard Herzog <[email protected]>
5339
5340 Implement selection of multiple selected shapes in the same layer:
5341
5342 - Introduce a new class to hold the selection. This basically
5343 replaces the interactor which was nothing more than the
5344 selection anyway. A major difference is of course that the new
5345 selection class supports multiple selected shapes in one layer
5346
5347 - Move the object that represents the selection from the
5348 application to the canvas. The canvas is a better place than the
5349 application because the selection represents which shapes and
5350 layer of the map displayed by the canvas are selected and
5351 affects how the map is drawn.
5352
5353 - Make the selection and its messages publicly available through
5354 the mainwindow.
5355
5356 - The non-modal dialogs do not get a reference to the interactor
5357 anymore as they can simply refer to their parent, the
5358 mainwindow, for the what the interactor had to offer.
5359
5360 * Thuban/UI/selection.py: New module with a class to represent the
5361 selection.
5362
5363 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
5364 these unused messages
5365
5366 * Thuban/UI/application.py (ThubanApplication.OnInit)
5367 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
5368 interactor is gone now.
5369 (ThubanApplication.CreateMainWindow): There is no interactor
5370 anymore so we pass None as the interactor argument for now for
5371 compatibility.
5372
5373 * Thuban/UI/view.py (MapCanvas.delegated_messages)
5374 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
5375 Unsubscribe, delegate messages according to the delegated_messages
5376 class variable.
5377 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
5378 attributes from instance variables as described with the
5379 delegated_methods class variable.
5380 (MapCanvas.__init__): New instance variable selection holding the
5381 current selection
5382 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
5383 pass them on to the renderer
5384 (MapCanvas.SetMap): Clear the selection when a different map is
5385 selected.
5386 (MapCanvas.shape_selected): Simple force a complete redraw. The
5387 selection class now takes care of only issueing SHAPES_SELECTED
5388 messages when the set of selected shapes actually does change.
5389 (MapCanvas.SelectShapeAt): The selection is now managed in
5390 self.selection
5391
5392 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
5393 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
5394 Unsubscribe, delegate messages according to the delegated_messages
5395 class variable.
5396 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
5397 attributes from instance variables as described with the
5398 delegated_methods class variable.
5399 (MainWindow.__init__): The interactor as ivar is gone. The
5400 parameter is still there for compatibility. The selection messages
5401 now come from the canvas.
5402 (MainWindow.current_layer, MainWindow.has_selected_layer):
5403 Delegate to the the canvas.
5404 (MainWindow.LayerShowTable, MainWindow.Classify)
5405 (MainWindow.identify_view_on_demand): The dialogs don't need the
5406 interactor parameter anymore.
5407
5408 * Thuban/UI/tableview.py (TableFrame.__init__)
5409 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
5410 (LayerTableFrame.row_selected): The interactor is gone. It's job
5411 from the dialog's point of view is now done by the mainwindow,
5412 i.e. the parent. Subscribe to SHAPES_SELECTED instead
5413 of SELECTED_SHAPE
5414
5415 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
5416 is gone. It's job from the dialog's point of view is now done by
5417 the mainwindow, i.e. the parent.
5418
5419 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
5420 gone. It's job from the dialog's point of view is now done by the
5421 mainwindow, i.e. the parent.
5422
5423 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
5424 gone. It's job from the dialog's point of view is now done by the
5425 mainwindow, i.e. the parent.
5426 (SessionTreeCtrl.__init__): New parameter mainwindow which is
5427 stored as self.mainwindow. The mainwindow is need so that the tree
5428 can still subscribe to the selection messages.
5429 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
5430 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
5431 selection is now accessible through the mainwindow. Subscribe to
5432 SHAPES_SELECTED instead of SELECTED_SHAPE
5433
5434 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
5435 SHAPES_SELECTED message now.
5436 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
5437 so deal with multiple shapes
5438 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
5439 gone. It's job from the dialog's point of view is now done by the
5440 mainwindow, i.e. the parent.
5441
5442 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
5443 parameter is now a list of shape ids.
5444 (RecordTable.SetTable): The second parameter is now a list of
5445 indices.
5446
5447 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
5448 selected_shape parameter and ivar to selected_shapes. It's now a
5449 list of shape ids.
5450 (MapRenderer.draw_label_layer): Deal with multiple selected
5451 shapes. Rearrange the code a bit so that the setup and shape type
5452 distinctions are only executed once.
5453
5454 * test/test_selection.py: Test cases for the selection class
5455
5456 2003-03-11 Jonathan Coles <[email protected]>
5457
5458 * Thuban/Model/load.py: Temporary fix so that the xml reader
5459 doesn't cause Thuban to crash.
5460
5461 * Thuban/Model/layer.py: Handle the cyclic references between
5462 a layer and its classification better, and be sure to disconnect
5463 the classification from the layer when the layer is destroyed
5464 so that we don't maintain a cyclic reference that may not be
5465 garbage collected.
5466
5467 * Thuban/Model/classification.py: See comment for layer.py.
5468
5469 2003-03-12 Jan-Oliver Wagner <[email protected]>
5470
5471 * HOWTO-Release: New. Information on the steps for releasing
5472 a new version of Thuban.
5473
5474 2003-03-11 Jonathan Coles <[email protected]>
5475
5476 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
5477 Use True instead of true.
5478 (Classifier): Should have a single panel in which all the controls lie.
5479
5480 * Thuban/UI/proj4dialog.py: Add normal border.
5481
5482 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
5483
5484 * Thuban/UI/mainwindow.py: Use True instead of true.
5485
5486 * setup.py: Update some definitions to use wxWindows2.4 files
5487
5488 * Data/iceland_sample_class.thuban: Fixed file so that the
5489 field_type information is present.
5490
5491 2003-03-10 Jonathan Coles <[email protected]>
5492
5493 * Thuban/UI/classifier.py (Classifier.__init__): Make the
5494 field type label grow so that when the text changes the
5495 size is updated correctly. This may be a wxWindows bug.
5496
5497 2003-03-10 Jonathan Coles <[email protected]>
5498
5499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
5500 SESSION_REPLACED.
5501
5502 * Thuban/UI/classifier.py: Wrap text with _().
5503 (ClassGrid.CreateTable): Set dimensions and size hints here,
5504 instead of in Reset, so we only set the size once.
5505
5506 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
5507
5508 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
5509 Call Close() instead of Shutdown().
5510
5511 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
5512
5513 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
5514 Go back to using OnClose() instead of Shutdown().
5515
5516 2003-03-10 Jonathan Coles <[email protected]>
5517
5518 * Thuban/UI/classifier.py (Classifier): SelectField() needed
5519 to know the old field index as well as the new one.
5520
5521 2003-03-10 Jonathan Coles <[email protected]>
5522
5523 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
5524 to correctly set the table information and call this from
5525 __init__ and from _OnFieldSelect so that all the information
5526 is up to date when the dialog opens and when a field is changed.
5527
5528 2003-03-10 Jonathan Coles <[email protected]>
5529
5530 * Thuban/Model/classification.py (Classification): Don't use
5531 layer's message function directly, use the ClassChanged() method
5532 when then classification changes. SetField/SetFieldType/SetLayer
5533 must keep the information about field name and field type in
5534 sync when an owning layer is set or removed.
5535
5536 * Thuban/Model/layer.py: Added ClassChanged() so that the
5537 classification can tell the layer when its data has changed.
5538 (Layer.SetClassification): Accepts None as an arguement to
5539 remove the current classification and correctly handles
5540 adding a new classification.
5541
5542 * Thuban/Model/load.py: Comment out print statement
5543
5544 * test/test_classification.py, test/test_save.py: New and
5545 improved tests.
5546
5547 2003-03-07 Jonathan Coles <[email protected]>
5548
5549 * Thuban/Model/classification.py: Implemented __copy__ and
5550 __deepcopy__ for ClassGroup* and ClassGroupProperites so
5551 they can easily be copied by the classifier dialog.
5552 (ClassGroupProperites.__init__): The default line color should
5553 have been Color.Black.
5554
5555 * Thuban/UI/classifier.py: Setting and Getting table values now
5556 uses a consistent set of functions.
5557 (Classifier): Now non-modal. Has field type label which changes
5558 as the field changes. Keep track of buttons in a list so that
5559 we can enable/disable the buttons when the None field is selected.
5560 (SelectPropertiesDialog): Add buttons to make the colors transparent.
5561
5562 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
5563 does what OnClose did, but can be called by the application to
5564 close a window. Needed when a session changes, and we have to
5565 close the classifier windows.
5566
5567 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
5568 Shuts down open dialogs. Used when a new session is created
5569 or a session is opened.
5570 (MainWindow.SaveSession): Should only call application.SaveSession()
5571 if we don't call SaveSessionAs first.
5572 (MainWindow.Classify): Allow different classifier dialogs for
5573 different layers.
5574
5575 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
5576 the parent class handle it. Add Shutdown() to unsubscibe from
5577 event notification and call the parent Shutdown(). This was
5578 necessary so the application can close the tree window.
5579
5580 2003-03-06 Jonathan Coles <[email protected]>
5581
5582 * Thuban/Model/classification.py: Minor documentation changes,
5583 Addition of __eq__ and __ne__ methods.
5584 (Classification.SetLayer): prevent recursion between this method
5585 and Layer.SetClassification().
5586
5587 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
5588
5589 * Thuban/Model/layer.py (SetClassification): prevent recursion
5590 between this method and Classification.SetLayer().
5591
5592 * test/test_classification.py, test/test_load.py,
5593 test/test_session.py: Fixed and added tests for the classification
5594 classes.
5595
5596 2003-03-06 Bernhard Herzog <[email protected]>
5597
5598 * Thuban/UI/classifier.py (ClassGrid.__init__)
5599 (ClassGrid.CreateTable): Move the SetSelectionMode call to
5600 CreateTable because otherwise it triggers an assertion in
5601 wxPython/wxGTK 2.4.
5602
5603 2003-03-05 Jonathan Coles <[email protected]>
5604
5605 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
5606
5607 * Thuban/Model/load.py: import FIELDTYPE constants from table.
5608
5609 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
5610
5611 * Thuban/Model/table.py: Put FIELDTYPE constants back.
5612
5613 2003-03-05 Jonathan Coles <[email protected]>
5614
5615 * Thuban/UI/classifier.py: Added class documentation.
5616 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
5617 Store just the groups in the table and generate the other
5618 column information when it is requested. Add "None" field
5619 to pull-down to select no classification.
5620
5621 * Thuban/common.py: Moved FIELDTYPE constants from table.py
5622 (Str2Num): Only catch ValueError exceptions.
5623
5624 * Thuban/Model/classification.py: Class documentation. Renaming
5625 of methods with Stroke to Line. Groups are stored in a single
5626 list with the default as the first element. Groups are searched
5627 in the order they appear in the list.
5628
5629 * Thuban/Model/color.py: Documentation.
5630
5631 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
5632 the kind of data represented by a field.
5633
5634 * Thuban/Model/load.py (ProcessSession): Use proper string
5635 conversion function; fixes RTbug #1713.
5636
5637 * Thuban/Model/save.py (Saver): Store field type information.
5638
5639 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
5640 (Table): Add field_info_by_name() to retrieve field information
5641 by specifying the field name, not the number.
5642
5643 * Thuban/UI/mainwindow.py: Function name changes.
5644
5645 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
5646 get the layer classification once. Don't try to classify
5647 values when the field is None: just use the default properties.
5648
5649 * Thuban/UI/view.py: Function name changes.
5650
5651 * Doc/thuban.dtd: Add field_type attribute to a classification.
5652
5653 2003-03-04 Bernhard Herzog <[email protected]>
5654
5655 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
5656 the fill and stroke layer attributes optional with suitable
5657 default values. Add the stroke_width layer attribute. Use correct
5658 syntax for empty elements. Make the attribute list for labels
5659 refer to the label element.
5660
5661 2003-03-04 Bernhard Herzog <[email protected]>
5662
5663 * setup.py (thuban_build_py.build): Add a comment about distutils in
5664 Python 2.3 containing some of the functionality we implement in
5665 setup.py ourselves.
5666
5667 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
5668 before the selection mode. Doing it the other way round triggers
5669 an assertion in wxWindows.
5670
5671 * Thuban/Model/save.py (escape): Fix typo in doc-string
5672
5673 * Thuban/Model/classification.py: Remove unnecessary wxPython
5674 import
5675
5676 2003-03-04 Jonathan Coles <[email protected]>
5677
5678 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
5679 Parameter 'value' should default to None.
5680
5681 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
5682 the class attribute __classification is now private.
5683
5684 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
5685 Classifier to ClassGrid. Added support for removing selected rows,
5686 which including code for keeping track of when cells are selected,
5687 and deselected.
5688 (ClassTable): Support for added/removing rows. Fixed a problem
5689 with __ParseInput whereby it would not allow strings (only numbers)
5690 to be entered.
5691 (Classifier): Added button and supporting code for removing
5692 selected rows.
5693
5694 2003-02-27 Jonathan Coles <[email protected]>
5695
5696 * Thuban/common.py: Moved color conversion functions into
5697 Thuban/UI/common.py.
5698 (Str2Num): Now converts the float (not the string) to a long/int
5699 so that an exception isn't thrown.
5700
5701 * Thuban/UI/common.py: Common functions used in several UI modules
5702
5703 * Thuban/Model/classification.py: Changed the class hierarchy
5704 so that a Classification consists of Groups which return
5705 Properties when a value matches a Group.
5706
5707 * Thuban/Model/layer.py: Fixed name resolution problem.
5708
5709 * Thuban/Model/load.py: Use new Classification and Group functions.
5710
5711 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
5712 failure.
5713 (Saver.write_classification): Use new Classification and Group
5714 functions.
5715
5716 * Thuban/UI/classifier.py: Changes to use new Classification and Group
5717 functions. Fix to create a tuple with a single value instead of
5718 simply returning the value.
5719
5720 * Thuban/UI/renderer.py: Use new Classification and Group functions.
5721 Use common.py functions.
5722
5723 * Thuban/UI/tree.py: Use common.py functions.
5724
5725 * test/test_classification.py: Use new Classification and Group
5726 classes.
5727
5728 2003-02-24 Jonathan Coles <[email protected]>
5729
5730 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
5731 functions from Thuban color objects to wxWindow colour objects.
5732
5733 * Thuban/Model/classification.py (Classification): Renamed
5734 GetProperties() to GetClassData(). Used the new iterator
5735 in TreeInfo().
5736 (ClassIterator): Iterator implementation to iterate over the
5737 ClassData objects in a classification object.
5738
5739 * Thuban/Model/save.py (Saver.write_classificaton): Uses
5740 the new iterator to save the classification information.
5741
5742 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
5743 for changing the stroke and fill colors and previewing the
5744 changes.
5745
5746 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
5747 MainWindow.SaveSessionAs): Text string changes so the dialogs
5748 have more meaningful titles.
5749
5750 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
5751 Classification method name from GetProperties to GetClassData.
5752
5753 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
5754 instead of accessing now non-existent class variables.
5755
5756 2003-02-24 Bernhard Herzog <[email protected]>
5757
5758 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
5759 unneeded Shape() call. Rendering is substantially faster without
5760 it and it avoids some problems with broken shape files.
5761
5762 2003-02-20 Frank Koormann <[email protected]>
5763
5764 Force minimal size of identify and label dialogs. The autosizing
5765 looked too ugly.
5766
5767 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
5768 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
5769 Set size of listctrl.
5770 * Thuban/UI/identifyview.py (IdentifyView.__init__):
5771 Set size of dialog.
5772
5773 2003-02-19 Jonathan Coles <[email protected]>
5774
5775 * test/test_classification.py, test/test_layer.py,
5776 test/test_load.py, test/test_map.py, test/test_session.py:
5777 Updated the tests to use the new functions that are in the
5778 respective classes.
5779
5780 * Thuban/Model/classification.py (Classification):
5781 Uses the new ClassData* classes. Modification messages are
5782 passed up to the parent layer (if it exists).
5783 (ClassData): New class to encapsulate the common data in each
5784 classification property.
5785 (ClassDataDefault): Represents the Default class. data.
5786 (ClassDataPoint): Represents a single class. data point
5787 (ClassDataRange): Represents a class. range
5788 (ClassDataMap): Represents a class. map (unused).
5789
5790 * Thuban/Model/color.py: Added Color.None to represent something
5791 with no color. Color.Black represents the color black.
5792 (NoColor): Helper class derived from Color to represent something
5793 with no color.
5794
5795 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
5796 stroke_width attributes. Made the 'classification' attribute private.
5797 New methods for setting/getting the classification.
5798
5799 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
5800 to get the classifcation and use the new ClassData* classes to
5801 hold the classification data. Use Str2Num to convert numbers
5802 properly.
5803
5804 * Thuban/Model/save.py (Saver): Use new Color and Classification
5805 methods
5806
5807 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
5808 custom grid.
5809 (ClassTable): Support for editing Values and Labels and for
5810 changing what type (point or range) of data is stored in each
5811 property based on how the user enters the data.
5812 (Classifier): Support for saving the new classifications and
5813 launching the dialog to edit a property.
5814 (SelectPropertiesDialog): New class for editing the visual
5815 properties of a classification (stroke color, width, and fill color)
5816 (ClassPreviewer): Took the Draw method from ClassRenderer and
5817 made most of it into this new class. Intend to use this class in
5818 the SelectPropertiesDialog for previewing changes.
5819
5820 * Thuban/UI/renderer.py: Use new Color and Classification methods.
5821
5822 * Thuban/UI/tree.py: Formatting changes.
5823
5824 * Doc/thuban.dtd: Add 'label' element
5825
5826 * Thuban/common.py: New. Contains common routines used throughout
5827 the code.
5828 (Str2Num): Takes a string and converts it to the "best" type of
5829 number.
5830
5831 2003-02-14 Bernhard Herzog <[email protected]>
5832
5833 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
5834 dragging flag is always set to 0 even when the tool implementation
5835 raises an exception
5836
5837 2003-02-11 Bernhard Herzog <[email protected]>
5838
5839 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
5840 method to create a splash screen.
5841 (ThubanApplication.ShowMainWindow): New. Show the main window.
5842 Needed so the splash screen can display the mainwindow
5843 (ThubanApplication.OnInit): Call the
5844 new splash_screen method to determine whether the application
5845 should display a splash screen. If it displays a splash screen do
5846 not immediately show the main window.
5847
5848 2003-02-11 Jonathan Coles <[email protected]>
5849
5850 * Thuban/Model/classification.py: Added import line to fix
5851 feature conflicts between running on python2.2 and python2.1.
5852
5853 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
5854 onto the clinfo parameter, so removed the deepcopy().
5855
5856 2003-02-10 Jonathan Coles <[email protected]>
5857
5858 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
5859 Added element_open variable to track opening and closing of tags
5860 so that tags that don't span more than one line are closed with
5861 /> instead of </tag_name>. Use the GetDefault*() methods of
5862 the Classification class.
5863
5864 * Thuban/Model/classification.py (Classificaton): Added set and
5865 get methods for the default data. The class also takes a layer
5866 reference so that modification messages can be sent. Fixed the
5867 methods to use the new ClassData class.
5868 (ClassData): New class to encapsulate the classification data
5869
5870 * Thuban/Model/layer.py (Layer): Remove the
5871 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
5872 SetDefault*() methods on the layer's classification object.
5873 (Layer.__init__): Use the new SetDefault*() methods in the
5874 Classification class.
5875
5876 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
5877 object instead of a dictionary.
5878
5879 * Thuban/UI/classifier.py (ClassRenderer): New class to
5880 draw the classifications in the dialog box's table.
5881 (Classifier): Modified to use the ClassRenderer class.
5882
5883 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
5884 methods of the Classification class.
5885
5886 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
5887 of the ClassData class.
5888
5889 * test/test_classification.py, test/test_layer.py,
5890 test/test_map.py, test/test_session.py: Fix the tests to work
5891 with the above code changes.
5892
5893 2003-02-03 Jonathan Coles <[email protected]>
5894
5895 * Thuban/Model/classification.py (Classification): Added getNull()
5896 to return the NullData reference
5897
5898 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
5899 Layer.SetStrokeWidth): Modified these functions to change the
5900 null data in the classification rather than keep these values
5901 directly in the Layer class. Menu options to change these values
5902 work again.
5903
5904 2003-01-28 Jonathan Coles <[email protected]>
5905
5906 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
5907 Fixed crashing problem on some systems. Dialog box shows
5908 classification data.
5909
5910 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
5911 Colors in the tree view.
5912
5913 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
5914 the tree info for classifications. Commented out unnecessary lines.
5915
5916 * Thuban/Model/classification.py (Classification.TreeInfo): New
5917 function to add information about the classification into the
5918 tree view.
5919
5920 2003-01-27 Jan-Oliver Wagner <[email protected]>
5921
5922 * Thuban/__init__.py (_): New.
5923
5924 * Thuban/Model/classification.py, Thuban/Model/extension.py,
5925 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
5926 Thuban/Model/session.py, Thuban/UI/application.py,
5927 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
5928 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
5929 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
5930 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
5931 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
5932
5933 2003-01-27 Jonathan Coles <[email protected]>
5934
5935 * Thuban/Model/layer.py: Classification initialization calls.
5936
5937 * Thuban/Model/classification.py: Created class to encapsulate
5938 a layer classification. Supports specific data points and
5939 ranges.
5940
5941 * Thuban/Model/load.py: Added support for loading classification
5942 information.
5943
5944 * Thuban/Model/save.py: Added support for saving classification
5945 information.
5946
5947 * Thuban/UI/classifier.py: Initial class for a dialog box for
5948 specifying classification information.
5949
5950 * Thuban/UI/mainwindows.py: Support for opening the classifier
5951 dialog.
5952
5953 * Thuban/UI/renderer.py: Support for drawing a layer with the
5954 classification information.
5955
5956 * Data/iceland_sample_class.thuban: iceland_sample with
5957 classification data.
5958
5959 * test/test_classification: Tests for the Classification class.
5960
5961 2002-12-09 Bernhard Herzog <[email protected]>
5962
5963 * test/test_command.py: New. Tests for the command classes.
5964
5965 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
5966 (Command.IsTool): New method to distinguish between command
5967 switching tools and other commands.
5968
5969 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
5970 the tool to avoid direct assignments to instance variables
5971 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
5972 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
5973 change the tool
5974
5975 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
5976 active tool's command turns insensitive, disable the tool.
5977 (_tool_command): Use the new ToolCommand class
5978
5979 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
5980 SelectTool method to change the tool
5981 (iconfile): Use the ToolCommand class
5982
5983 2002-12-03 Bernhard Herzog <[email protected]>
5984
5985 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
5986 the case of selected items that are not children of Layers or Maps
5987 properly. Previously this bug would trigger an assertion in
5988 wxWindows.
5989
5990 2002-11-06 Frank Koormann <[email protected]>
5991
5992 * Thuban/UI/mainwindow.py: Altered the order of tools in the
5993 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
5994 Full Extent).
5995
5996 2002-10-23 Bernhard Herzog <[email protected]>
5997
5998 * setup.py (setup call): version now 0.1.3
5999
6000 * MANIFEST.in: Add the files in test/
6001
6002 * test/README: Add note about tests requiring the iceland data
6003
6004 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
6005 copyright notice.
6006
6007 2002-10-18 Bernhard Herzog <[email protected]>
6008
6009 * test/test_map.py
6010 (TestMapWithContents.test_projected_bounding_box): Use an explicit
6011 epsilon.
6012
6013 * test/support.py (FloatComparisonMixin.assertFloatEqual)
6014 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
6015 message if the assertion fails and don't return the return value
6016 of self.assert_. In assertFloatSeqEqual the return meant that not
6017 all items of the sequence were compared.
6018
6019 2002-09-20 Bernhard Herzog <[email protected]>
6020
6021 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
6022
6023 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
6024
6025 * test/test_map.py (TestMapWithContents.test_tree_info): Create
6026 the string with the bounding box on the fly because of platform
6027 differences in the way %g is handled.
6028
6029 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
6030 DBFfile too because Thuban layers can't yet cope missing DBF
6031 files.
6032
6033 2002-09-20 Bernhard Herzog <[email protected]>
6034
6035 * test/test_menu.py: Use initthuban instead of
6036 add_thuban_dir_to_path to initialize Thuban.
6037
6038 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
6039 Mixin class for float comparisons
6040 (SubscriberMixin): New. Mixin class to test messages sent through
6041 the Connector class
6042
6043 * test/README: Fix a typo and add the -v flag to the command for
6044 individual tests
6045
6046 * test/test_session.py: New. Test cases for Thuban.Model.session
6047
6048 * test/test_proj.py: New. Test cases for Thuban.Model.proj
6049
6050 * test/test_map.py: New. Test cases for Thuban.Model.map
6051
6052 * test/test_layer.py: New. Test cases for Thuban.Model.layer
6053
6054 * test/test_label.py: New. Test cases for Thuban.Model.label
6055
6056 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
6057
6058 * test/test_color.py: New. Test cases for Thuban.Model.color
6059
6060 * test/test_base.py: New. Test cases for Thuban.Model.base
6061
6062 2002-09-13 Bernhard Herzog <[email protected]>
6063
6064 * Thuban/Model/session.py (Session.forwarded_channels): Forward
6065 the CHANGED channel too.
6066
6067 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
6068 CHANGED channel too.
6069 (Map.__init__): Call the Modifiable constructor as well.
6070
6071 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
6072 event if the modified flag changes.
6073 (Modifiable.changed): Tweak the doc-string.
6074
6075 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
6076 (MainWindow.set_position_text): Put the code that puts the text
6077 with the mouse position into the status bar into the new method
6078 set_position_text so that it can overwritten in derived classes.
6079
6080 2002-09-12 Bernhard Herzog <[email protected]>
6081
6082 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
6083 message box on the main window.
6084
6085 2002-09-11 Bernhard Herzog <[email protected]>
6086
6087 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
6088 the 'E' because it's less likely to interfere with other menu
6089 entries.
6090 (MainWindow.build_menu): remove an incorrect comment.
6091
6092 2002-09-10 Bernhard Herzog <[email protected]>
6093
6094 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
6095 (_tool_command): Add sensitive parameter
6096 (_has_visible_map): Sensitivity callback to tools and other
6097 commands that require a visible map. Use it in map_zoom_in_tool,
6098 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
6099 and map_full_extent
6100
6101 2002-09-06 Bernhard Herzog <[email protected]>
6102
6103 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
6104 VIEW_POSITION
6105
6106 2002-09-04 Frank Koormann <[email protected]>
6107
6108 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
6109
6110 2002-09-02 Bernhard Herzog <[email protected]>
6111
6112 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
6113 wxWindows already and our implementation doesn't work correctly
6114 with wxGTK 2.3:
6115 (MapCanvas.__init__): Remove the instance variable
6116 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
6117 be drawin
6118 (MapCanvas.OnIdle): Removed.
6119
6120 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
6121 a parameter to determine the size of the rectangle.
6122 (MapCanvas.find_shape_at): Create the box around the point on a
6123 layer by layer basis and make the size depend on the shape type.
6124 This solves a problem with the selection of point shapes at the
6125 border of the layer's bounding box
6126
6127 2002-08-30 Bernhard Herzog <[email protected]>
6128
6129 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
6130 for the sensitivity of remove layer.
6131 (_can_remove_layer): New. Sensitivity callback for remove layer
6132 (Command layer_remove): Use _can_remove_layer
6133
6134 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
6135 determine whether a given layer can be deleted.
6136
6137 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
6138 (MapCanvas.do_redraw): Get rid of the unused update_region
6139 instance variable
6140
6141 * Thuban/UI/view.py: Add/update some doc-strings.
6142
6143 * test/: new subdirectory with a bunch of unit tests.
6144
6145 * test/README, test/test_table.py, test/test_save.py,
6146 test/test_menu.py, test/test_load.py: Initial set of tests and
6147 brief instructions on how to run them
6148
6149 2002-08-29 Bernhard Herzog <[email protected]>
6150
6151 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
6152 arcs with multiple parts.
6153
6154 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
6155 Handle degenrate rectangles.
6156
6157 * Thuban/Model/table.py: Make writing records work correctly:
6158 (Table.__init__): Keep track of whether the DBF is open for
6159 writing
6160 (Table.write_record): Open the DBF file for writing when necessary
6161
6162 2002-08-27 Bernhard Herzog <[email protected]>
6163
6164 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
6165 dbf files only for reading by default. Use a new writable dbf
6166 object for writing.
6167
6168 2002-08-26 Bernhard Herzog <[email protected]>
6169
6170 * Thuban/UI/mainwindow.py: Refactor the context creation:
6171 (MainWindow.Context): New method to return a context
6172 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
6173 new method
6174
6175 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
6176 layer table specific code from TableGrid into LayerTableGrid
6177 (TableFrame, LayerTableFrame): Split the layer table specific code
6178 from TableFrame into LayerTableFrame
6179 (LayerTableGrid.select_shape): Remove a debug print
6180
6181 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
6182 LayerTableFrame
6183
6184 2002-08-23 Bernhard Herzog <[email protected]>
6185
6186 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
6187 absolute filename.
6188
6189 2002-08-22 Bernhard Herzog <[email protected]>
6190
6191 * Thuban/Model/table.py (Table.write_record): New method to write
6192 records.
6193 (Table.__init__): Open the DBF file for writing too.
6194
6195 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
6196 into the underlying table.
6197
6198 * extensions/shapelib/shapefil.h (DBFCommit),
6199 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
6200 commit any changes made to the DBF file.
6201
6202 * Thuban/UI/mainwindow.py (make_check_current_tool)
6203 (_tool_command): Put the code that generates the "checked"
6204 callback into a separate function so that we can reuse it
6205 elsewhere
6206
6207 * Thuban/Model/save.py (Saver): New class to handle serializing a
6208 session into an XML file. The main reason to introduce a class is
6209 that applications built on Thuban can derive from it so that they
6210 can save additional information in a session file.
6211 (save_session): Delegate almost all the work to the Saver class.
6212 Rename the filename argument to file because it may be a file like
6213 object now.
6214
6215 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
6216 code. Remove the little test code which would be executed when the
6217 module is run as a script which didn't work anymore since it can't
6218 import the other Thuban modules.
6219 (ProcessSession, load_session): Refactor the ProcessSession to
6220 have one method for each element start and end tag so that derived
6221 classes can easily override the processing of individual tags.
6222 Also, always parse with namespaces enabled because applications
6223 built on top of Thuban will likely use namespaces if they extend
6224 the session file format.
6225
6226 2002-08-21 Bernhard Herzog <[email protected]>
6227
6228 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
6229 because thubaninit_contents will do it for us.
6230
6231 2002-08-16 Jan-Oliver Wagner <[email protected]>
6232
6233 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
6234 tree window already open
6235
6236 2002-08-15 Bernhard Herzog <[email protected]>
6237
6238 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
6239 with self.
6240
6241 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
6242 when we have actually captured it.
6243
6244 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
6245 shapefile and destroy the table.
6246
6247 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
6248
6249 2002-08-14 Bernhard Herzog <[email protected]>
6250
6251 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
6252 instance variable columns
6253 (RecordTable.GetTypeName): row and col may be negative in some
6254 cases.
6255
6256 * setup.py (InstallLocal.initialize_options)
6257 (InstallLocal.finalize_options, InstallLocal.user_options): New
6258 option create-init-file to build a thubaninit.py when running
6259 install_local
6260 (InstallLocal.run): Create the thubaninit.py module when requested
6261 (thubaninit_contents): Split the template into several parts and
6262 create a new function thubaninit_contents that creates the
6263 contents of a thubaninit module.
6264 (ThubanInstall.run): Use the new function to create the thubaninit
6265 module.
6266
6267 2002-07-30 Bernhard Herzog <[email protected]>
6268
6269 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
6270 cleanup.
6271 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
6272
6273 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
6274 direct base class' Destroy method.
6275
6276 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
6277 layers.
6278 (Map.Destroy): Destroy the label_layer as well and call the
6279 inherited Desatroymethod first so that no more messages are
6280 issued.
6281 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
6282 message if the stacking order actually has changed. Add
6283 doc-strings.
6284 (Map.BoundingBox): Correct the doc-string.
6285 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
6286 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
6287
6288 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
6289 all labels.
6290
6291 2002-07-29 Bernhard Herzog <[email protected]>
6292
6293 * Thuban/Model/map.py (Map.subscribe_layer_channels)
6294 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
6295 to a layer's channels into separate methods.
6296 (Map.RemoveLayer, Map.AddLayer): Call the new methods
6297 (Map.Destroy): Unsubscribe from a layer's channels before
6298 destroying it.
6299
6300 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
6301 selected_layer parameter to searched_layer which is the layer to
6302 search in.
6303 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
6304 search to that layer. Return the selected layer and shape.
6305
6306 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
6307 typo
6308
6309 2002-07-24 Bernhard Herzog <[email protected]>
6310
6311 * Thuban/UI/application.py (ThubanApplication.create_session):
6312 Extend the doc string.
6313 (ThubanApplication.subscribe_session)
6314 (ThubanApplication.unsubscribe_session): New methods to
6315 subscribe/unsubscribe to/from session channels.
6316 (ThubanApplication.SetSession): Call the new methods here.
6317 (ThubanApplication.maps_changed, ThubanApplication.set_map):
6318 Renamed set_map to maps_changed. Its now a subscriber for
6319 MAPS_CHANGED.
6320
6321 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
6322 x-coordinate in case of simple clicks
6323
6324 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
6325 don't pass it as a parameter
6326
6327 * Thuban/Model/session.py (Session.RemoveMap): New
6328
6329 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
6330 window size into a parameter.
6331
6332 2002-07-23 Bernhard Herzog <[email protected]>
6333
6334 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
6335 just commands.
6336
6337 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
6338 parameter list a bit to allow setting the window title and the
6339 initial message in the status bar. Update the callers.
6340
6341 * Thuban/UI/application.py (ThubanApplication.OnInit)
6342 (ThubanApplication.CreateMainWindow): Put the mainwindow
6343 instantiation into a separate method so that it can be overridden
6344 by a subclass.
6345
6346 2002-07-19 Bernhard Herzog <[email protected]>
6347
6348 * Thuban/Model/session.py: Issue a CHANGED message every time
6349 another changed message is issued to make it easier to get
6350 notified of changes.
6351 (Session): Update the doc string
6352 (Session.forward): Issue changed-events as CHANGED as well.
6353 (Session.changed): Overwrite the inherited version to issue
6354 CHANGED events as well.
6355
6356 * Thuban/UI/tree.py: We can now simply subscribe to the session's
6357 CHANGED channel to be informed of changes.
6358 (SessionTreeCtrl.session_channels): Not needed any longer.
6359 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
6360 Only have to (un)subscribe CHANGED
6361
6362 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
6363
6364 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
6365 for the wxPython locale bug to __init__.py so that it's
6366 automatically executed by anybody using UI code from Thuban.
6367
6368 2002-07-18 Bernhard Herzog <[email protected]>
6369
6370 * Thuban/UI/main.py (main): app no longer needs to be global
6371
6372 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
6373 as parameter and store it in an instance variable
6374 (MainWindow.invoke_command, MainWindow.update_command_ui)
6375 (MainWindow.save_modified_session, MainWindow.NewSession)
6376 (MainWindow.OpenSession, MainWindow.SaveSession)
6377 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
6378 application object.
6379
6380 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
6381 the main window with self.
6382
6383 * Thuban/UI/context.py: New module with the context class
6384
6385 * Thuban/UI/command.py (Command): Update doc string.
6386
6387 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
6388 MainWindow.update_command_ui): Pass an instance of the context
6389 class to the command's methods
6390 (check_current_tool, call_method): Handle the new context
6391 implementation
6392
6393 * Examples/simple_extensions/simple_tool.py (simple_tool,
6394 check_simple_tool): Handle the new context implementation
6395
6396 * Examples/simple_extensions/simple_command.py (simple_command):
6397 Handle the new context implementation. Update the comments about
6398 the context.
6399
6400 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
6401 doc-string
6402 (ThubanApplication.Session): New method to return the session
6403 object
6404
6405 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
6406 interactor's selected_layer may not be a layer of the current
6407 session when the tree is updated while a new session is being set.
6408
6409 2002-07-17 Bernhard Herzog <[email protected]>
6410
6411 * Thuban/UI/tree.py (color_string): Removed. No longer used.
6412 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
6413 update_tree into update_tree and add_items. The tree now uses a
6414 more generic way to display the contents of the tree.
6415 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
6416
6417 * Thuban/Model/layer.py (Layer.TreeInfo),
6418 Thuban/Model/extension.py (Extension.TreeInfo),
6419 Thuban/Model/map.py (Map.TreeInfo),
6420 Thuban/Model/session.py (Session.TreeInfo):
6421 Add TreeInfo methods to implement the new tree view update scheme
6422
6423 2002-07-16 Bernhard Herzog <[email protected]>
6424
6425 * Thuban/UI/application.py: Don't use "import from" for the
6426 MainWindow. It can't always be resolved.
6427 (ThubanApplication.OnInit): change reference to MainWindow
6428 accordingly.
6429
6430 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
6431 completely
6432
6433 2002-07-10 Bernhard Herzog <[email protected]>
6434
6435 * setup.py (create_init_module): New configurable variable whose
6436 default depends on the platform we're running on.
6437 (ThubanInstall.initialize_options): Initialize
6438 self.create_init_module from the global create_init_module
6439 (ThubanInstall.user_options): indictate that the options
6440 create-init-module and init-module-dir have arguments.
6441
6442 * setup.py: In the setup call change the version number to include
6443 cvs.
6444
6445 * MANIFEST.in: Add the files in Examples
6446
6447 2002-07-09 Bernhard Herzog <[email protected]>
6448
6449 * setup.py: In the setup call, use the thuban homepage as the
6450 value of the url parameter.
6451
6452 * Examples: New subdirectory for examples.
6453
6454 * Examples/simple_extensions/simple_tool.xpm,
6455 Examples/simple_extensions/simple_tool.py,
6456 Examples/simple_extensions/simple_command.py,
6457 Examples/simple_extensions/README: Simple examples showing how to
6458 add new commands and tools.
6459
6460 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
6461 bdist_rpm that we also have an install script.
6462 (bdist_inno): Add 2002 to the copyright notice.
6463
6464 * setup.py: Create a file in python's site-packages directory to
6465 make installation of Thuban as a library easier.
6466 (ThubanInstall.user_options): Add two new options,
6467 create-init-module and init-module-dir
6468 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
6469 filenames for installation in the default directories.
6470 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
6471 the inherited methods to capture some filenames before they're
6472 transformed too much by distutils.
6473 (ThubanInstall.run): Create the init module if requested.
6474 (ThubanInstall.thuban_init_filename): New method to return the
6475 full name of the init module.
6476 (ThubanInstall.get_outputs): Append the filename of the init
6477 module.
6478
6479 2002-07-08 Bernhard Herzog <[email protected]>
6480
6481 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
6482 handle the prefix properly which means that the default for the
6483 installation prefix should be /usr for RPMs and /usr/local when
6484 doing a normal source install.
6485 (bdist_rpm_install_script): Script to override the default install
6486 commands in the specfile generated by the bdist_rpm command.
6487 (thuban_bdist_rpm.user_options): Add a prefix option
6488 (thuban_bdist_rpm.initialize_options): Init the prefix option.
6489 Create the script files for the spec files as empty files here
6490 (thuban_bdist_rpm._make_spec_file): Override the inherited method
6491 to fill the script files with content.
6492
6493 * Thuban/Model/save.py (relative_filename): Wrapper around
6494 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
6495 argument. save_session now automatically uses this version,
6496 solving a problem when saving to a relative filename.
6497
6498 * setup.py: In the setup call, make sure that the library
6499 directories are under $prefix/lib not directly under $prefix.
6500
6501 2002-06-20 Jan-Oliver Wagner <[email protected]>
6502
6503 * Thuban/Model/extension.py: new module to handle extension objects.
6504 * Thuban/Model/messages.py: new messages for extensions.
6505 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
6506 Session.AddExtension): new for handling extensions.
6507 Also some other minor changes to round up extension handling.
6508 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
6509 of Extension titles and title and names of its objects.
6510
6511 2002-05-29 Bernhard Herzog <[email protected]>
6512
6513 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
6514 the events for a command.
6515 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
6516 Call bind_command_events to bind the events. add_toolbar_command
6517 can now bind events too so that it's possible to have commands
6518 that are only available through the toolbar.
6519 (MainWindow.init_ids): New instance variable events_bound to keep
6520 track of for which commands events have been bound.
6521
6522 2002-05-28 Bernhard Herzog <[email protected]>
6523
6524 * Thuban/UI/menu.py: New module to build and manage menus.
6525
6526 * Thuban/UI/mainwindow.py: Remove some unused imports.
6527 (MainWindow.__init__, main_menu): move the definition of the main
6528 menu from __init__ to the Menu instance main_menu.
6529 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
6530 build the menu bar and sub-menus from a menu description.
6531
6532 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
6533 startup file
6534 (ThubanApplication.read_startup_files): New method to run
6535 ~/.thuban/thubanstart.py
6536
6537 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
6538 Move the toolbar definition to the Menu instance main_toolbar.
6539 (MainWindow.build_toolbar): New method to build the toolbar
6540 similar to the build_menu methods
6541
6542 2002-05-23 Bernhard Herzog <[email protected]>
6543
6544 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
6545 layer_outline_color. Fix it in the definition of the command too.
6546
6547 * Thuban/UI/command.py (Command): Fix typo in doc string
6548
6549 2002-05-22 Bernhard Herzog <[email protected]>
6550
6551 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
6552 in the docstring
6553
6554 2002-05-15 Bernhard Herzog <[email protected]>
6555
6556 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
6557 when the shapefile is empty.
6558 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
6559 now return None for empty shapefiles. Update doc-strings.
6560
6561 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
6562 the layer's bbox being None.
6563
6564 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
6565 layer's bbox being None.
6566
6567 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
6568 necessary.
6569 (MapCanvas.__init__): New instance variables, last_selected_layer
6570 and last_selected_shape to determine how the selection has
6571 changed.
6572
6573 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
6574 AutoSizeColumns because it will cause a traversal of the entire
6575 table which for large .dbf files will take a very long time.
6576
6577 2002-05-14 Bernhard Herzog <[email protected]>
6578
6579 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
6580 maximum depth for the tree than shapelib does by default.
6581
6582 2002-05-10 Bernhard Herzog <[email protected]>
6583
6584 * setup.py (py_modules): The shptree modules doesn't have a
6585 wrapper, so don't include it in the py_modules
6586
6587 2002-05-08 Bernhard Herzog <[email protected]>
6588
6589 * extensions/shapelib/shptree.c (compare_ints): Make arguments
6590 const void * as in the qsort prototype
6591 (SHPTreeFindLikelyShapes): Remove some unused variables.
6592
6593 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
6594 maintains to redraw the window during a drag.
6595 (MapCanvas.unprojected_rect_around_point): New method to determine
6596 a small region around a point for hit-testing.
6597 (MapCanvas.find_shape_at): Only test the shapes in a small region
6598 around the point.
6599
6600 * setup.py: Increment the version to 0.1.2
6601
6602 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
6603 debug print and set session to None after unsubscribing
6604
6605 2002-05-07 Bernhard Herzog <[email protected]>
6606
6607 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
6608 the file to have a .thuban extension.
6609
6610 * Thuban/UI/tree.py (session_channels): New class constant with
6611 all the session channels to subscribe to to update the tree
6612 (SessionTreeCtrl.session_changed): Remember the session so that we
6613 can unsubscribe properly. Use the new class constant to
6614 unsubscribe from the old session and subscribe to the new one.
6615 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
6616 subscriptions of the SessionTreeCtrl.
6617 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
6618
6619 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
6620 Session Tree" command to the file menu.
6621
6622 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
6623 as update_region to the renderer.
6624
6625 * Thuban/UI/renderer.py
6626 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
6627 update box is now directly a tuple, not a wxRect anymore.
6628
6629 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
6630 prints.
6631
6632 2002-05-07 Bernhard Herzog <[email protected]>
6633
6634 * setup.py: Add the shptree extension module. See
6635 extensions/pyshapelib/ChangeLog for more details.
6636
6637 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
6638 extensions/shapelib/dbfopen.c: Really update to the versions of
6639 shapelib 1.2.9. For some reason it wasn't really done on
6640 2002-04-11.
6641
6642 * extensions/shapelib/shptree.c: Modified version of shptree.c of
6643 shapelib 1.2.9. The only real difference is the use of qsort
6644 instead of a bubble sort implementation
6645
6646 * Thuban/Model/layer.py (Layer.__init__): New instance variable
6647 shapetree to hold the shapelib quadtree for the shapefile
6648 (Layer.open_shapefile): Create the quad tree.
6649 (Layer.ShapesInRegion): New method to return the ids of shapes in
6650 a given region using the quad tree.
6651
6652 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
6653 comment
6654 (draw_polygon_shape): Accept both arcs and polygons.
6655 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
6656 the api.
6657
6658 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
6659 return the shape ids to be rendered in a given layer.
6660 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
6661 ids. Use draw_polygon_shape to draw arc shapes as well.
6662 (ScreenRenderer.RenderMap): New parameter for the rectangle that
6663 has to be updated
6664 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
6665 calling it's ShapesInRegion method.
6666
6667 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
6668 update_region for the update region.
6669 (MapCanvas.OnPaint): Maintain the update region
6670 (MapCanvas.do_redraw): Pass the bounding box of the update_region
6671 to the renderer when drawing the bitmap. Reset the update_region.
6672
6673 2002-05-03 Bernhard Herzog <[email protected]>
6674
6675 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
6676 MainWindow.OpenSession): Change the file extension of the session
6677 files to .thuban
6678
6679 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
6680 Move the map channels to be forwarded by the session into the
6681 class constant with forwarded_channels. Also add
6682 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
6683 forwarded_channels
6684
6685 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
6686 typo and some rewording).
6687
6688 2002-05-02 Bernhard Herzog <[email protected]>
6689
6690 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
6691 around to speed up most redraws:
6692 (MapCanvas.__init__): New instance variable bitmap which holds the
6693 bitmap
6694 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
6695 self.bitmap to draw.
6696 (MapCanvas.full_redraw): New method to force a full redraw
6697 including the bitmap
6698 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
6699 make sure the bitmap is redrawn.
6700 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
6701 MapCanvas.shape_selected): Call full_redraw instead of readraw to
6702 make sure the bitmap is redrawn.
6703 (MapCanvas.OnSize): New method to handle size events so that the
6704 bitmap can be redrawn.
6705
6706 2002-04-29 Bernhard Herzog <[email protected]>
6707
6708 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
6709 canvas' VIEW_POSITION event
6710 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
6711 Update the text in the status-bar accordingly.
6712
6713 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
6714 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
6715 called.
6716 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
6717 current_position
6718 (MapCanvas.set_current_position): New method to set
6719 current_position. Issue a VIEW_POSITION event
6720 (MapCanvas.CurrentPosition): New public method to return the value
6721 of current_position. Should be called when the VIEW_POSITION event
6722 is processed.
6723 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
6724 Update the position.
6725 (MapCanvas.OnLeaveWindow): Set the position to None.
6726
6727 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
6728 position in the statusbar
6729
6730 2002-04-26 Frank Koormann <[email protected]>
6731
6732 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
6733
6734 2002-04-24 Frank Koormann <[email protected]>
6735
6736 * Resources/Bitmaps/identify.xpm: shadow added
6737
6738 * Resources/Bitmaps/fullextent.xpm: new
6739
6740 2002-04-22 Jan-Oliver Wagner <[email protected]>
6741
6742 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
6743 box
6744
6745 2002-04-21 Jan-Oliver Wagner <[email protected]>
6746
6747 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
6748
6749 * Thuban/UI/tree.py (update_tree): added added map extent
6750
6751 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
6752 icon; added map_full_extend as tool
6753
6754 2002-04-19 Jan-Oliver Wagner <[email protected]>
6755
6756 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
6757 saving _new_ sessions
6758
6759 * Thuban/Model/session.py (create_empty_session): new session
6760 don't have a filename (set to None)
6761
6762 * Thuban/UI/tree.py (update_tree): added filename and modified flag
6763
6764 * Thuban/Model/load.py (ProcessSession): convert projection
6765 parameters from unicode to regular string
6766
6767 * Data/iceland_sample.session: Added UTM Zone 26 projection.
6768
6769 2002-04-11 Bernhard Herzog <[email protected]>
6770
6771 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
6772 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
6773 1.2.9
6774
6775 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
6776 the pyshapelib directoy into the list of include dirs, so that
6777 pyshapelib_api.h can be found.
6778
6779 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
6780 holds the pyshapelib C-API
6781 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
6782 pyshapelib_api to access the shapelib functions.
6783 (initwxproj): Import the c_api from the shapelib module and
6784 initialize pyshapelib_api.
6785
6786 2002-04-04 Bernhard Herzog <[email protected]>
6787
6788 * setup.py (thuban_bdist_rpm.initialize_options): Use
6789 initialize_options to create the scripts for the rpm.
6790
6791 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
6792
6793 2002-04-03 Bernhard Herzog <[email protected]>
6794
6795 * setup.py: Increment version to 0.1.1
6796
6797 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
6798 Layer" and "Remove Layer" commands from the layer menu to the map
6799 menu
6800
6801 2002-02-15 Bernhard Herzog <[email protected]>
6802
6803 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
6804 argument (python <= 1.5.2 erroneously accepted multiuple
6805 arguments)
6806
6807 2002-02-04 Bernhard Herzog <[email protected]>
6808
6809 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
6810 RecordGrid in the identifyview.
6811 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
6812 IdentifyListCtrl. The grid allows editing of the values.
6813
6814 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
6815 implementing a grid for a single row of a thuban table.
6816
6817 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
6818 layers by default. Easier to use than the previous default of only
6819 searching through the select layer which meant that if no layer
6820 was selected, you couldn't select a shape.
6821
6822 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
6823
6824 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
6825 stroke_width attribute
6826
6827 * Thuban/Model/save.py (save_session): Write the new stroke_width
6828 attribute
6829
6830 * Thuban/Model/load.py (ProcessSession.startElement): Read the
6831 stroke_width attribute
6832
6833 * Thuban/Model/layer.py (Layer.__init__): New parameter and
6834 instance variable stroke_width
6835 (Layer.SetStrokeWidth): Set the stroke_width.
6836
6837 2002-02-01 Bernhard Herzog <[email protected]>
6838
6839 * extensions/thuban/wxproj.cpp (project_points): Fix two
6840 off-by-one errors in the last loop that joins the various parts
6841 together.
6842
6843 2002-01-14 Bernhard Herzog <[email protected]>
6844
6845 * setup.py (data_dist.make_distribution): Fix some typos
6846
6847 2001-09-18 Bernhard Herzog <[email protected]>
6848
6849 * README: Slight tweaking in preparation for the 0.1 release
6850
6851 * setup.cfg: Add section for sdist to create both tgz and zip
6852 archives
6853
6854 * setup.py: increase version number to 0.1
6855 (data_dist): New command class for data distribution
6856
6857 2001-09-14 Bernhard Herzog <[email protected]>
6858
6859 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
6860 Handle the case of no layer (i.e. layer is None) properly.
6861
6862 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
6863 Set the initial selection of the combo boxes to reflect the
6864 projection we're starting with in a way that works on windows,
6865 too.
6866
6867 * Thuban/Lib/connector.py (Connector.print_connections): Print the
6868 puiblisher's ids in hex to make it easier to compare them to the
6869 standard repr of python methods
6870
6871 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
6872 messages
6873
6874 2001-09-13 Bernhard Herzog <[email protected]>
6875
6876 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
6877 deselect the layer if no layer is selected
6878
6879 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
6880 idle time when there actually is something to draw. If there's
6881 nothing to draw simply clear the window
6882 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
6883 (MapCanvas.SetMap): force a redraw in all cases because
6884 FitMapToWindow doesn't always do it.
6885 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
6886 specify the point to move into the center of the window
6887 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
6888 dragged, zoon in/out by a factor of 2
6889 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
6890 index, i.e. reversed drawing order) so that objects appearing to
6891 be in from of others are selected first. This is probably mostly
6892 relevant for point shapes where the symbols used may overlap
6893
6894 * Thuban/Model/session.py (create_empty_session): Unset the
6895 modified bit before returning it
6896
6897 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
6898 create_empty_session session to create the new, empty session.
6899
6900 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
6901 the tool bitmaps.
6902 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
6903 the code that asks whether the session should be saved into the
6904 new method save_modified_session.
6905 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
6906 method to save modified session here too.
6907
6908 2001-09-11 Bernhard Herzog <[email protected]>
6909
6910 * setup.py (InnoIconItem): fix typo
6911
6912 (thuban_bdist_inno.run):
6913 (bdist_inno.run): Move the decision not to create symlinks on
6914 non-nt platforms to thuban_bdist_inno and do it unconditinally
6915 since we never want to create the symlinks here
6916
6917 2001-09-10 Bernhard Herzog <[email protected]>
6918
6919 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
6920 identify view immediately
6921
6922 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
6923 and SelectableRecordListCtrl that implement the code shared by the
6924 identify view and the label dialog
6925
6926 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
6927 new class RecordListCtrl
6928
6929 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
6930 return value of GetValue is None instead of using it as a boolean
6931 directly so that Zero numbers are handled properly.
6932 (LabelListCtrl): Derive from the new class
6933 SelectableRecordListCtrl
6934
6935 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
6936 (Proj4Dialog.dialogLayout): Make the window resizable and set the
6937 size of the text control explicitly to make the sizers work on
6938 both Windows and X.
6939
6940 2001-09-07 Bernhard Herzog <[email protected]>
6941
6942 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
6943 that can limit the search to the currently selected layer.
6944 (MapCanvas.SelectShapeAt): Make sure that the currently selected
6945 layer stays selected even when no shape is found
6946 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
6947 height do nothing (avoids zero division errors)
6948
6949 2001-09-06 Bernhard Herzog <[email protected]>
6950
6951 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
6952 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
6953 convenient :-)
6954 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
6955 a new instvar layer_to_item to map layers to tree items
6956 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
6957 to match the current selection in the interactor
6958
6959 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
6960 (Interactor.HasSelectedLayer): New methods to query the current
6961 selection
6962
6963 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
6964 (MainWindow.has_selected_layer): Simply call the appropriate
6965 interactor method
6966
6967 * Thuban/UI/mainwindow.py (MainWindow.__init__):
6968 (MainWindow.LayerShowTable):
6969 (MainWindow.identify_view_on_demand): Store the interactor in an
6970 instvar and use that reference instead of going through main.app
6971
6972 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
6973 * Thuban/UI/application.py (ThubanApplication.OnInit):
6974 * Thuban/UI/main.py (main): Create the session tree view in main
6975 with the new mainwindow method ShowSessionTree and not directly
6976 the application's OnInit method
6977
6978 * Thuban/UI/tree.py (myTreeCtrlPanel):
6979 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
6980 TreeCtrl isntead of a panel. This affects most method since we now
6981 refer to self instead of self.tree
6982 (SessionTreeView): New class implementing a non-modal dialog
6983 showing the session tree.
6984
6985 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
6986 layer to the tableview dialog.
6987
6988 * Thuban/UI/tableview.py: Add some doc-strings
6989 (TableGrid):
6990 (TableGrid.OnRangeSelect):
6991 (TableGrid.OnSelectCell):
6992 (TableFrame.__init__):
6993 (TableFrame.row_selected):
6994 Selecting rows in the grid view now updates the selected shapes
6995 through the TableFrame. To achieve this we derive TableGrid from
6996 Publisher and introduce the message type ROW_SELECTED which the
6997 TableFrame subscribes to and which is issued by OnRangeSelect and
6998 OnSelectCell
6999
7000 (DataTable.SelectRow): Removed because it's no longer needed in
7001 the row/shape selection scheme
7002
7003 * Thuban/UI/dialogs.py: New file implementing common classes for
7004 dialogs
7005
7006 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
7007 the SELECTED_SHAPE message anymore. This is now handled by the
7008 parent.
7009 (TableGrid.select_shape): Only update the selection if the shape
7010 is not None.
7011 (TableFrame): Inherit from the new NonModalDialog class.
7012 (TableFrame.__init__, TableFrame.select_shape): Handle the
7013 SELECT_SHAPE message.
7014 (TableFrame.OnClose): Extend the inherited method to unsubscribe
7015 SELECT_SHAPE
7016
7017 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
7018 (MainWindow.add_dialog):
7019 (MainWindow.dialog_open):
7020 (MainWindow.remove_dialog):
7021 (MainWindow.get_open_dialog): New methods to maintain a dictionary
7022 of opened non-modal dialogs.
7023
7024 (MainWindow.__init__): Initialize the new non-modal dictionary
7025 management code
7026 (MainWindow.LayerShowTable): maintain separate dialogs for each
7027 table using the non-modal dialog management code to only open a
7028 view once for each table.
7029
7030 (MainWindow.IdentifyTool):
7031 (MainWindow.__init__):
7032 (MainWindow.identify_view_on_demand): Don't open the identify view
7033 in IdentifyTool anymore. This will be done automatically by the
7034 new method identify_view_on_demand which handles the
7035 SELECTED_SHAPE message so that the identify view will be opened on
7036 demand
7037
7038 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
7039 the interactor argument. The SELECTED_SHAPE message is now handled
7040 by the parent.
7041 (IdentifyView.__init__): Add the interactor argument so that we
7042 can handle the SELECTED_SHAPE message here
7043 (IdentifyView.selected_shape): New method to handle the
7044 SELECTED_SHAPE messages
7045
7046 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
7047 NonModalDialog class
7048 (IdentifyView.OnClose): Extend the inherited version to
7049 unsubscribe SELECT_SHAPE
7050
7051 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
7052
7053 2001-09-05 Bernhard Herzog <[email protected]>
7054
7055 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
7056
7057 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
7058 interactor to pass through to the MapCanvas
7059
7060 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
7061 argument to the MainWindow constructor to get rid of the ugly hack
7062 that made main.app available early just so that the mapcanvas
7063 could access the interactor object.
7064
7065 2001-09-04 Bernhard Herzog <[email protected]>
7066
7067 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
7068 that runs a modal message box
7069 (MainWindow.OnClose): Use the new method
7070 (MainWindow.RemoveLayer): Just do nothing in case no layer is
7071 selected. The command should be grayed out anyway, so there's no
7072 need to pop up a message box.
7073 (MainWindow.AddLayer): Pop up a message box with an error message
7074 if the shape file can't be opened
7075
7076 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
7077 immediately. This will cause an exception in case the file can't
7078 be opened and we can display an appropriate message.
7079
7080 * MANIFEST.in: Add extensions/pyprojection/LICENSE
7081
7082 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
7083 specific bdist_rpm command.
7084
7085 * Thuban/UI/main.py: Catch ImportError exceptions when importing
7086 the locale module because it may not be available on some
7087 installations.
7088
7089 * extensions/pyprojection/LICENSE: Copy of the license text in
7090 Projection.i. Having it in a separate file makes it easier to
7091 refer to license text in e.g. RPMs
7092
7093 2001-09-03 Bernhard Herzog <[email protected]>
7094
7095 * setup.py: use wx-config instead of wxgtk-config because it's
7096 more generic
7097
7098 * setup.py (ThubanInstall.get_outputs): Add the symlink in
7099 <prefix>/bin to the outputs
7100 (ThubanInstall.link_file): New method to link files. We need this
7101 because the standard copy_files refuses to link non-existing
7102 files.
7103 (ThubanInstall.run): Remove the leading install root from the
7104 script filename if an install root was specified and use the new
7105 link_file method
7106
7107 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
7108 the window when the first layer is added to the map.
7109
7110 * setup.py (ThubanInstall.run): Honor the build root (self.root)
7111 when linking thuban.py to <prefix>/bin
7112
7113 2001-08-31 Bernhard Herzog <[email protected]>
7114
7115 * setup.py: In the setup call, the install parameters shouldn't
7116 have trailing slashes because distutils on non-posix platforms
7117 doesn't like that. The same applies to other directories like
7118 "Resources/Bitmaps"
7119
7120 In the configuration section for nt, move the wxWindows directory
7121 optins into the part clearly marked as editable.
7122
7123 (InstallLocal.initialize_options):
7124 (InstallLocal.user_options): remove the currently unused debug
7125 flag
7126 (thuban_build_py.find_all_modules): Add this method so that it
7127 works for our case of having packages and modules in one
7128 distribution as well.
7129 (ThubanInstall.initialize_options):
7130 (ThubanInstall.finalize_options):
7131 (ThubanInstall.user_options):
7132 (ThubanInstall.boolean_options): Add new options, do-symlink and
7133 extra files. Since these are the first ThubanInstall specific
7134 options, override user_options and boolean_options
7135 (ThubanInstall.run): Honor the new do-symlink and extra-files
7136 options.
7137 (ThubanInstall.get_outputs): Add to override the base-class's
7138 version and add the extra-files to the outputs
7139 (bdist_inno): New class for windows distributions with Inno Setup
7140 (InnoIconItem): Helper class for bdist_inno
7141 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
7142 this together with the appropriate parameters, to the setup call.
7143
7144 * setup.cfg (bdist_inno): added new section for the inno setup
7145 installer
7146
7147 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
7148 changing_selection to avoid recursive selection events when
7149 modifying the selection in response to a selection event.
7150 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
7151 changing the tree's selection.
7152 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
7153 we're not being called indirectly from normalize_selection.
7154
7155 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
7156 event.Check only if the command is actuall checkable.
7157 (MainWindow.__init__): Call the toolbar's Realize method to make
7158 sure that the items are actually shown
7159
7160 2001-08-28 Bernhard Herzog <[email protected]>
7161
7162 * setup.py: Fix some doc strings
7163
7164 * ChangeLog: started
7165

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26