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

Legend:
Removed from v.405  
changed lines
  Added in v.1134

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26