/[thuban]/branches/greater-ms3/thuban/ChangeLog
ViewVC logotype

Diff of /branches/greater-ms3/thuban/ChangeLog

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

revision 523 by jan, Wed Mar 12 17:08:23 2003 UTC revision 1048 by jan, Tue May 27 08:05:14 2003 UTC
# Line 1  Line 1 
1    2003-05-27  Jan-Oliver Wagner <[email protected]>
2    
3            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
4            'after' now allows to insert separators almost anywhere in the menu.
5    
6    2003-05-27  Frank Koormann  <[email protected]>
7    
8            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
9            "S" of selection box label to hint on hot key (Alt-S). Works under
10            Win32 but is ignored under GTK.
11    
12    2003-05-26  Frank Koormann  <[email protected]>
13    
14            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
15            Center Choices.
16    
17    2003-05-26  Bernhard Herzog  <[email protected]>
18    
19            Remove the Precision methods again. They're too DBF specific to be
20            part of the table interface and they're only used in table_to_dbf
21            anyway.
22            
23            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
24            fixed precision of 12 for doubles.
25            (TransientTableBase.Precision): Removed
26            (AutoTransientTable.Width): Delegate to self.table.
27    
28            * Thuban/Model/table.py (DBFTable.Precision)
29            (MemoryTable.Precision): Removed.
30            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
31            (table_to_dbf): Use a fixed precision of 12 for floats unless the
32            column object specifies something else.
33    
34            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
35            test for table_to_dbf
36    
37    2003-05-26  Bernhard Herzog  <[email protected]>
38    
39            * test/test_transientdb.py
40            (TestTransientTable.run_iceland_political_tests): Fix a comment.
41    
42    2003-05-26  Bernhard Herzog  <[email protected]>
43    
44            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
45            implementation. Mark parts of the file format strings for
46            localization.
47    
48            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
49            file and add the table to the tables managed by the session
50    
51            * test/test_session.py (TestSessionSimple.test_open_table_file):
52            New. test case for OpenTableFile
53    
54    2003-05-26  Jan-Oliver Wagner <[email protected]>
55    
56            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
57            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
58            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
59            Replace the true/false of wxWindows by True/False of Python 2.2.1.
60    
61    2003-05-26  Jan-Oliver Wagner <[email protected]>
62    
63            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
64            already a selection present, update the grid accordingly.
65    
66            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
67            resizeable and increase its initial size.
68    
69    2003-05-26  Frank Koormann  <[email protected]>
70    
71            Table export functionality
72    
73            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
74            Return width (in characters) for a column.
75            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
76            (table_to_dbf): Write table to dbf file.
77            (table_to_csv): Write table to csv file.
78    
79            * Thuban/Model/transientdb.py (TransientTableBase.Width,
80            TransientTableBase.Precision): Return column width and precision.
81    
82            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
83            or table_to_csv depending on file selection.
84    
85            * test/test_dbf_table.py:
86            Test table_to_dbf (extension of former part of test).
87    
88            * test/test_csv_table.py:
89            Test table_to_csv.
90    
91    2003-05-23  Jan-Oliver Wagner <[email protected]>
92    
93            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
94            Use QueryTableFrame instead of TableFrame.
95    
96            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
97            table window with 'Layer Table:' instead of 'Table:'.
98    
99    2003-05-23  Jan-Oliver Wagner <[email protected]>
100    
101            Give all tables a title via mix-in TitledObject.LayerShowTable
102    
103            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
104            only if it exists.
105    
106            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
107            and call its init-method with a default title. Remove Title() method.
108    
109            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
110            AutoTransientTable): mix-in TitledObject and call its init-method with
111            a default title. Remove Title() method.
112    
113    2003-05-23  Bernhard Herzog  <[email protected]>
114    
115            * Thuban/Model/session.py (Session.AddShapeStore): Define
116            AddShapeStore analogously to AddTable.
117    
118            * test/test_session.py (TestSessionSimple.test_add_shapestore):
119            New. Test for AddShapeStore
120    
121    2003-05-23  Jan-Oliver Wagner <[email protected]>
122    
123            Introducing QueryTableFrame and a very coarse ShowTable implementation.
124    
125            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
126            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
127            The latter implements the selection GUI without dependency on a layer.
128            LayerTableFrame now is derived from QueryTableFrame and connects
129            to a layer.
130    
131            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
132            implementation that still needs work.
133    
134            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
135    
136    2003-05-22  Frank Koormann  <[email protected]>
137    
138            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
139            Added "outer_join = False" as optional parameter.
140            (TransientJoinedTable.create): If outer join is true, perform a
141            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
142            the left table. Records not matching are filled with 0 / None.
143    
144            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
145            (JoinDialog.OnJoin): Consider outer join check box.
146    
147    2003-05-22  Bernhard Herzog  <[email protected]>
148    
149            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
150            somewhat safer way. Storing the traceback in a local variable can
151            lead to memory leaks
152    
153    2003-05-22  Bernhard Herzog  <[email protected]>
154    
155            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
156            the wxMessageDialog's Destroy() method.
157    
158    2003-05-22  Frank Koormann  <[email protected]>
159    
160            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
161            TransientTable.Title()
162    
163    2003-05-22  Frank Koormann  <[email protected]>
164    
165            Join Dialog, initial version.
166    
167            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
168    
169            * Thuban/UI/join.py (JoinDialog): Functional implementation of
170            former framework. Renamed Table1/Table2 to LeftTable/RightTable
171            in all occurences.
172    
173            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
174            Typo fixed.
175    
176    2003-05-22  Bernhard Herzog  <[email protected]>
177    
178            Give the tables titles so that the GUI can display more meaningful
179            names. For now the titles are fixed but depend on e.g. filenames
180            or the titles of the joined tables.
181    
182            * Thuban/Model/transientdb.py (TransientTable.Title)
183            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
184    
185            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
186    
187            * test/test_transientdb.py
188            (TestTransientTable.test_auto_transient_table_title): New. Test
189            for the Title method
190            (TestTransientTable.test_transient_joined_table)
191            (TestTransientTable.test_transient_table): Add test for the Title
192            methods
193    
194            * test/test_memory_table.py (TestMemoryTable.test_title): New.
195            Test for the Title method
196    
197            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
198            the Title method
199    
200    2003-05-22  Bernhard Herzog  <[email protected]>
201    
202            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
203            Provide a better way to destroy the layers
204            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
205            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
206            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
207            the new way to destroy the layers.
208            (TestLayer.test_derived_store): New. Test for using a layer with a
209            DerivedShapeStore
210    
211            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
212            filename if the shape store actually has one.
213    
214    2003-05-22  Bernhard Herzog  <[email protected]>
215    
216            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
217            for the filename
218    
219            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
220            for the FileName method
221            (TestDBFTableWriting.test_write): Fix spelling of filename
222    
223    2003-05-22  Thomas Koester  <[email protected]>
224    
225            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
226            from SciParam that now really is immutable.
227    
228    2003-05-22  Frank Koormann  <[email protected]>
229    
230            Layer Top/Bottom placement added to legend.
231    
232            * Thuban/UI/legend.py
233            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
234            bound to tool events.
235            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
236            New, methods binding the event methods with the map methods.
237    
238            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
239            layer at top/bottom of layer stack.
240    
241            * Resources/Bitmaps/top_layer.xpm: New button icon.
242    
243            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
244    
245    2003-05-22  Bernhard Herzog  <[email protected]>
246    
247            * Thuban/Model/session.py (Session.RemoveTable): New method to
248            remove tables
249    
250            * test/test_session.py (TestSessionSimple.test_remove_table): New.
251            Test for RemoveTable
252    
253    2003-05-22  Thomas Koester  <[email protected]>
254    
255            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
256            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
257    
258    2003-05-22  Bernhard Herzog  <[email protected]>
259    
260            Implement a way to discover dependencies between tables and
261            shapestores.
262    
263            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
264            (TransientJoinedTable.Dependencies)
265            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
266            interface
267            (TransientJoinedTable.__init__): Keep tack of the original table
268            objects in addition to the corresponding transient tables.
269    
270            * Thuban/Model/table.py (DBFTable.Dependencies)
271            (MemoryTable.Dependencies): New. Implement the dependencies
272            interface
273    
274            * Thuban/Model/data.py (ShapeTable): New. Helper class for
275            ShapefileStore
276            (ShapefileStore.__init__): Use ShapeTable instead of
277            AutoTransientTable
278            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
279            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
280            methods for filename and type
281            (ShapefileStore.Dependencies): New. Implement the dependencies
282            interface
283            (DerivedShapeStore): New class to replace SimpleStore. The main
284            difference to SimpleStore is that it depends not on a shapefile
285            but another shapestore which expresses the dependencies a bit
286            better
287            (SimpleStore.__init__): Add deprecation warning.
288    
289            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
290            Test for the Dependencies method.
291    
292            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
293            New. Test for the Dependencies method.
294    
295            * test/test_transientdb.py
296            (TestTransientTable.test_auto_transient_table_dependencies): New.
297            Test for the Dependencies method.
298            (TestTransientTable.test_transient_joined_table): Add test for the
299            Dependencies method.
300    
301            * test/test_session.py (TestSessionSimple.setUp)
302            (TestSessionSimple.tearDown): New. Implement a better way to
303            destroy the sessions.
304            (TestSessionSimple.test_initial_state)
305            (TestSessionSimple.test_add_table): Bind session to self.session
306            so that it's destroyed by tearDown
307            (TestSessionSimple.test_open_shapefile): New. Test for
308            OpenShapefile and the object it returns
309    
310    2003-05-22  Bernhard Herzog  <[email protected]>
311    
312            * Thuban/Model/session.py (Session.AddTable): New method to
313            register tables with the session.
314            (Session.Tables): Return the tables registered with AddTable too.
315    
316            * test/test_session.py (TestSessionSimple.test_add_table): New.
317            Test case for the AddTable method
318    
319    2003-05-22  Frank Koormann  <[email protected]>
320    
321            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
322            lower right corner, center labels for selections, initialize controls
323            in reasonable order for keyboard navigation.
324    
325            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
326            (ProjFrame.__DoOnProjAvail): Determine position of current projection
327            using the wxListBox.FindString() method. Still a problem (#1886)
328    
329            * Thuban/UI/classifier.py
330            (Classifier.__init__, SelectPropertiesDialog.__init__)
331    
332            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
333            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
334            different classification types from here to __init__.
335            (GenUniquePanel.__init__): Set the column width of the first field
336            in the Field ListCtrl to the full width.
337    
338            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
339            Button to 'Export'. Center Buttons in Selection Box, set Focus to
340            Grid.
341            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
342            changes focus to the Selection when pressing "Alt-S".
343    
344            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
345            the text if not visible. The italic font sometimes exceeds the
346            rendering area.
347    
348    2003-05-21  Jonathan Coles   <[email protected]>
349    
350            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
351            to OnClose so that Thuban closes correctly.
352    
353            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
354            DockFrame.OnClose, not DockFrame._OnClose.
355    
356    2003-05-21  Jonathan Coles   <[email protected]>
357    
358            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
359            references to 'inf' and use new Range __init__ to pass floats
360            directly rather than converting them to strings first.
361            Fixes RTBug #1876.
362    
363            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
364            Use new Range ___init__ to pass floats.
365    
366            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
367            filename is a valid image file. Throw IOError otherwise.
368    
369            * Thuban/Model/range.py: Brought over new Range from SciParam that
370            is immutable and has an __init__ which can accept floats.
371    
372            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
373            into try block. AddLayer doesn't throw any exceptions anymore.
374            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
375            try block.
376    
377            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
378            the first item in choices. Fixes RTBug #1882.
379    
380            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
381            has gone to 0 which is a serious problem. abort.
382            (MapRenderer.draw_raster_layer): Catch IOError seperately and
383            print the error from GDAL.
384    
385            * Thuban/UI/tableview.py (TableGrid.__init__): Call
386            ToggleEventListeners to turn on listening.
387            (TableGrid.ToggleEventListeners): New. Turns event listening on
388            and off so as to prevent excessive messages.
389            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
390            to suppress excessive messages when selecting many rows.
391            Fixes RTBug #1880.
392    
393            * Thuban/UI/view.py: Added checks against if scale == 0. This
394            is a serious problem that can occur when an image without
395            geo data is loading and causes the map projection bounds to
396            go to infinity. Right now, the solution is to simply try
397            to recover.
398    
399            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
400            to set the MFILEReceiver attributes even if the data is NULL.
401    
402            * extensions/thuban/gdalwarp.cpp: Improved the error handling
403            and passed GDAL messages back up to the Python layer. Also
404            tried to fix some memory leaks that were present in the original
405            utility but didn't matter because the program aborted.
406    
407            * test/test_range.py: Copied over tests from SciParam. Removed
408            tests against importing. Fixes RTBug #1867.
409    
410    2003-05-21  Bernhard Herzog  <[email protected]>
411    
412            * test/test_load.py: Remove unused imports and restructure the
413            test code
414            (LoadSessionTest): Split into one class for each test and turn
415            LoadSessionTest itself into the base class for all such session
416            tests.
417            (ClassificationTest): New base class for load tests that test
418            classifications
419            (TestSingleLayer, TestLayerVisibility, TestClassification)
420            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
421            for the individual tests
422    
423            * test/support.py (FileLoadTestCase.filename): New base class for
424            file loading tests
425    
426    2003-05-21  Jan-Oliver Wagner <[email protected]>
427    
428            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
429            Mercator' to 'UTM Zone 32' as a more convenient example.
430            Added 'Gauss Krueger Zone 6'.
431    
432            * Data/iceland_sample_raster.thuban: political polygon now
433            filled transparent to have the raster image visible at once.
434    
435    2003-05-21  Frank Koormann  <[email protected]>
436    
437            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
438            OnClose() to keep in sync with extensions. Internally Thuban
439            still uses "underscored" names.
440    
441    2003-05-20  Jonathan Coles   <[email protected]>
442    
443            This puts back Raster layer support. These layers support projections
444            through the GDAL library. Currently, the CVS version is being used.
445            There are no Debian packages available although this may change soon.
446            A GDAL driver was extended to support writing to memory rather to
447            files.
448    
449            There is still some work that needs to be done, such as some error
450            handling when loading invalid images or when there is a problem
451            projecting the image. This putback simply checks in the majority
452            of the work.
453    
454            * setup.py: Add gdalwarp library extension.
455    
456            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
457            Defaults to False, but can be overridden by subclasses if they
458            support classification.
459            (RasterLayer): New. Defines a new layer that represents an
460            image.
461    
462            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
463            tag handler.
464            (SessionLoader.start_layer): Encode the filename.
465            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
466            New. Supports reading a rasterlayer tag.
467    
468            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
469    
470            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
471            get a string in Latin1. If we get such as string convert it to
472            unicode first, otherwise leave if alone before encoding.
473            (SessionSaver.write_layer): Add support for writing both Layers
474            and RasterLayers.
475    
476            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
477            The right argument may not be a string, it could also be a Column.
478    
479            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
480            Make initial window size 600x400. Fixes RTBug #1872.
481    
482            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
483            the dialog is constructed so that we can support layers that
484            do not have classifications.
485            (Classifier._OnTry): Only build a classification if the layer
486            supports one.
487    
488            * Thuban/UI/legend.py: Change all checks that a layer is an
489            instance of Layer into checks against BaseLayer.
490            (LegendTree.__FillTreeLayer): Only add children to a branch if
491            the layer supports classification.
492    
493            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
494            MainWindow.OpenSession): Don't proceed with an action if the
495            user chooses Cancel when they are asked to save changes.
496            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
497            user to select an image file. Create a new RasterLayer and add
498            it to the map.
499    
500            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
501            for rendering RasterLayer layers.
502            (MapRenderer.draw_raster_layer): Actually method that calls
503            the GDALWarp python wrapper and constructs an image from the
504            data returned.
505    
506            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
507            Choices symbols to match those used in the table query method.
508            Replace deprecated method calls on table with new method names.
509    
510            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
511            how small the scale can get. This still needs more testing.
512    
513            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
514            Provides a driver to output in .bmp format.
515    
516            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
517            New. Provides IO routines which write to memory, rather than a file.
518    
519            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
520            of the gdalwarp utility provided in GDAL. Added function calls
521            that can be accessed from python.
522    
523            * Data/iceland_sample_raster.thuban: New. Sample file that uses
524            a raster layer.
525    
526            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
527            layer image data.
528    
529            * Doc/thuban.dtd: Added rasterlayer attribute definition.
530    
531            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
532            tests associated with the raster layer code.
533    
534            * test/test_transientdb.py
535            (TestTransientTable.test_auto_transient_table_query): Added a test
536            for using a Column object as the "right" parameter to a query.
537    
538    2003-05-19  Frank Koormann  <[email protected]>
539    
540            * Thuban/version.py (get_changelog_date):
541            Catch exceptions if ChangeLog does not exist.
542    
543            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
544    
545    2003-05-19  Frank Koormann  <[email protected]>
546    
547            Extended version information for Thuban
548    
549            * Thuban/version.py: New, version information for Thuban: Last
550            modification date and last ChangeLog entry date.
551    
552            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
553            information: Display Thuban, wxPython and Python version.
554    
555    2003-05-16  Bernhard Herzog  <[email protected]>
556    
557            * Thuban/Model/save.py: Remove some unused imports including the
558            __future__ import for nested_scopes as Thuban relies on Python 2.2
559            now.
560            (XMLWriter.encode): Remove the special case for a None argument.
561            In the saver encode is always called with a string argument.
562    
563    2003-05-16  Bernhard Herzog  <[email protected]>
564    
565            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
566            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
567            of the bug was that e.g. float("1.2") would fail. Thuban now
568            requires 2.4.x.
569            
570    2003-05-16  Frank Koormann   <[email protected]>
571    
572            Printing enhancement and WMF export (under Win32)
573    
574            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
575            ScreenRenderer. Renders Map, Legend and Scalebar for export.
576            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
577            PrintRender.
578    
579            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
580            to fullfil information needed for PrinterRenderer.
581            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
582            (MapCanvas.Print): Adapted to new MapPrintout.
583            (OutputTransform): General calculations to transform from canvas
584            coordinates to export/printing devices.
585    
586            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
587            new method_command to call ExportMap, with platform dependency (only
588            __WXMSW__)
589      
590            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
591            of scalebar drawing area as new parameters.
592            
593            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
594    
595            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
596            Update to extended scalebar.DrawScalebar header.
597    
598            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
599    
600            * test/test_scalebar.py: Made test executable as standalone.
601    
602    2003-05-16  Bernhard Herzog  <[email protected]>
603    
604            * Thuban/Model/table.py (Table): Remove this compatibility alias
605            for DBFTable.
606    
607            * test/test_table.py: Import DBFTable as Table because that alias
608            doesn't exist anymore.
609    
610            * Thuban/UI/classgen.py: Remove some unused imports
611    
612    2003-05-14  Jonathan Coles   <[email protected]>
613    
614            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
615            Fix docstring.
616            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
617            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
618            values of the supplied range to determine the beginning and end
619            bounds of the generated classes.
620    
621            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
622            do not have a leading 0 (.5 is now accepted as well as 0.5).
623    
624            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
625            call to ClassGenerator.GenUniformDistribution.
626    
627            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
628            layout bug with the 'Projection' label.
629    
630            * test/support.py (FloatTestCase): New. Needed for the Range tests.
631    
632            * test/test_range.py: New. Imported from SciParam.
633    
634    2003-05-12  Jonathan Coles   <[email protected]>
635    
636            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
637            to table.UniqueValues() with calls that retrieve all the values
638            from the table. This will need to be replaced by a method on table
639            which can simply return the list (perhaps more efficiently).
640    
641    2003-05-12  Jonathan Coles   <[email protected]>
642    
643            The return value of ClassGenerator.CalculateQuantiles has changed.
644            Refer to the documentation for details.
645    
646            * test/test_classgen.py: Modified Quantile tests to use the
647            new return values.
648    
649            * Thuban/Model/classgen.py
650            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
651            use new return values from CalculateQuantiles to produce the correct
652            range bounds in the Classification.
653            (ClassGenerator.CalculateQuantiles): Add more comments describing
654            the return values and parameters. Make minor adjustments to improve
655            the legibility of the code. Fix problem with adjusted not being set
656            in most cases.
657    
658    2003-05-12  Frank Koormann <[email protected]>
659            
660            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
661            and latin1. Fixes #1851 finally.
662    
663    2003-05-09  Jonathan Coles   <[email protected]>
664    
665            * test/test_classgen.py: New. Tests the Quantile algorithm.
666    
667            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
668            Clean up debugging statement, add comments, fix a small bug in the
669            returned adjusted percentiles.
670            
671    2003-05-09  Jonathan Coles   <[email protected]>
672    
673            Introduces Range class from SciParam into the ClassGroupRange class,
674            and such ranges can now be saved and loaded from disk.
675    
676            Quantiles are now available in the Classification Generator.
677    
678            Initial support for building Queries on a table. Doesn't do anything
679            but run some tests.
680    
681            * Thuban/Model/classification.py: Explicit imports.
682            (ClassGroupRange): Use the Range class to store the underlying
683            range information. The interface remains the same, except for
684            GetRange(), and you can also supply a Range object as the min
685            parameter to SetRange or __init__.
686    
687            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
688            string appropriately for use in Thuban. Fixes RTbug #1851.
689            (SessionLoader.end_projection): Handle the context of the
690            projection tag a bit better by looking at what objects are not
691            None. There was an assumption that a projection tag for a map
692            could occur before any layers.
693            (SessionLoader.start_clrange): Provide backward compatibility for
694            reading min/max values as well as the new range parameter.
695    
696            * Thuban/Model/map.py: Explicit imports.
697    
698            * Thuban/Model/resource.py: Import _.
699            (ProjFileSaver.write): write header using projfile.dtd.
700    
701            * Thuban/Model/save.py: Explicit imports.
702            (XMLWriter.encode): New. Encode the given string from a format
703            used by Thuban into UTF-8. Fixes RTbug #1851.
704    
705            * Thuban/UI/classgen.py: Explicit imports.
706            (ClassGenDialog.__init__): Clean up the code and add support
707            for Quantiles.
708            (ClassGenDialog.OnOK): Add support for Quantiles.
709            (GenQuantilesPanel): New. Input panel for Quantiles.
710            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
711            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
712    
713            * Thuban/Model/classgen.py: New. Contains all the classes named above.
714    
715            * Thuban/UI/classifier.py: Explicit imports.
716            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
717            ClassTable.SetValueAsCustom): Reworked to use new Range class.
718    
719            * Thuban/UI/legend.py: Explicit imports.
720    
721            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
722            a Table menu and associated method calls.
723            (MainWindow.choose_color): Removed. No longer needed.
724    
725            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
726            should be disabled if no projection is selected in the available
727            list.
728    
729            * Thuban/UI/renderer.py: Explicit imports.
730    
731            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
732            with correctly selecting the rows and issuing the right events.
733            Be sure to call Skip() to allow the grid to do some of its own
734            handling which allows the rows to actually be selected.
735            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
736            selecting multiple shapes.
737            (LayerTableFrame): Support for building Queries.
738            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
739    
740            * Thuban/UI/tree.py: Explicit imports.
741    
742            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
743            table view can call it.
744    
745            * test/test_classification.py: Explicit imports.
746            (TestClassification.test_ClassGroupRange): Fix test for new
747            Range class.
748    
749            * Doc/thuban.dtd: Add range parameter for clrange.
750    
751            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
752            object in ClassGroupRange, and also uesd for inputting ranges in
753            the classifer table and elsewhere.
754    
755            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
756            yet.
757    
758    2003-05-09  Frank Koormann <[email protected]>
759    
760            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
761    
762    2003-05-08  Frank Koormann <[email protected]>
763    
764            Coding style updates
765    
766            * test/test_scalebar.py: Replaced tab indentation by spaces.
767    
768            * Thuban/UI/scalebar.py: Explicit imports.
769    
770    2003-05-08  Frank Koormann <[email protected]>
771    
772            * Thuban/UI/scalebar.py
773            (ScaleBar.DrawScalebar): Format string bug fixed.
774    
775    2003-05-08  Frank Koormann <[email protected]>
776    
777            Reorganization of scalebar component (no wx in Thuban/Model)
778    
779            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
780            (deriveInterval):
781            Calculate scalebar interval and unit which fits in width for scale.
782            (roundInterval): Round float.
783    
784            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
785    
786            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
787    
788            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
789    
790    2003-05-08  Frank Koormann <[email protected]>
791    
792            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
793            Initialize ScaleBar with canvas.map
794    
795            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
796            round intervals to display smarter lengths
797            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
798            layer. If the maps has no projection applied grey the scalebar.
799    
800    2003-05-07  Frank Koormann <[email protected]>
801            
802            Basic Scalebar features added.
803    
804            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
805    
806            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
807            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
808            and the renderer.
809    
810            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
811    
812            * Thuban/UI/messages.py: SCALE_CHANGED added.
813    
814    2003-05-07  Bernhard Herzog  <[email protected]>
815    
816            * Thuban/Model/session.py (Session.__init__): New instance
817            variable shapestores to hold a list of all open shapestore objects
818            (Session.ShapeStores): New. Accessor method for the shapestores
819            list.
820            (Session._add_shapestore, Session._clean_weak_store_refs): New.
821            Internal methods to maintain the shapestores list.
822            (Session.Tables): New. Return all tables open in the session.
823            (Session.OpenShapefile): Insert the new ShapeStore into the
824            shapestores list.
825    
826            * test/test_session.py (TestSessionSimple.test_initial_state): Add
827            tests for ShapeStores and Tables
828            (TestSessionWithContent.test_shape_stores)
829            (TestSessionWithContent.test_tables): New. Test cases for
830            ShapeStores and Tables
831    
832    2003-05-07  Bernhard Herzog  <[email protected]>
833    
834            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
835            Add comments about the optimizations used.
836            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
837            Implement the ReadValue table interface method.
838    
839            * test/test_transientdb.py
840            (TestTransientTable.run_iceland_political_tests)
841            (TestTransientTable.test_transient_joined_table): Add tests for
842            ReadValue
843    
844    2003-05-07  Frank Koormann <[email protected]>
845    
846            * Resources/Bitmaps/fulllayerextent.xpm,
847            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
848            new icons.
849    
850    2003-05-06  Bernhard Herzog  <[email protected]>
851    
852            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
853            New. Simply delegate to the transient table's version.
854    
855            * test/test_transientdb.py
856            (TestTransientTable.test_auto_transient_table_query): New. Test
857            case for AutoTransientTable's SimpleQuery
858    
859    2003-05-06  Bernhard Herzog  <[email protected]>
860    
861            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
862            Implement a simple query method for the query dialog
863            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
864            the row index or shapeid.
865            (TransientTable.create): Insert the right value of the row index
866            (TransientJoinedTable.create): Copy the row index of the left
867            table to the joined result table
868    
869            * test/test_transientdb.py
870            (TestTransientTable.test_transient_table_read_twice): Fix
871            doc-string
872            (TestTransientTable.test_transient_table_query): New. Test for the
873            SimpleQuery method
874    
875    2003-05-06  Bernhard Herzog  <[email protected]>
876    
877            Convert all table users to use the new table interface. This only
878            covers Thuban itself, not GREAT-ER or other applications built on
879            Thuban yet, so the compatibility interface stays in place for the
880            time being but it now issues DeprecationWarnings.
881    
882            Finally, the new Table interface has a new method, HasColumn.
883    
884            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
885            issue deprecation warnings when they're. The warnings refer to the
886            caller of the method.
887            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
888            for the deprecation warnings
889    
890            * test/test_table.py: Ignore the deprecation warnings for the old
891            table in the tests in this module. The purpose of the tests is to
892            test the old interface, after all.
893    
894            * test/test_transientdb.py
895            (TestTransientTable.run_iceland_political_tests): Use the
896            constants for the types. Add a test for HasColumn
897            (TestTransientTable.test_transient_joined_table): Adapt to new
898            table interface. Add a test for HasColumn
899            (TestTransientTable.test_transient_table_read_twice): Adapt to new
900            table interface
901    
902            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
903            Adapt to new table interface
904    
905            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
906            new table interface
907    
908            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
909            (RecordTable.SetTable): Adapt to new table interface
910    
911            * Thuban/UI/classifier.py (Classifier.__init__)
912            (Classifier.__init__): Adapt to new table interface
913    
914            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
915            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
916            to new table interface
917    
918            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
919            (AutoTransientTable.HasColumn): Implement the new table interface
920            method
921            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
922            (AutoTransientTable.UniqueValues): Adapt to new table interface
923    
924            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
925            Adapt to new table interface
926    
927            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
928            simplify opening shapefiles a bit easier.
929            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
930            (TestLayer.test_point_layer): Use the new helper method
931            (TestLayer.test_get_field_type): New. Test for the GetFieldType
932            method
933    
934            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
935            the new table method
936    
937            * test/test_memory_table.py (TestMemoryTable.test_has_column):
938            Test for the new table method HasColumn
939    
940    2003-05-06  Jonathan Coles   <[email protected]>
941    
942            Addresses the "Selection Extent" wish of RTbug #1787.
943    
944            * Resources/Bitmaps/fulllayerextent.xpm,
945            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
946            extent. These are just place holders for the real bitmaps.
947    
948            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
949            calculate the bounding box once (the first time compute_bbox() is
950            called).
951            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
952            the bounding box for the shapes in lat/long coordinates.
953    
954            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
955            option.
956            (MainWindow.has_selected_shapes): New. Returns true if there are
957            any selected shapes.
958            (MainWindow.FullSelectionExtent): New. Calls
959            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
960            (_has_selected_shapes): New. Returns true if there are any
961            selected shapes.
962    
963            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
964            true if there are any selected shapes.
965    
966            * Thuban/UI/view.py (MapCanvas): Added delegated method
967            HasSelectedShapes.
968            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
969            shapes on the canvas using the map projection (if any).
970    
971            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
972            for Layer.ShapesBoundingBox().
973    
974    2003-05-06  Bernhard Herzog  <[email protected]>
975    
976            * Resources/Projections/defaults.proj: Fix spelling of Mercator
977    
978    2003-05-05  Jonathan Coles   <[email protected]>
979    
980            Addresses the "Full Layer Extent" wish of RTbug #1787.
981    
982            * Resources/Projections/defaults.proj: Added UK National Grid.
983    
984            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
985            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
986            when the user selects the menu option.
987    
988            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
989            scales the given layer on the canvas using the map projection.
990    
991    2003-05-05  Bernhard Herzog  <[email protected]>
992    
993            Convert the table implementations to a new table interface. All
994            tables use a common mixin class to provide backwards compatibility
995            until all table users have been updated.
996    
997            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
998            provide backwards compatibility for table classes implementing the
999            new interface
1000            (DBFTable, MemoryTable): Implement the new table interface. Use
1001            OldTableInterfaceMixin as base for compatibility
1002            (DBFColumn, MemoryColumn): New. Column description for DBFTable
1003            and MemoryTable resp.
1004    
1005            * test/test_dbf_table.py: New. Test cases for the DBFTable with
1006            the new table interface.
1007    
1008            * test/test_memory_table.py: New. Test cases for the MemoryTable
1009            with the new table interface.
1010    
1011            * test/test_table.py: Document the all tests in this file as only
1012            for backwards compatibility. The equivalent tests for the new
1013            interface are in test_memory_table.py and test_dbf_table.py
1014            (MemoryTableTest.test_read): field_info should be returning tuples
1015            with four items
1016            (MemoryTableTest.test_write): Make doc-string a more precise.
1017    
1018            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
1019            table interface. Derive from from OldTableInterfaceMixin for
1020            compatibility.
1021            (TransientTableBase.create): New intance variable column_map to
1022            map from names and indices to column objects
1023            (TransientTable.create): Use the new table interface of the input
1024            table
1025            (AutoTransientTable): Convert to new table interface. Derive from
1026            from OldTableInterfaceMixin for compatibility.
1027            (AutoTransientTable.write_record): Removed. It's not implemented
1028            yet and we still have to decide how to handle writing with the new
1029            table and data framework.
1030    
1031            * test/test_transientdb.py
1032            (TestTransientTable.run_iceland_political_tests)
1033            (TestTransientTable.test_transient_joined_table): Use the new
1034            table interface
1035    
1036    2003-05-05  Jonathan Coles   <[email protected]>
1037    
1038            This is namely a collection of UI updates to improve user interactivity.
1039            Tabbing between controls now exists and you can use ESC to close dialog
1040            boxes; ENTER will active the default button.
1041    
1042            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
1043            order that the controls are created so that tabbing works correctly.
1044            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
1045            wxDialog can handle the default button correctly.
1046            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
1047            same reasons as for OnOK.
1048            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
1049            when we ask the table for the maximum/minimum values of a field
1050            which could take a very long time.
1051    
1052            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
1053            order that the controls are created so that tabbing works correctly.
1054            (SelectPropertiesDialog.__init__): Rearrange the order that the
1055            controls are created so that tabbing works correctly.
1056    
1057            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
1058            to derive from a wxDialog but behave like the original implementation
1059            which was derived from a wxFrame. wxDialog provides useful key
1060            handling functionality like ESC calling OnCancel and ENTER calling
1061            OnOK which is lost with wxFrame.
1062    
1063            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
1064            new dialogs.
1065    
1066            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
1067            order that the controls are created so that tabbing works correctly.
1068            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
1069            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
1070            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
1071            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
1072            can provide the "UK National Grid" as a default projection.
1073            (UTMPanel.__init__): Rearrange the order that the controls are
1074            created so that tabbing works correctly.
1075    
1076    2003-05-05  Bernhard Herzog  <[email protected]>
1077    
1078            * extensions/thuban/wxproj.cpp: Fix some of the comments.
1079            (project_point): If a map projection but no layer projection is
1080            given, convert degrees to radians before applying the map
1081            projection.
1082    
1083            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
1084            (TableGrid.allow_messages): New methods to make it possible to
1085            inhibit message sending.
1086            (TableGrid.issue): Only send the message if not inhibited.
1087            (LayerTableGrid.select_shape): Use the new methods to make sure
1088            that no ROW_SELECTED message is sent while we're updating the
1089            selected rows to match the selected shapes.
1090    
1091    2003-05-02  Jan-Oliver Wagner <[email protected]>
1092    
1093            Implementation of MemoryTable.
1094    
1095            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
1096            implementation that operates on a list of tuples. All of the data
1097            are kept in the memory.
1098    
1099            * test/test_table.py (MemoryTableTest): New.
1100    
1101            * test/test_transientdb.py (SimpleTable): Removed.
1102            (TestTransientTable.test_transient_joined_table,
1103            (TestTransientTable.test_transient_table_read_twice): Replaced
1104            SimpleTable by MemoryTable.
1105    
1106    2003-04-30  Jonathan Coles   <[email protected]>
1107    
1108            * Data/iceland_sample.thuban: Now contains correct projections
1109            for each of the layers.
1110    
1111            * Resources/Projections/defaults.proj: Geographic projection
1112            contains unit conversion parameter.
1113    
1114    2003-04-30  Jonathan Coles   <[email protected]>
1115    
1116            The most important part of this putback is the projection changes.
1117            It should now be possible to specify the projection that a layer
1118            is in and then specify a different projection for the map. The
1119            projection dialog has an extra parameter for a geographic projection
1120            which lets the user select if the input is in degrees or radians.
1121    
1122            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
1123            to say that the parameter is a tuple of unprojected
1124            points (which is what the callers to this method were assuming).
1125            Also, since the points are unprojected we need to projected them.
1126    
1127            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
1128            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
1129            groups are selected, move the layer up/down. Fixes RTbug #1833.
1130    
1131            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
1132    
1133            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
1134            parameter in call to SetClientData.
1135            (GeoPanel): Add support for selecting the units that the
1136            source data is in (Radians or Degrees).
1137    
1138            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
1139            the rendering loop by reducing the number of if's, removing the
1140            unnecessary try/except block, and checking if the old group
1141            is the same as the new one (which happens a lot if there is
1142            no classification, or lots of shapes are in the same group).
1143    
1144            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
1145            around the redraw routine to try to catch problems that the user
1146            may create by selecting invalid projections for the data set and
1147            map. Clears the display if there are any problems and prints the
1148            error.
1149            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
1150            rectangle.
1151    
1152            * extensions/thuban/wxproj.cpp (project_point): First invert the
1153            supplied point (which should be in projected coordinates) using
1154            the layer's projection and then project the point using the
1155            map's projection.
1156            (project_points): Use project_point() to project each point.
1157    
1158    2003-04-30  Jan-Oliver Wagner <[email protected]>
1159    
1160            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
1161            don't set the Classification to None if the classfication field
1162            is None (ie only a DEFAULT).
1163    
1164    2003-04-30  Bernhard Herzog  <[email protected]>
1165    
1166            * Thuban/UI/view.py: Fix some typos.
1167    
1168            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
1169            not pop up the dialog if the selection becomes empty (this could
1170            happen if e.g. a new selection is opened while the identify tool
1171            is active and dialog had been closed)
1172    
1173    2003-04-30  Bernhard Herzog  <[email protected]>
1174    
1175            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
1176            instance variable read_record_last_result
1177            (TransientTableBase.read_record): Make sure reading the same
1178            record twice works. The implementation uses the new instance
1179            variable read_record_last_result
1180    
1181            * test/test_transientdb.py
1182            (TestTransientTable.test_transient_table_read_twice): New test
1183            case for the above bug-fix.
1184    
1185    2003-04-29  Jonathan Coles   <[email protected]>
1186    
1187            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
1188    
1189            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
1190    
1191            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
1192            (ClassTable.SetValueAsCustom): Rename keyword argument in
1193            ClassGroup* constructors to match argument name.
1194    
1195    2003-04-29  Bernhard Herzog  <[email protected]>
1196    
1197            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
1198            transient DB if it exists to make sure it doesn't leave a journal
1199            file in the temp directory.
1200    
1201            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
1202            self.conn to None after closing the connection to make sure it's
1203            not closed twice
1204    
1205    2003-04-29  Jonathan Coles   <[email protected]>
1206    
1207            Add a visible parameter in the layer XML tag. The default value is
1208            "true". If anything other than "false" is specified we also assume
1209            "true". Addresses RTbug #1025.
1210    
1211            * Doc/thuban.dtd: Add visible parameter to a layer.
1212    
1213            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
1214            of visible from 1 to True.
1215            (Layer.__init__): Change default value of visible from 1 to True.
1216    
1217            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
1218            parameter.
1219    
1220            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
1221            parameter.
1222    
1223            * test/test_load.py: Add new test data contents_test_visible.
1224            (LoadSessionTest.setUp): save test data.
1225            (LoadSessionTest.testLayerVisibility): Test if the visible flag
1226            is loaded correctly.
1227    
1228            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
1229            for saving an invisible layer.
1230    
1231    2003-04-29  Jonathan Coles   <[email protected]>
1232    
1233            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
1234            legend dialog box and tell it to change its map to the one
1235            supplied to SetMap(). Fixes RTbug #1770.
1236    
1237    2003-04-29  Bernhard Herzog  <[email protected]>
1238    
1239            Next step of table implementation. Introduce a transient database
1240            using SQLite that some of the data is copied to on demand. This
1241            allows us to do joins and other operations that require an index
1242            for good performance with reasonable efficiency. Thuban now needs
1243            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
1244            haven't tested that.
1245            
1246            * Thuban/Model/transientdb.py: New. Transient database
1247            implementation.
1248    
1249            * test/test_transientdb.py: New. Tests for the transient DB
1250            classes.
1251    
1252            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
1253            classes to help automatically remove temporary files and
1254            directories.
1255            (Session.__init__): New instance variables temp_dir for the
1256            temporary directory and transient_db for the SQLite database
1257            (Session.temp_directory): New. Create a temporary directory if not
1258            yet done and return its name. Use AutoRemoveDir to have it
1259            automatically deleted
1260            (Session.TransientDB): Instantiate the transient database if not
1261            done yet and return it.
1262    
1263            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
1264            AutoTransientTable so that data is copied to the transient DB on
1265            demand.
1266            (SimpleStore): New class that simply combines a table and a
1267            shapefile
1268    
1269            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
1270            DBFTable and update its doc-string to reflect the fact that this
1271            is only the table interface to a DBF file. Table is now an alias
1272            for DBFTable for temporary backwards compatibility.
1273    
1274            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
1275            the last reference to the session goes away so that the temporary
1276            files are removed properly.
1277    
1278            * test/test_load.py (LoadSessionTest.tearDown): Remove the
1279            reference to the session to make sure the temporary files are
1280            removed.
1281    
1282    2003-04-29  Bernhard Herzog  <[email protected]>
1283    
1284            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
1285            the __parser instance variable into a normal local variable in
1286            read. It's only used there and read will never be called more than
1287            once. Plus it introduces a reference cycle that keeps can keep the
1288            session object alive for a long time.
1289    
1290    2003-04-29  Jonathan Coles   <[email protected]>
1291    
1292            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
1293            Projection an immutable item. Fixes RTbug #1825.
1294            (Projection.__init__): Initialize instance variables here.
1295            (ProjFile.Replace): New. Replace the given projection object with
1296            the new projection object. This solves the problem of needing the
1297            mutator Projection.SetProjection() in the ProjFrame class and
1298            allows a projection to change parameters without changing its
1299            location in the file.
1300    
1301            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
1302            be of type wxSAVE and should verify overwriting a file.
1303    
1304            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
1305            ProjFile.Replace() method instead of the mutator
1306            Projection.SetProjection(). Also requires that we reassign the
1307            client data to the new projection.
1308    
1309            * test/test_proj.py (TestProjection.test): Test GetName() and
1310            GetAllParameters()
1311            (TestProjFile.test): Remove tests for Set*() methods. Add tests
1312            for Replace().
1313    
1314    2003-04-25  Jonathan Coles   <[email protected]>
1315    
1316            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
1317            to save the name of the projection.
1318    
1319            * test/test_save.py (SaveSessionTest.testLayerProjection): New
1320            test to verify layer projections are saved correctly.
1321    
1322    2003-04-25  Jonathan Coles   <[email protected]>
1323    
1324            * Thuban/Model/proj.py (Projection.SetName): Set the name
1325            to "Unknown" if name is None.
1326            (Projection.SetAllParameters): New. Set the projection's
1327            parameter list to the one supplied.
1328            (Projection.SetProjection): New. Set the projection's
1329            properties to those of the supplied Projection.
1330    
1331            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
1332            the dialog title to include the map's title.
1333            (MainWindow.LayerProjection): Set the dialog title to include
1334            the layer's title.
1335    
1336            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
1337            error dialogs into a single method call.
1338            (ProjFrame.__VerifyButtons): Add more states to check.
1339            (ProjFrame.__GetProjection): Return the current state of an
1340            edited projection or None.
1341            (ProjFrame.__FillAvailList): Remove checks for states that
1342            shouldn't exist.
1343            (ProjFrame._OnNew): Clear all selected items and supply
1344            a projection panel if necessary.
1345    
1346            * test/test_proj.py (TestProjFile.test): Add tests for
1347            ProjFile.SetAllParameters, ProjFile.SetProjection,
1348            ProjFile.SetName.
1349    
1350    2003-04-25  Jonathan Coles   <[email protected]>
1351    
1352            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
1353            takes an optional argument to select the current projection.
1354            This does not guarantee that the item is visible due to
1355            limited wxWindows functionality. Fixes RTBug #1821.
1356    
1357    2003-04-25  Jonathan Coles   <[email protected]>
1358    
1359            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1360            the projection name and use it when constructing the Projection
1361            object.
1362    
1363            * Thuban/Model/proj.py (Projection.__init__): Change the default
1364            value for 'name' to None and then test if name is equal to None
1365            in the body of the constructor. This way the caller doesn't have to
1366            know what the default value should be. Namely, useful in load.py
1367            where we have to pick a default value if the 'name' parameter
1368            doesn't exist in the XML file.
1369    
1370            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1371            Tests a file where a layer has a projection.
1372    
1373    2003-04-25  Jonathan Coles   <[email protected]>
1374    
1375            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1376            tree for projection information.
1377    
1378            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1379            XMLReader.GetFileName.
1380            (SessionLoader): Added support for loading projection tags that
1381            appear inside a layer.
1382    
1383            * Thuban/Model/proj.py (ProjFile): Document the class. Move
1384            back to using a list because the order of the projections in
1385            the file is important to maintain. Fixes RTbug #1817.
1386    
1387            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1388            to ProjFile.GetFilename.
1389    
1390            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1391            information.
1392    
1393            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1394            ProjFrame._OnSaveAs. Removed old dead code from previous
1395            implementation.
1396            (ProjFrame._OnExport): Add support for exporting more than one
1397            projection to a single file.
1398            (ProjFrame.__FillAvailList): use string formatting (% operator)
1399            to build strings that are (partly) translated. Fixes RTbug #1818.
1400    
1401            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1402            class.
1403    
1404    2003-04-24  Bernhard Herzog  <[email protected]>
1405    
1406            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1407    
1408            * po/fr.po: New. French translation by Daniel Calvelo Aros
1409    
1410            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1411            empty strings.
1412    
1413    2003-04-24  Jonathan Coles   <[email protected]>
1414    
1415            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1416            implement the interface that the ProjFrame dialog expects.
1417    
1418            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1419            name of the projection to be changed.
1420            (ProjFile): Use a dictionary instead of a list so that removing
1421            projections is easier and we are sure about uniqueness.
1422            (ProjFile.Remove): Remove the given projection object.
1423    
1424            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1425            Return a list with only one projection file instead of searching for
1426            any projection file. This simplifies many things if the user can
1427            only have one system file and one user file.
1428    
1429            * Thuban/UI/classgen.py: Change all references to
1430            genCombo to genChoice.
1431    
1432            * Thuban/UI/mainwindow.py: Add a Projection option under the
1433            layer menu.
1434            (MainWindow.LayerProjection): New. Open up a projection window
1435            for a layer.
1436    
1437            * Thuban/UI/projdialog.py: Large changes to how the dialog is
1438            laid out. Use three panels instead of one. One for the list of
1439            projections, one for the edit controls, and one for the buttons.
1440            Fixed resizing problems so that the dialog resizes correctly
1441            when the projection panel changes. Added import/export, save, and
1442            new buttons/functionality.
1443    
1444    2003-04-24  Bernhard Herzog  <[email protected]>
1445    
1446            First step towards table management. Introduce a simple data
1447            abstraction so that we replace the data a layer uses more easily
1448            in the next step.
1449    
1450            * Thuban/Model/data.py: New file with a simple data abstraction
1451            that bundles shapefile and dbffile into one object.
1452    
1453            * Thuban/Model/session.py (Session.OpenShapefile): New method to
1454            open shapefiles and return a shape store object
1455    
1456            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1457            object instead of a shapefile filename. This introduces a new
1458            instance variable store holding the datastore. For intermediate
1459            backwards compatibility keep the old instance variables.
1460            (open_shapefile): Removed. No longer needed with the shape store.
1461            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1462            get the shape store used by a layer.
1463            (Layer.Destroy): No need to explicitly destroy the shapefile or
1464            table anymore.
1465    
1466            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1467            (MainWindow.AddLayer): Use the session's OpenShapefile method to
1468            open shapefiles
1469    
1470            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1471            session's OpenShapefile method to open shapefiles
1472    
1473            * test/test_classification.py
1474            (TestClassification.test_classification): Use the session's
1475            OpenShapefile method to open shapefiles and build the filename in
1476            a more platform independed way
1477    
1478            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1479            Implement to have a session to use in the tests
1480            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1481            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1482            session's OpenShapefile method to open shapefiles
1483            (TestLayerLegend.setUp): Instantiate a session so that we can use
1484            it to open shapefiles.
1485            (TestLayerLegend.tearDown): Make sure that all references to
1486            layers and session are removed otherwise we may get a resource
1487            leak
1488    
1489            * test/test_map.py (TestMapAddLayer.test_add_layer)
1490            (TestMapWithContents.setUp): Instantiate a session so that we can
1491            use it to open shapefiles.
1492            (TestMapWithContents.tearDown): Make sure that all references to
1493            layers, maps and sessions are removed otherwise we may get a
1494            resource leak
1495            ("__main__"): use support.run_tests() so that more info about
1496            uncollected garbage is printed
1497    
1498            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1499            session's OpenShapefile method to open shapefiles
1500            ("__main__"): use support.run_tests() so that more info about
1501            uncollected garbage is printed
1502    
1503            * test/test_selection.py (TestSelection.tearDown): Make sure that
1504            all references to the session and the selection are removed
1505            otherwise we may get a resource leak
1506            (TestSelection.get_layer): Instantiate a session so that we can
1507            use it to open shapefiles.
1508            ("__main__"): use support.run_tests() so that more info about
1509            uncollected garbage is printed
1510    
1511            * test/test_session.py (TestSessionBase.tearDown)
1512            (TestSessionWithContent.tearDown): Make sure that all references
1513            to the session and layers are removed otherwise we may get a
1514            resource leak
1515            (TestSessionWithContent.setUp): Use the session's OpenShapefile
1516            method to open shapefiles
1517    
1518    2003-04-24  Jonathan Coles   <[email protected]>
1519    
1520            * Thuban/Model/load.py (XMLReader.read): Should have been checking
1521            if the file_or_filename object had the 'read' attribute.
1522    
1523    2003-04-23  Jonathan Coles   <[email protected]>
1524    
1525            * Thuban/Model/resource.py: Fixes RTbug #1813.
1526            (ReadProjFile): Add documentation about which exceptions are raised.
1527            Always pass the exceptions up to the caller.
1528            (GetProjFiles): If the directory can't be read return an empty list.
1529            If any of the proj files can't be read skip that file and go
1530            on to the next one.
1531    
1532            * test/test_proj.py: Added test cases to handle nonexistent files,
1533            unreadable files, and files that don't parse correctly.
1534    
1535    2003-04-23  Jonathan Coles   <[email protected]>
1536    
1537            Projection dialog. Allows the user to select from a list
1538            of projection templates and optionally edit them and save new ones.
1539    
1540            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1541            (ProjPanel): Base class for projection specific panels.
1542            (TMPanel): Projection panel for Transverse Mercartor.
1543            (UTMPanel): Projection panel for Universal Transverse Mercartor.
1544            (LCCPanel): Projection panel for Lambert Conic Conformal.
1545            (GeoPanel): Projetion panel for Geographic Projection.
1546    
1547    2003-04-23  Jonathan Coles   <[email protected]>
1548    
1549            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1550            promote symmetry. There now exists XMLReader and XMLWriter.
1551            (XMLReader.read): New. Call to read the given file descriptor or
1552            filename.
1553            (XMLReader.close): New. Make sure the file is closed.
1554            (XMLReader.GetFileName): New. Return just the file name that is being
1555            read from.
1556            (XMLReader.GetDirectory): New. Return just the directory of the file
1557            that is being read.
1558            (XMLReader.AddDispatchers): New. Take a dictionary which contains
1559            the names of functions to call as the XML tree is parsed.
1560            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1561            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1562            (SessionLoader): Removed class variables start_dispatcher and
1563            end_dispatcher since this functionality is now part of a class
1564            instance. Fixes RTbug #1808.
1565            (SessionLoader.__init__): Add dispatcher functions.
1566            (load_xmlfile): Code was moved into the XMLReader.read().
1567            (load_session): Use modified SessionLoader.
1568    
1569            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1570            map's projection.
1571    
1572            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1573            GetAllParameters.
1574            (Projection.GetParameter): Returns the value for the given parameter.
1575    
1576            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1577            (GetProjFiles): Renamed from GetProjections. Now returns a list
1578            of ProjFile objects.
1579            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1580            a list of ProjFile objects whose files are not user defined.
1581            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1582            list of ProjFile objects whose files are user defined.
1583            (ProjFileReader): Extend new XMLReader.
1584    
1585            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1586            promote symmetry.
1587    
1588            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1589            control instead of a wxComboBox. wxChoice controls do not generate
1590            events as the uses highlights possible choices which fixes problems
1591            with resizing the dialog when the use selects an option.
1592    
1593            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1594            control instead of a wxComboBox.
1595    
1596            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1597            dialog.
1598    
1599            * test/test_proj.py (TestProjection.test): New tests for GetParameter
1600            method.
1601    
1602    2003-04-22  Bernhard Herzog  <[email protected]>
1603    
1604            * Thuban/UI/mainwindow.py: Remove some unused imports and global
1605            constants
1606    
1607            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1608            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1609    
1610    2003-04-17  Bernhard Herzog  <[email protected]>
1611    
1612            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1613            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1614            anymore.
1615            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1616            (Layer.ShapeType, Layer.Shape): No need to call
1617            self.open_shapefile since it's always called in __init__
1618    
1619            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1620            In wxPython 2.4 there's no need to extend MainLoop anymore since
1621            wxPython itself makes sure OnExit is called.
1622    
1623    2003-04-16  Jonathan Coles   <[email protected]>
1624    
1625            Initial putback of projection management code. Includes new
1626            classes to read and write projection files. The current load
1627            and save classes were abstracted a bit so they could be reused.
1628            The Projection class was extended to provide new methods and
1629            have a name.
1630    
1631            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1632            general XML reading methods that were part of ProcessSession.
1633    
1634            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1635            name.
1636            (ProjFile): New. Represents a file that contains projection
1637            information.
1638    
1639            * Thuban/Model/resource.py: New. Contains general utilities
1640            for read and writing projection files.
1641    
1642            * Thuban/Model/save.py (XMLSaver): New. Contains all the
1643            general XML writing methods that were part of SessionSaver.
1644            (SessionSaver): Renamed from Saver.
1645    
1646            * test/test_proj.py: New test cases for the projection
1647            file read and write functions.
1648    
1649    2003-04-16  Jonathan Coles   <[email protected]>
1650    
1651            * Thuban/Model/classification.py: Use repr() around values
1652            in the ClassGroup*.__repr__() methods so it is clearer when
1653            a value is a string and when it is a number.
1654    
1655            * test/test_load.py: Rework the classification test to test
1656            that we can load old files.
1657            (testLabels): Test a file where the groups have labels.
1658    
1659    2003-04-16  Bernhard Herzog  <[email protected]>
1660    
1661            Safer implementation of the performance enhancements of the
1662            low-level renderer:
1663            
1664            * extensions/thuban/wxproj.cpp (extract_projection)
1665            (extract_pointer): Rename extract_projection to extract_pointer
1666            and redefine its purpose to return the pointer stored in a CObject
1667            returned by the object's cobject method. Update all callers.
1668            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1669            handling of these low-level parameters so that each s_draw_info
1670            instance is handled as a CObject at python level that also
1671            contains real references to the actual python objects which
1672            contain the values in the struct. Add free_draw_info as the
1673            destructor.
1674            (draw_polygon_shape): Add the py_draw_info parameter which must a
1675            cobject containing an s_draw_info pointer.
1676    
1677            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1678            method to instantiat the low-level render parameter
1679            (MapRenderer.draw_shape_layer): Use the new method. Remove some
1680            commented out code.
1681            (MapRenderer.draw_polygon_shape): Make the first parameter not the
1682            layer but the low-level render parameter
1683            (ScreenRenderer.draw_shape_layer): Use the low-level render
1684            parameter.
1685    
1686    2003-04-15  Jonathan Coles   <[email protected]>
1687    
1688            * Thuban/Model/classification.py: Implemented __repr__ for
1689            the ClassGroup* classes to make debugging a bit easier.
1690            (ClassGroup.SetLabel): Check that the string is an instance
1691            of StringTypes not StringType. Accounts for Unicode strings.
1692    
1693            * Thuban/Model/color.py: Implemented __repr__ to make
1694            debugging a bit easier.
1695    
1696            * Thuban/Model/save.py (Saver.write_classification): Need to
1697            save the group label.
1698    
1699            * test/test_load.py (testClassification): New. Loads the
1700            iceland_sample_test.thuban file and checks if it was loaded
1701            correctly.
1702    
1703    2003-04-15  Jonathan Coles   <[email protected]>
1704    
1705            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1706            to improve rendering performance by initializing the variables
1707            that are not change each time draw_polygon_shape() is called.
1708            The values are stored in a global struct draw_info.
1709            (draw_polygon_shape): Removed initialization code that is
1710            now in draw_polygon_init().
1711    
1712            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1713            drawing initialization call to draw_polygon_init()
1714            (MapRenderer.draw_polygon_shape): Use new signature of
1715            draw_polygon_shape.
1716    
1717            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1718            weirdness by setting the range to (1, maxint).
1719    
1720            * Thuban/Model/classification.py (ClassGroupProperties): Make
1721            instance variables private and optimize comparison operator
1722            by first checking if the color references are the same.
1723            (ClassGroupSingleton): Make instance variables private.
1724            (ClassGroupRange): Make instance variables private.
1725    
1726            * HOWTO-Release: Filled in missing steps for releasing packages.
1727    
1728    2003-04-15  Bernhard Herzog  <[email protected]>
1729    
1730            First stab at internationalized messages:
1731    
1732            * Thuban/__init__.py (_): Implement the translation function for
1733            real using the python gettext module.
1734    
1735            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1736            translate empty strings.
1737    
1738            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1739            Add a missing space to a warning message
1740    
1741            * po/README: New. Notes about the management of the translation
1742            files.
1743    
1744            * po/Makefile: New. Makefile to help manage the translation files.
1745    
1746            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1747    
1748            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1749            translations and support files in po/
1750    
1751            * setup.py (data_files): Add the *.mo files to the data_files too
1752    
1753            * README: Add note about the translations when building from CVS
1754    
1755    2003-04-14  Jonathan Coles   <[email protected]>
1756    
1757            * Thuban/UI/dock.py: Fixes some window resizing problems most
1758            noticable under windows. Always assume the button bitmaps will
1759            be there. Code clean up.
1760            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1761            images for the dock/undock button to the same images.
1762            Work around for RTbug #1801.
1763    
1764            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1765            be allowed to grow within the sizer. Fixes a bug under Windows
1766            where the toolbar wasn't being drawn.
1767    
1768    2003-04-14  Frank Koormann   <[email protected]>
1769    
1770            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1771            Updated design to try to make the button functionality more
1772            transparent.
1773    
1774    2003-04-14  Jonathan Coles   <[email protected]>
1775    
1776            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1777            finalize the intialization of the panel.
1778    
1779            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1780            creation of the panel. Should be the last thing called in the
1781            initializer of a subclass.
1782    
1783            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1784            set the current selections in the combo boxes. This is needed
1785            under Windows.
1786    
1787            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1788            level panel to the dialog so that the background colors are
1789            consistent under Windows.
1790    
1791    2003-04-11  Jonathan Coles   <[email protected]>
1792    
1793            * Thuban/UI/classgen.py: Change color ramps to start at white
1794            not black.
1795    
1796            * Thuban/UI/legend.py: Enable/disable the legend buttons when
1797            the legend changes. Fixes RTbug #1793.
1798    
1799            * test/test_classification.py: Added test for copying of
1800            classifications.
1801    
1802    2003-04-11  Jonathan Coles   <[email protected]>
1803    
1804            * Thuban/UI/resource.py: New. Centralize the loading of resources
1805            such as bitmaps.
1806    
1807            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1808            added images to the move buttons, added 'reverse' button.
1809            (CustomRampPanel.__init__): Added images to the move buttons.
1810            (GreyRamp): New. Generates a ramp from white to black.
1811            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1812    
1813            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1814            ID_PROPERTY_*.
1815            (Classifier.__init__): Minor changes to the layout.
1816            (Classifier._OnTitleChanged): Listen for when the user edits the
1817            title and update the dialog's title and the layer's title.
1818    
1819            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1820    
1821            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1822            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1823            if the layer's title changes.
1824    
1825            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1826            to open a dialog to rename the map.
1827            (MainWindow): Use new resource class to import bitmaps.
1828    
1829    2003-04-11  Jonathan Coles   <[email protected]>
1830    
1831            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1832            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1833            Resources/Bitmaps/group_use_none.xpm,
1834            Resources/Bitmaps/group_use_not.xpm,
1835            Resources/Bitmaps/hide_layer.xpm,
1836            Resources/Bitmaps/layer_properties.xpm,
1837            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1838            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1839            New.
1840    
1841    2003-04-10  Jonathan Coles   <[email protected]>
1842    
1843            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1844            Should pass group to ClassGroup constructor.
1845    
1846    2003-04-10  Jonathan Coles   <[email protected]>
1847    
1848            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1849            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1850            here. Implement SetVisible(), IsVisible().
1851            (ClassGroup.__init__): Add group parameter which acts as a copy
1852            constructor.
1853    
1854            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1855            "Visible" check boxes.
1856            (Classifier): Rename the buttons and refactor the code to match
1857            the new labels.
1858    
1859            * Thuban/UI/legend.py: Classify button is now called "Properties".
1860            Refactored the code to change variable names.
1861            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1862    
1863            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1864            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1865            renamed to MainWindow.LayerEditProperties.
1866            (MainWindow.ToggleLegend): Don't include map name in legend title.
1867            (MainWindow.SetMap): Added the map name to the window title.
1868            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1869            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1870            Functionality is found in the layer properties dialog.
1871    
1872            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1873            draw visible groups.
1874    
1875    2003-04-09  Jonathan Coles   <[email protected]>
1876    
1877            * Thuban/UI/classgen.py: Modifications to allow simple
1878            addition and selection of new color schemes.
1879            (MonochromaticRamp): New. Generates a ramp between two colors.
1880            (RedRamp): New. Generates a ramp of all red.
1881            (GreenRamp): New. Generates a ramp of all green.
1882            (BlueRamp): New. Generates a ramp of all blue.
1883    
1884    2003-04-09  Jonathan Coles   <[email protected]>
1885    
1886            * Thuban/Model/classification.py (Classification.__deepcopy__):
1887            Need to copy over field and fieldType attributes.
1888    
1889            * Thuban/Model/table.py (Table.field_range): New. Retrive the
1890            maximum and minimum values over the entire table for a given
1891            field.
1892            (Table.GetUniqueValues): New. Retrieve all the unique values
1893            in the table for a given field.
1894    
1895            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1896            (GenUniquePanel): New. Controls to allow the user to select
1897            which unique field values they would like in the classification.
1898            (CustomRampPanel): Code that was in ClassGenDialog that allows
1899            the user to select the properties for a custom ramp.
1900            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1901    
1902            * Thuban/UI/classifier.py: Removed a lot of debugging code.
1903            (Classifier._SetClassification): Callback method so that the
1904            class generator can set the classification in the grid.
1905            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1906            editing of a group properties class into a wxWindows control.
1907    
1908            * Thuban/UI/dock.py: It was decided that if the user closes
1909            a dockable window the window should simply hide itself. That
1910            way if the user wants to show the dock again it appears in the
1911            same place as it was when it was closed.
1912            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1913            (DockableWindow._OnButtonClose): Hide the window instead of
1914            destroying it.
1915            (DockableWindow._OnClose): Hide the window instead of
1916            destroying it.
1917    
1918            * Thuban/UI/legend.py (LegendTree): Use a private method to
1919            consistently set the font and style of the text. Fixes RTbug #1786.
1920    
1921            * Thuban/UI/mainwindow.py: Import just the Classifier class.
1922    
1923    2003-04-07  Bernhard Herzog  <[email protected]>
1924    
1925            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1926            to the map module
1927    
1928    2003-04-07  Bernhard Herzog  <[email protected]>
1929    
1930            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1931            favor of ToggleSessionTree
1932            (MainWindow.ToggleSessionTree): New method to toggle visibility of
1933            the session tree.
1934            (MainWindow.SessionTreeShown): New method to return whether the
1935            session tree is currently shown.
1936            (MainWindow.ToggleLegend): New method to toggle visibility of the
1937            legend
1938            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1939            LegendShown
1940            (MainWindow.LegendShown): New method to return whether the legend
1941            is currently shown.
1942            (_method_command): Add checked parameter so we can define check
1943            menu items
1944            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1945            mainwindow methods.
1946            (show_session_tree, show_legend commands): Removed.
1947            (toggle_session_tree, toggle_legend commands): New commands to
1948            toggle the visibility of the dialogs
1949    
1950    2003-04-07  Jonathan Coles   <[email protected]>
1951    
1952            * Thuban/UI/classgen.py: Fix Windows problem.
1953    
1954            * Thuban/UI/dock.py: Fix Windows problem.
1955    
1956            * Thuban/UI/mainwindow.py: Use False instead of false.
1957            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1958    
1959    2003-04-07  Jonathan Coles   <[email protected]>
1960    
1961            Since we now say that the order of the groups in a classification
1962            matters, it makes sense to be able to manipulate that order. Most
1963            of the changes to Thuban/Model/classification.py are to that end.
1964    
1965            * Thuban/Model/classification.py (Classification.AppendGroup,
1966            Classification.InsertGroup, Classification.ReplaceGroup,
1967            Classification.RemoveGroup, Classification.GetGroup): Do as the
1968            names imply.
1969            (Classification.FindGroup): This was called GetGroup, but GetGroup
1970            takes an index, while FindGroup takes a value.
1971            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1972            REFERENCE. Currently there is a cyclic reference between the layer
1973            and its classification. If the classification doesn't need to know
1974            its owning layer we can change this, since it may make sense to be
1975            able to use the same classification with different layers.
1976    
1977            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1978    
1979            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1980            not AddGroup()
1981    
1982            * Thuban/UI/classifier.py: Now that we can depend on the order in
1983            a Classification and have methods to manipulate that order we don't
1984            need to use our own data structures in the grid. We can simply make
1985            the grid/table access the information they need from a copy of
1986            the classification object.
1987            (Classifier._OnCloseBtn): Event handler for when the user clicks
1988            'Close'. This is needed so if the user applies changes and then
1989            continues to change the table the user has the option of discarding
1990            the most recent changes and keeping what they applied.
1991    
1992            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1993            into the same group.
1994    
1995            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1996            with a really old version of proj, PJ_VERSION won't even be defined.
1997            If it isn't defined then just compile so that the function always
1998            returns Py_False.
1999    
2000            * test/test_classification.py: Fix tests to use the renamed methods.
2001            Still need to write tests for the new methods.
2002    
2003    2003-04-04  Jonathan Coles   <[email protected]>
2004    
2005            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
2006            call to SetSelection out of the method and before the call
2007            to __SelectField in __init__. This prevents a recursion of events
2008            when _OnFieldSelect is triggered by the user.
2009    
2010    2003-04-04  Jonathan Coles   <[email protected]>
2011    
2012            * Thuban/Model/classification.py: Rename Color.None to
2013            Color.Transparent.
2014            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
2015            Don't bother copying the color, since Colors are immutable.
2016    
2017            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
2018            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
2019            Thuban/UI/renderer.py, Thuban/UI/view.py:
2020            Rename Color.None to Color.Transparent.
2021        
2022            * test/test_classification.py, test/test_load.py: Rename Color.None
2023            to Color.Transparent.
2024    
2025    2003-04-04  Jonathan Coles   <[email protected]>
2026    
2027            * Thuban/Model/classification.py: Fix assert calls.
2028            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
2029            Copy the color parameter rather than hold onto a reference.
2030    
2031            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
2032            the color object.
2033            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
2034            are sure there exists only one refernce to Color.None in the system.
2035            This allows us to use 'is' rather than the comparision functions.
2036            
2037            * Thuban/Model/save.py: Fix assert calls.
2038            
2039            * Thuban/UI/classifier.py: Fix assert calls.
2040            (ClassGrid._OnCellDClick): Call up to the classifier to open the
2041            dialog to edit the groups properties.
2042            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
2043            correctly if a cell is resized.
2044            (ClassTable.SetClassification): New. Changes the classification
2045            that is in the table.
2046            (ClassTable.__SetRow): Allow groups to be prepended.
2047            (Classifier): New code for opening the EditProperties and
2048            GenerateRanges dialogs.
2049            (SelectPropertiesDialog.__GetColor): Only set the color in the
2050            color dialog if the current color is not None.
2051            
2052            * Thuban/UI/dock.py: Fix assert calls.
2053            
2054            * Thuban/UI/legend.py: Fix assert calls.
2055            
2056            * Thuban/UI/renderer.py: Fix assert calls.
2057            
2058            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
2059            classifications.
2060            (GenRangePanel): Panel specific to range generation.
2061            (GenSingletonPanel): Panel specific to singleton generation.
2062            (ClassGenerator): Class responsible for actually generating
2063            the classification from the data gathered in the dialog box.
2064            (PropertyRamp): Generates properties whose values range from
2065            a starting property to an ending property.
2066    
2067    2003-04-03  Bernhard Herzog  <[email protected]>
2068    
2069            * test/support.py (print_garbage_information): New function that
2070            prints information about still connected messages and memory
2071            leaks.
2072            (run_suite): Removed.
2073            (run_tests): New function for use as a replacement of
2074            unittest.main in the test_* files. This one calls
2075            print_garbage_information at the end.
2076    
2077            * test/runtests.py (main): Use support.print_garbage_information
2078    
2079            * test/test_layer.py: Use support.run_tests instead of
2080            unittest.main so we get memory leak information
2081            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2082            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
2083            (TestLayerLegend.test_visibility): Call the layer's Destroy method
2084            to fix a memory leak.
2085    
2086            * test/test_classification.py: Use support.run_tests instead of
2087            unittest.main so we get memory leak information
2088            (TestClassification.test_classification): Call the layer's Destroy
2089            method to fix a memory leak.
2090    
2091    2003-04-02  Bernhard Herzog  <[email protected]>
2092    
2093            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
2094            Handle the reference counts of the return value and errors in
2095            PyArg_ParseTuple correctly.
2096    
2097            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
2098            sure the filename is absolute to avoid problems when saving the
2099            session again
2100    
2101            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
2102    
2103    2003-04-01  Jonathan Coles   <[email protected]>
2104    
2105            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
2106            that there actually are points in the returned list of points
2107            before trying to index into the list. The list may be empty if
2108            the shape is a Null Shape.
2109    
2110    2003-04-01  Bernhard Herzog  <[email protected]>
2111    
2112            * test/test_map.py: Don't use from <module> import *
2113    
2114    2003-04-01  Jonathan Coles   <[email protected]>
2115    
2116            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
2117            LAYER_LEGEND_CHANGED
2118    
2119            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
2120            self.Destroy() to close the window after yesterday's changes.
2121    
2122            * test/test_map.py, test/test_session.py: Fix messages that
2123            are sent from maps and layers.
2124    
2125    2003-03-31  Jonathan Coles   <[email protected]>
2126    
2127            * Thuban/UI/classifier.py: Commented out some debugging statements.
2128            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
2129            RTbug #1769.
2130    
2131            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
2132            position (although position doesn't work yet under GTK).
2133            (DockableWindow.Destroy): New. Called when the window must be
2134            closed. Namely needed when the DockFrame closes and must close
2135            its children.
2136            (DockFrame): Listen for EVT_CLOSE and destroy all children.
2137    
2138            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
2139            when then window is told to close.
2140            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
2141            comment in source for more info.
2142    
2143            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
2144    
2145            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
2146            symmetry with other such methods.
2147            (MainWindow.ShowLegend): Show the legend docked by default.
2148    
2149    2003-03-28  Jonathan Coles   <[email protected]>
2150    
2151            * Thuban/UI/classifier.py: Support for highlighting a specific
2152            group within the grid when the classification dialog is opened.
2153            Also contains a lot of debugging printouts which will later
2154            be removed.
2155    
2156            * Thuban/UI/dock.py: Complete rework on the dock code so that
2157            that it is fairly removed from the rest of the Thuban application.
2158            It is easy to add new docks which the rest of the program having
2159            to be aware of them.
2160    
2161            * Thuban/UI/legend.py: Modifications to support selecting a
2162            specific group in the classification dialog. Changed how layers
2163            are drawn when the layer is visible/invisible.
2164    
2165            * Thuban/UI/mainwindow.py: Removed legend specific code and
2166            replaced it with calls to the new dock code.
2167    
2168            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
2169            to check if scale > 0. Trying to track down a divide by zero.
2170    
2171    2003-03-26  Jonathan Coles   <[email protected]>
2172    
2173            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
2174            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
2175            now part of DockableWindow.
2176            (LegendPanel.DoOnSelChanged): Select the current layer in the
2177            map.
2178            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
2179            with the selected layer and/or group.
2180    
2181    2003-03-26  Jonathan Coles   <[email protected]>
2182    
2183            This putback contains the code for dockable windows. There is
2184            no support in wxWindows as of this date for windows that can
2185            attach themselves to other windows.
2186    
2187            The current model contains a DockableWindow which has a parent
2188            window for when it is detached and a dock window that it puts
2189            its contents in when it is docked. The contents of a DockableWindow
2190            must be a DockPanel. DockPanel itself derives from wxPanel.
2191    
2192            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
2193            message, not a LAYER_LEGEND_CHANGED message.
2194    
2195            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
2196    
2197            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
2198            as one of the style properties for the fieldTypeText item to
2199            be sure that its size is correct when the text changes.
2200    
2201            * Thuban/UI/dock.py: New. Classes for the DockPanel and
2202            DockableWindow.
2203    
2204            * Thuban/UI/legend.py: Added some more buttons and made the
2205            LegendPanel a DockPanel.
2206    
2207            * Thuban/UI/mainwindow.py: Added sash windows to the main window
2208            and supporting functions for manipulating the sashes.
2209            (MainWindow.ShowLegend): Create a DockableWindow with the
2210            LegendPanel as the contents.
2211    
2212            * Thuban/UI/messages.py: Added DOCKABLE_* messages
2213    
2214            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
2215            not LAYER_LEGEND_CHANGED, messages.
2216    
2217    2003-03-25  Jonathan Coles   <[email protected]>
2218    
2219            * setup.py: Added custom script bdist_rpm_build_script so that
2220            when the rpm is built the path to wx-config is correct.
2221    
2222            * setup.cfg: Added line saying to use the custom build script
2223    
2224    2003-03-20  Jonathan Coles   <[email protected]>
2225    
2226            Initial implementation of the Legend.
2227    
2228            * Thuban/UI/legend.py: New. Creates a window that shows the map's
2229            Legend information and allows the user to add/modify classifications
2230            and how the layers are drawn on the map.
2231    
2232            * setup.py: New command 'build_docs' which currently uses
2233            happydoc to generate html documentation for Thuban.
2234    
2235            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
2236            Returns a string which is appropriately describes the group.
2237    
2238            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
2239            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
2240    
2241            * Thuban/Model/map.py (Map): Rename messages and use new, more
2242            specific, messages.
2243    
2244            * Thuban/Model/messages.py: New message to indicate that a layer's
2245            data has changed (LAYER_CHANGED). New map messages to indicate
2246            when layers have been added/removed/changed or if the stacking order
2247            of the layers has changed.
2248    
2249            * Thuban/Model/session.py: Rename and use new messages.
2250    
2251            * Thuban/UI/classifier.py: Remember if any changes have actually
2252            been applied so that if the dialog is cancelled without an application
2253            of changes we don't have to set a new classification.
2254            (ClassDataPreviewer): Pulled out the window specific code and put it
2255            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
2256            symbols on any DC.
2257            
2258            * Thuban/UI/mainwindow.py: New code to open the legend.
2259    
2260            * Thuban/UI/view.py: Use new message names.
2261    
2262    2003-03-19  Jonathan Coles   <[email protected]>
2263    
2264            * Thuban/UI/main.py (verify_versions): New. Checks the versions
2265            of Python, wxPython, and some other libraries.
2266    
2267            * extensions/thuban/wxproj.cpp (check_version): Checks the given
2268            version against what wxproj was compiled with.
2269            (check_version_gtk): If wxproj was compiled with gtk then check
2270            the given version against the version of the gtk library
2271            currently being used.
2272    
2273    2003-03-14  Bernhard Herzog  <[email protected]>
2274    
2275            * test/test_command.py: Run the tests when the module is run as a
2276            script
2277    
2278    2003-03-14  Bernhard Herzog  <[email protected]>
2279    
2280            Implement selection of multiple selected shapes in the same layer:
2281    
2282            - Introduce a new class to hold the selection. This basically
2283              replaces the interactor which was nothing more than the
2284              selection anyway. A major difference is of course that the new
2285              selection class supports multiple selected shapes in one layer
2286            
2287            - Move the object that represents the selection from the
2288              application to the canvas. The canvas is a better place than the
2289              application because the selection represents which shapes and
2290              layer of the map displayed by the canvas are selected and
2291              affects how the map is drawn.
2292    
2293            - Make the selection and its messages publicly available through
2294              the mainwindow.
2295    
2296            - The non-modal dialogs do not get a reference to the interactor
2297              anymore as they can simply refer to their parent, the
2298              mainwindow, for the what the interactor had to offer.
2299    
2300            * Thuban/UI/selection.py: New module with a class to represent the
2301            selection.
2302    
2303            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
2304            these unused messages
2305    
2306            * Thuban/UI/application.py (ThubanApplication.OnInit)
2307            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
2308            interactor is gone now.
2309            (ThubanApplication.CreateMainWindow): There is no interactor
2310            anymore so we pass None as the interactor argument for now for
2311            compatibility.
2312    
2313            * Thuban/UI/view.py (MapCanvas.delegated_messages)
2314            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
2315            Unsubscribe, delegate messages according to the delegated_messages
2316            class variable.
2317            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
2318            attributes from instance variables as described with the
2319            delegated_methods class variable.
2320            (MapCanvas.__init__): New instance variable selection holding the
2321            current selection
2322            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
2323            pass them on to the renderer
2324            (MapCanvas.SetMap): Clear the selection when a different map is
2325            selected.
2326            (MapCanvas.shape_selected): Simple force a complete redraw. The
2327            selection class now takes care of only issueing SHAPES_SELECTED
2328            messages when the set of selected shapes actually does change.
2329            (MapCanvas.SelectShapeAt): The selection is now managed in
2330            self.selection
2331    
2332            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
2333            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
2334            Unsubscribe, delegate messages according to the delegated_messages
2335            class variable.
2336            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
2337            attributes from instance variables as described with the
2338            delegated_methods class variable.
2339            (MainWindow.__init__): The interactor as ivar is gone. The
2340            parameter is still there for compatibility. The selection messages
2341            now come from the canvas.
2342            (MainWindow.current_layer, MainWindow.has_selected_layer):
2343            Delegate to the the canvas.
2344            (MainWindow.LayerShowTable, MainWindow.Classify)
2345            (MainWindow.identify_view_on_demand): The dialogs don't need the
2346            interactor parameter anymore.
2347    
2348            * Thuban/UI/tableview.py (TableFrame.__init__)
2349            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
2350            (LayerTableFrame.row_selected): The interactor is gone. It's job
2351            from the dialog's point of view is now done by the mainwindow,
2352            i.e. the parent. Subscribe to SHAPES_SELECTED instead
2353            of SELECTED_SHAPE
2354            
2355            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
2356            is gone. It's job from the dialog's point of view is now done by
2357            the mainwindow, i.e. the parent.
2358            
2359            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
2360            gone. It's job from the dialog's point of view is now done by the
2361            mainwindow, i.e. the parent.
2362    
2363            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
2364            gone. It's job from the dialog's point of view is now done by the
2365            mainwindow, i.e. the parent.
2366            (SessionTreeCtrl.__init__): New parameter mainwindow which is
2367            stored as self.mainwindow. The mainwindow is need so that the tree
2368            can still subscribe to the selection messages.
2369            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
2370            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
2371            selection is now accessible through the mainwindow. Subscribe to
2372            SHAPES_SELECTED instead of SELECTED_SHAPE
2373    
2374            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
2375            SHAPES_SELECTED message now.
2376            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
2377            so deal with multiple shapes
2378            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
2379            gone. It's job from the dialog's point of view is now done by the
2380            mainwindow, i.e. the parent.
2381    
2382            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
2383            parameter is now a list of shape ids.
2384            (RecordTable.SetTable): The second parameter is now a list of
2385            indices.
2386    
2387            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
2388            selected_shape parameter and ivar to selected_shapes. It's now a
2389            list of shape ids.
2390            (MapRenderer.draw_label_layer): Deal with multiple selected
2391            shapes. Rearrange the code a bit so that the setup and shape type
2392            distinctions are only executed once.
2393    
2394            * test/test_selection.py: Test cases for the selection class
2395    
2396    2003-03-11  Jonathan Coles   <[email protected]>
2397    
2398            * Thuban/Model/load.py: Temporary fix so that the xml reader
2399            doesn't cause Thuban to crash.
2400    
2401            * Thuban/Model/layer.py: Handle the cyclic references between
2402            a layer and its classification better, and be sure to disconnect
2403            the classification from the layer when the layer is destroyed
2404            so that we don't maintain a cyclic reference that may not be
2405            garbage collected.
2406    
2407            * Thuban/Model/classification.py: See comment for layer.py.
2408    
2409  2003-03-12  Jan-Oliver Wagner <[email protected]>  2003-03-12  Jan-Oliver Wagner <[email protected]>
2410    
2411          * HOWTO-Release: New. Information on the steps for releasing          * HOWTO-Release: New. Information on the steps for releasing

Legend:
Removed from v.523  
changed lines
  Added in v.1048

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26