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

Legend:
Removed from v.184  
changed lines
  Added in v.1621

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26