/[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

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

Legend:
Removed from v.505  
changed lines
  Added in v.1487

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26