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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26