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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26