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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1653 - (hide annotations)
Mon Aug 25 16:00:06 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 269858 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26