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

Legend:
Removed from v.475  
changed lines
  Added in v.1218

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26