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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.59  
changed lines
  Added in v.1645

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26