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

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

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

revision 723 by bh, Thu Apr 24 15:31:53 2003 UTC revision 1143 by bh, Tue Jun 10 09:42:10 2003 UTC
# Line 1  Line 1 
1    2003-06-10  Bernhard Herzog  <[email protected]>
2    
3            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
4            message.
5    
6            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
7            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
8            LAYER_CHANGED will still be sent if the classification changes.
9    
10            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
11            parameter so we can subscribe to some of its messages
12            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
13            and the layer's LAYER_SHAPESTORE_REPLACED
14            (Classifier.unsubscribe_messages): New. Unsubscribe from message
15            subscribed to in __init__
16            (Classifier.map_layers_removed)
17            (Classifier.layer_shapestore_replaced): receivers for the messages
18            subscribed to in __init__. Unsubscribe and close the dialog
19    
20            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
21            the map to the Classifier dialog
22    
23            * test/test_layer.py (SetShapeStoreTests): Derive from
24            SubscriberMixin as well so we can test messages
25            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
26            messages
27            (SetShapeStoreTests.tearDown): Clear the messages again
28            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
29            for the modified flag too
30            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
31            to check whether SetShapeStore sets the modified flag
32            (SetShapeStoreTests.test_set_shape_store_different_field_name)
33            (SetShapeStoreTests.test_set_shape_store_same_field)
34            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
35            Add tests for the messages. This checks both the new
36            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
37    
38    2003-06-06  Jan-Oliver Wagner <[email protected]>
39    
40            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
41            the menu items.
42    
43    2003-06-05  Frank Koormann  <[email protected]>
44    
45            * Thuban/UI/identifyview.py (IdentifyView.__init__):
46            Layout reimplemented without panel. Make life easier to fit the list
47            in the dialog.
48    
49    2003-06-05  Frank Koormann  <[email protected]>
50    
51            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
52            once on initialisation (Former implementation resulted in multiple
53            entries for each projection).
54            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
55            if set, select the projection found under the specified name. This
56            overwrites any other selection estimate.
57            Removed projchoice filling from this method.
58            (ProjFrame._OnSave, ProjFrame._OnAddToList):
59            Updated call of ProjFrame.__FillAvailList
60            (LCCPanel._DoLayout): Moved parameter controls in more common order.
61    
62            * Resources/Projections/defaults.proj: Extended defaults representing
63            various common European projections.
64    
65    2003-06-05  Frank Koormann  <[email protected]>
66    
67            * Thuban/UI/identifyview.py (IdentifyView.__init__):
68            Use ListCtrl instead of GridCtrl
69    
70            * Thuban/Model/resource.py:
71            Guess location of .thuban directory from tempdir parent directory.
72    
73            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
74            Guess location of .thuban directory from tempdir parent directory.
75    
76    2003-06-04  Bernhard Herzog  <[email protected]>
77    
78            Do not cache the values returned by the tree widget's
79            GetFirstChild and GetNextChild methods because it led to lots of
80            segfaults. The new way requires more brute force but is more
81            reliable.
82    
83            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
84            variable layer2id
85            (LegendTree.find_layer): New method to do with brute force what
86            layer2id tried to accomplish
87            (LegendTree._OnMsgLayerChanged)
88            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
89            Use find_layer instead of layer2id
90            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
91            update layer2id anymore
92            (LegendTree._OnMsgMapLayersRemoved)
93            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
94    
95    2003-06-03  Thomas Koester  <[email protected]>
96    
97            * Thuban/Model/classgen.py (GenQuantiles0): New function.
98    
99    2003-06-02  Bernhard Herzog  <[email protected]>
100    
101            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
102            New commands.
103            (main_menu): Add the new commands.
104            (MainWindow.TableRename): New. Implementation of the table_rename
105            command.
106            (MainWindow.RenameLayer): New. Implementation of the layer_rename
107            command.
108    
109            * Thuban/Model/session.py (Session.AddTable): call self.changed to
110            set the modified flag
111    
112            * test/test_session.py (TestSessionSimple.test_add_table): Test
113            whether the modified flag is set properly
114    
115            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
116            instead of issue so that the modified flags get updated.
117    
118            * test/test_base.py (SomeTitledObject): Derive from Modifiable
119            instead of Publisher to reflect reality better and to accomodate
120            the fact that SetTitle now calls changed instead of issue
121    
122    2003-06-02  Bernhard Herzog  <[email protected]>
123    
124            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
125            acquisition has to happen before the try in a try-finally.
126    
127    2003-06-02  Bernhard Herzog  <[email protected]>
128    
129            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
130            possible that a layer is removed that is not currently selected in
131            the legend so don't check for this.
132    
133    2003-05-30  Bernhard Herzog  <[email protected]>
134    
135            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
136            variables to None that have direct or indirect references to
137            shapefiles or dbf files to make sure that they do go away and the
138            files are closed.
139    
140    2003-05-30  Bernhard Herzog  <[email protected]>
141    
142            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
143            availImgListIndices when a new image list is created
144            
145    2003-05-30  Bernhard Herzog  <[email protected]>
146    
147            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
148            changing_selection to indicate whether the LegendTree code itself
149            is currently changing the selection
150            (LegendTree.normalize_selection): New method to normalize the
151            selection by selecting the layer item even if the user clicked on
152            the classification.
153            (LegendTree._OnSelChanged): normalize the selection. This works
154            around a bug in wx which doesn't keep track of the selection
155            properly when subtrees are deleted.
156    
157    2003-05-30  Bernhard Herzog  <[email protected]>
158    
159            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
160            maximum and minimum scale factors.
161    
162            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
163            changes in classgen.py
164    
165    2003-05-30  Jonathan Coles   <[email protected]>
166    
167            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
168            all the methods functions. Fixes RTBug #1903.
169    
170            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
171            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
172            RTBug #1907.
173    
174            * Thuban/UI/classgen.py: Use classgen functions that were part
175            of the ClassGenerator class. Put try/finally blocks around
176            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
177            RTBug #1904.
178    
179            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
180    
181            * Thuban/UI/legend.py: The legend was cleared and repopulated any
182            time something changed which caused some state to be lost such
183            as which children were expanded or collapsed. Fixes RTBug #1901.
184            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
185            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
186            the legend but not in the map.
187            (LegendTree.__FillTree): Move main functionality out into smaller
188            methods that can be used by other methods.
189            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
190            if they are available.
191            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
192            that we override the wxTreeCtrl method. Iterate over children
193            and call __RemoveLayer.
194            (LegendTree.__AddLayer): New. Add a new layer to the legend.
195            (LegendTree.__RemoveLayer): Remove a layer from the legend.
196            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
197            Should only be called with the id of a layer branch.
198            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
199            Returns the root item or creates one if necessary.
200    
201            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
202            ProjectRasterFile with tuple arguments instead of strings.
203    
204            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
205            with try/finally. Fixes RTBug #1904.
206    
207            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
208            with try/finally. Fixes RTBug #1904.
209            (MapCanvas.FitSelectedToWindow): If a single point is selected
210            simply center it on the display. Fixes RTBug #1849.
211    
212            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
213            to be compiled as a standalone app. Now the code can only be
214            called from Python which simplifies the parameter passing.
215            (ProjectRasterFile): Handle Python arguments. Remove code that
216            checks for a destination dataset. Add more clean up code.
217    
218            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
219            TestMapWithContents.test_lower_layer_bottom):
220            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
221            Fixes RTBug #1907.
222    
223            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
224            extent to the map when the legend is toggled. Fixes RTBug #1881.
225    
226    2003-05-29  Jan-Oliver Wagner <[email protected]>
227    
228            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
229            unsubscribes all that is subcribed in __init__.
230    
231    2003-05-28  Bernhard Herzog  <[email protected]>
232    
233            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
234            (MainWindow.CanDuplicateLayer): New methods to implement the
235            Layer/Duplicate command.
236            (layer_duplicate command): New.
237            (main_menu): Add layer_duplicate to the Layer menu.
238    
239    2003-05-28  Bernhard Herzog  <[email protected]>
240    
241            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
242            renderer so that NULL/None values get displayed differently (by a
243            gray rectangle).
244            (TableGrid.__init__): Override the default renderers
245    
246    2003-05-28  Bernhard Herzog  <[email protected]>
247    
248            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
249            classification to "None" if the type of the field has changed.
250    
251            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
252            test for the Layer.SetShapeStore method
253    
254    2003-05-28  Jan-Oliver Wagner <[email protected]>
255    
256            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
257            does not necessarily have a filename).
258    
259    2003-05-28  Jan-Oliver Wagner <[email protected]>
260    
261            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
262            sort the selection list for the dialog.
263    
264    2003-05-28  Frank Koormann  <[email protected]>
265    
266            * extensions/thuban/wxproj.cpp
267            (project_point): Removed cast to int for projected point coordinates.
268            (shape_centroid): Return last point if all polygon vertices fall
269            to one point.
270    
271    2003-05-28  Bernhard Herzog  <[email protected]>
272    
273            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
274            with layers that don't have shapestores, i.e. raster layers.
275    
276    2003-05-28  Bernhard Herzog  <[email protected]>
277    
278            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
279            when determining the title from the filename.
280    
281            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
282            reflect changes in the way the title is derived from the filename
283    
284    2003-05-28  Frank Koormann  <[email protected]>
285    
286            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
287            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
288    
289    2003-05-27  Bernhard Herzog  <[email protected]>
290    
291            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
292            delegate SelectedLayer.
293            (MainWindow.LayerUnjoinTable): Implement.
294            (_can_unjoin): New. Helper function for the sensitivity of the
295            layer/unjoin command.
296    
297            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
298            (DerivedShapeStore.OrigShapeStore): New. Return the original
299            shapestore. Used to figure out how to unjoin.
300            (DerivedShapeStore.Shapefile): Fix a typo.
301    
302    2003-05-27  Bernhard Herzog  <[email protected]>
303    
304            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
305            well
306            (JoinDialog.__init__): Use the layer parameter and only build the
307            left choice when a layer is given
308            (JoinDialog.OnJoin): Handle layer joins as well
309            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
310            that the user selects the "Select..." item. The sensitivitly
311            updating is now in update_sensitivity
312            (JoinDialog.y): New method to refactor the sensitivity update of
313            the join button into its own method.
314    
315            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
316    
317    2003-05-27  Bernhard Herzog  <[email protected]>
318    
319            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
320            iff there are unreferenced tables in the session
321    
322    2003-05-27  Bernhard Herzog  <[email protected]>
323    
324            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
325    
326            * Thuban/Model/session.py (Session.UnreferencedTables): New method
327            to return tables that are not referenced by other tables or shape
328            stores and can be removed.
329            (Session.RemoveTable): Issue a TABLE_REMOVED message after
330            removing the table
331    
332            * Thuban/UI/mainwindow.py: Remove unused imports
333            (MainWindow.TableClose): Implement.
334    
335            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
336            messages so that the frame will be automatically closed when a new
337            session is opened or the table is removed.
338            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
339            __init__
340            (TableFrame.close_on_session_replaced)
341            (TableFrame.close_on_table_removed): New. Subscribers that close
342            the window
343    
344            * test/test_session.py (TestSessionMessages.test_remove_table)
345            (TestSessionSimple.test_remove_table): Move the test to
346            TestSessionSimple and add test for the TABLE_REMOVED message
347            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
348            (TestSessionSimple.test_unreferenced_tables) New. Test for the
349            UnreferencedTables method.
350            (UnreferencedTablesTests): New. Class with some more sophisticated
351            tests for UnreferencedTables.
352    
353    2003-05-27  Frank Koormann  <[email protected]>
354    
355            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
356            display has some unwanted side effects. Removed again.
357    
358    2003-05-27  Frank Koormann  <[email protected]>
359    
360            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
361    
362            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
363    
364    2003-05-27  Jan-Oliver Wagner <[email protected]>
365    
366            * test/test_menu.py (MenuTest.test): Added test for
367            Menu.RemoveItem().
368    
369            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
370            the menu.
371    
372    2003-05-27  Frank Koormann  <[email protected]>
373            
374            Nonmodal dialogs without parent (i.e. they can fall behind the main
375            window)
376    
377            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
378            all dialogs in the dialogs dictionary and the canvas.
379    
380            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
381            parent, i.e. can fall behind other windows.
382            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
383            dictionary before removing it.
384    
385            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
386    
387            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
388            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
389            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
390    
391    2003-05-27  Bernhard Herzog  <[email protected]>
392    
393            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
394            tableview dialog
395            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
396            Also, don't use the table's titles as the dialog names. The titles
397            aren't guaranteed to be unique.
398            (MainWindow.TableOpen): Open a table view dialog after opening the
399            table
400    
401    2003-05-27  Bernhard Herzog  <[email protected]>
402    
403            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
404            effect can be achieved by simply closing the window showing the
405            table.
406            (MainWindow.TableHide): Removed.
407            (main_menu): Removed "table_hide"
408    
409    2003-05-27  Frank Koormann  <[email protected]>
410    
411            Fix legend tree display problems under Win32
412    
413            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
414            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
415            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
416    
417            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
418    
419    2003-05-27  Jan-Oliver Wagner <[email protected]>
420    
421            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
422            'after' now allows to insert separators almost anywhere in the menu.
423    
424    2003-05-27  Frank Koormann  <[email protected]>
425    
426            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
427            "S" of selection box label to hint on hot key (Alt-S). Works under
428            Win32 but is ignored under GTK.
429    
430    2003-05-26  Frank Koormann  <[email protected]>
431    
432            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
433            Center Choices.
434    
435    2003-05-26  Bernhard Herzog  <[email protected]>
436    
437            Remove the Precision methods again. They're too DBF specific to be
438            part of the table interface and they're only used in table_to_dbf
439            anyway.
440            
441            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
442            fixed precision of 12 for doubles.
443            (TransientTableBase.Precision): Removed
444            (AutoTransientTable.Width): Delegate to self.table.
445    
446            * Thuban/Model/table.py (DBFTable.Precision)
447            (MemoryTable.Precision): Removed.
448            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
449            (table_to_dbf): Use a fixed precision of 12 for floats unless the
450            column object specifies something else.
451    
452            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
453            test for table_to_dbf
454    
455    2003-05-26  Bernhard Herzog  <[email protected]>
456    
457            * test/test_transientdb.py
458            (TestTransientTable.run_iceland_political_tests): Fix a comment.
459    
460    2003-05-26  Bernhard Herzog  <[email protected]>
461    
462            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
463            implementation. Mark parts of the file format strings for
464            localization.
465    
466            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
467            file and add the table to the tables managed by the session
468    
469            * test/test_session.py (TestSessionSimple.test_open_table_file):
470            New. test case for OpenTableFile
471    
472    2003-05-26  Jan-Oliver Wagner <[email protected]>
473    
474            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
475            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
476            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
477            Replace the true/false of wxWindows by True/False of Python 2.2.1.
478    
479    2003-05-26  Jan-Oliver Wagner <[email protected]>
480    
481            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
482            already a selection present, update the grid accordingly.
483    
484            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
485            resizeable and increase its initial size.
486    
487    2003-05-26  Frank Koormann  <[email protected]>
488    
489            Table export functionality
490    
491            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
492            Return width (in characters) for a column.
493            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
494            (table_to_dbf): Write table to dbf file.
495            (table_to_csv): Write table to csv file.
496    
497            * Thuban/Model/transientdb.py (TransientTableBase.Width,
498            TransientTableBase.Precision): Return column width and precision.
499    
500            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
501            or table_to_csv depending on file selection.
502    
503            * test/test_dbf_table.py:
504            Test table_to_dbf (extension of former part of test).
505    
506            * test/test_csv_table.py:
507            Test table_to_csv.
508    
509    2003-05-23  Jan-Oliver Wagner <[email protected]>
510    
511            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
512            Use QueryTableFrame instead of TableFrame.
513    
514            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
515            table window with 'Layer Table:' instead of 'Table:'.
516    
517    2003-05-23  Jan-Oliver Wagner <[email protected]>
518    
519            Give all tables a title via mix-in TitledObject.LayerShowTable
520    
521            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
522            only if it exists.
523    
524            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
525            and call its init-method with a default title. Remove Title() method.
526    
527            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
528            AutoTransientTable): mix-in TitledObject and call its init-method with
529            a default title. Remove Title() method.
530    
531    2003-05-23  Bernhard Herzog  <[email protected]>
532    
533            * Thuban/Model/session.py (Session.AddShapeStore): Define
534            AddShapeStore analogously to AddTable.
535    
536            * test/test_session.py (TestSessionSimple.test_add_shapestore):
537            New. Test for AddShapeStore
538    
539    2003-05-23  Jan-Oliver Wagner <[email protected]>
540    
541            Introducing QueryTableFrame and a very coarse ShowTable implementation.
542    
543            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
544            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
545            The latter implements the selection GUI without dependency on a layer.
546            LayerTableFrame now is derived from QueryTableFrame and connects
547            to a layer.
548    
549            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
550            implementation that still needs work.
551    
552            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
553    
554    2003-05-22  Frank Koormann  <[email protected]>
555    
556            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
557            Added "outer_join = False" as optional parameter.
558            (TransientJoinedTable.create): If outer join is true, perform a
559            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
560            the left table. Records not matching are filled with 0 / None.
561    
562            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
563            (JoinDialog.OnJoin): Consider outer join check box.
564    
565    2003-05-22  Bernhard Herzog  <[email protected]>
566    
567            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
568            somewhat safer way. Storing the traceback in a local variable can
569            lead to memory leaks
570    
571    2003-05-22  Bernhard Herzog  <[email protected]>
572    
573            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
574            the wxMessageDialog's Destroy() method.
575    
576    2003-05-22  Frank Koormann  <[email protected]>
577    
578            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
579            TransientTable.Title()
580    
581    2003-05-22  Frank Koormann  <[email protected]>
582    
583            Join Dialog, initial version.
584    
585            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
586    
587            * Thuban/UI/join.py (JoinDialog): Functional implementation of
588            former framework. Renamed Table1/Table2 to LeftTable/RightTable
589            in all occurences.
590    
591            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
592            Typo fixed.
593    
594    2003-05-22  Bernhard Herzog  <[email protected]>
595    
596            Give the tables titles so that the GUI can display more meaningful
597            names. For now the titles are fixed but depend on e.g. filenames
598            or the titles of the joined tables.
599    
600            * Thuban/Model/transientdb.py (TransientTable.Title)
601            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
602    
603            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
604    
605            * test/test_transientdb.py
606            (TestTransientTable.test_auto_transient_table_title): New. Test
607            for the Title method
608            (TestTransientTable.test_transient_joined_table)
609            (TestTransientTable.test_transient_table): Add test for the Title
610            methods
611    
612            * test/test_memory_table.py (TestMemoryTable.test_title): New.
613            Test for the Title method
614    
615            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
616            the Title method
617    
618    2003-05-22  Bernhard Herzog  <[email protected]>
619    
620            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
621            Provide a better way to destroy the layers
622            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
623            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
624            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
625            the new way to destroy the layers.
626            (TestLayer.test_derived_store): New. Test for using a layer with a
627            DerivedShapeStore
628    
629            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
630            filename if the shape store actually has one.
631    
632    2003-05-22  Bernhard Herzog  <[email protected]>
633    
634            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
635            for the filename
636    
637            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
638            for the FileName method
639            (TestDBFTableWriting.test_write): Fix spelling of filename
640    
641    2003-05-22  Thomas Koester  <[email protected]>
642    
643            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
644            from SciParam that now really is immutable.
645    
646    2003-05-22  Frank Koormann  <[email protected]>
647    
648            Layer Top/Bottom placement added to legend.
649    
650            * Thuban/UI/legend.py
651            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
652            bound to tool events.
653            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
654            New, methods binding the event methods with the map methods.
655    
656            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
657            layer at top/bottom of layer stack.
658    
659            * Resources/Bitmaps/top_layer.xpm: New button icon.
660    
661            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
662    
663    2003-05-22  Bernhard Herzog  <[email protected]>
664    
665            * Thuban/Model/session.py (Session.RemoveTable): New method to
666            remove tables
667    
668            * test/test_session.py (TestSessionSimple.test_remove_table): New.
669            Test for RemoveTable
670    
671    2003-05-22  Thomas Koester  <[email protected]>
672    
673            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
674            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
675    
676    2003-05-22  Bernhard Herzog  <[email protected]>
677    
678            Implement a way to discover dependencies between tables and
679            shapestores.
680    
681            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
682            (TransientJoinedTable.Dependencies)
683            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
684            interface
685            (TransientJoinedTable.__init__): Keep tack of the original table
686            objects in addition to the corresponding transient tables.
687    
688            * Thuban/Model/table.py (DBFTable.Dependencies)
689            (MemoryTable.Dependencies): New. Implement the dependencies
690            interface
691    
692            * Thuban/Model/data.py (ShapeTable): New. Helper class for
693            ShapefileStore
694            (ShapefileStore.__init__): Use ShapeTable instead of
695            AutoTransientTable
696            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
697            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
698            methods for filename and type
699            (ShapefileStore.Dependencies): New. Implement the dependencies
700            interface
701            (DerivedShapeStore): New class to replace SimpleStore. The main
702            difference to SimpleStore is that it depends not on a shapefile
703            but another shapestore which expresses the dependencies a bit
704            better
705            (SimpleStore.__init__): Add deprecation warning.
706    
707            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
708            Test for the Dependencies method.
709    
710            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
711            New. Test for the Dependencies method.
712    
713            * test/test_transientdb.py
714            (TestTransientTable.test_auto_transient_table_dependencies): New.
715            Test for the Dependencies method.
716            (TestTransientTable.test_transient_joined_table): Add test for the
717            Dependencies method.
718    
719            * test/test_session.py (TestSessionSimple.setUp)
720            (TestSessionSimple.tearDown): New. Implement a better way to
721            destroy the sessions.
722            (TestSessionSimple.test_initial_state)
723            (TestSessionSimple.test_add_table): Bind session to self.session
724            so that it's destroyed by tearDown
725            (TestSessionSimple.test_open_shapefile): New. Test for
726            OpenShapefile and the object it returns
727    
728    2003-05-22  Bernhard Herzog  <[email protected]>
729    
730            * Thuban/Model/session.py (Session.AddTable): New method to
731            register tables with the session.
732            (Session.Tables): Return the tables registered with AddTable too.
733    
734            * test/test_session.py (TestSessionSimple.test_add_table): New.
735            Test case for the AddTable method
736    
737    2003-05-22  Frank Koormann  <[email protected]>
738    
739            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
740            lower right corner, center labels for selections, initialize controls
741            in reasonable order for keyboard navigation.
742    
743            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
744            (ProjFrame.__DoOnProjAvail): Determine position of current projection
745            using the wxListBox.FindString() method. Still a problem (#1886)
746    
747            * Thuban/UI/classifier.py
748            (Classifier.__init__, SelectPropertiesDialog.__init__)
749    
750            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
751            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
752            different classification types from here to __init__.
753            (GenUniquePanel.__init__): Set the column width of the first field
754            in the Field ListCtrl to the full width.
755    
756            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
757            Button to 'Export'. Center Buttons in Selection Box, set Focus to
758            Grid.
759            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
760            changes focus to the Selection when pressing "Alt-S".
761    
762            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
763            the text if not visible. The italic font sometimes exceeds the
764            rendering area.
765    
766    2003-05-21  Jonathan Coles   <[email protected]>
767    
768            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
769            to OnClose so that Thuban closes correctly.
770    
771            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
772            DockFrame.OnClose, not DockFrame._OnClose.
773    
774    2003-05-21  Jonathan Coles   <[email protected]>
775    
776            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
777            references to 'inf' and use new Range __init__ to pass floats
778            directly rather than converting them to strings first.
779            Fixes RTBug #1876.
780    
781            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
782            Use new Range ___init__ to pass floats.
783    
784            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
785            filename is a valid image file. Throw IOError otherwise.
786    
787            * Thuban/Model/range.py: Brought over new Range from SciParam that
788            is immutable and has an __init__ which can accept floats.
789    
790            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
791            into try block. AddLayer doesn't throw any exceptions anymore.
792            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
793            try block.
794    
795            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
796            the first item in choices. Fixes RTBug #1882.
797    
798            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
799            has gone to 0 which is a serious problem. abort.
800            (MapRenderer.draw_raster_layer): Catch IOError seperately and
801            print the error from GDAL.
802    
803            * Thuban/UI/tableview.py (TableGrid.__init__): Call
804            ToggleEventListeners to turn on listening.
805            (TableGrid.ToggleEventListeners): New. Turns event listening on
806            and off so as to prevent excessive messages.
807            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
808            to suppress excessive messages when selecting many rows.
809            Fixes RTBug #1880.
810    
811            * Thuban/UI/view.py: Added checks against if scale == 0. This
812            is a serious problem that can occur when an image without
813            geo data is loading and causes the map projection bounds to
814            go to infinity. Right now, the solution is to simply try
815            to recover.
816    
817            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
818            to set the MFILEReceiver attributes even if the data is NULL.
819    
820            * extensions/thuban/gdalwarp.cpp: Improved the error handling
821            and passed GDAL messages back up to the Python layer. Also
822            tried to fix some memory leaks that were present in the original
823            utility but didn't matter because the program aborted.
824    
825            * test/test_range.py: Copied over tests from SciParam. Removed
826            tests against importing. Fixes RTBug #1867.
827    
828    2003-05-21  Bernhard Herzog  <[email protected]>
829    
830            * test/test_load.py: Remove unused imports and restructure the
831            test code
832            (LoadSessionTest): Split into one class for each test and turn
833            LoadSessionTest itself into the base class for all such session
834            tests.
835            (ClassificationTest): New base class for load tests that test
836            classifications
837            (TestSingleLayer, TestLayerVisibility, TestClassification)
838            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
839            for the individual tests
840    
841            * test/support.py (FileLoadTestCase.filename): New base class for
842            file loading tests
843    
844    2003-05-21  Jan-Oliver Wagner <[email protected]>
845    
846            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
847            Mercator' to 'UTM Zone 32' as a more convenient example.
848            Added 'Gauss Krueger Zone 6'.
849    
850            * Data/iceland_sample_raster.thuban: political polygon now
851            filled transparent to have the raster image visible at once.
852    
853    2003-05-21  Frank Koormann  <[email protected]>
854    
855            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
856            OnClose() to keep in sync with extensions. Internally Thuban
857            still uses "underscored" names.
858    
859    2003-05-20  Jonathan Coles   <[email protected]>
860    
861            This puts back Raster layer support. These layers support projections
862            through the GDAL library. Currently, the CVS version is being used.
863            There are no Debian packages available although this may change soon.
864            A GDAL driver was extended to support writing to memory rather to
865            files.
866    
867            There is still some work that needs to be done, such as some error
868            handling when loading invalid images or when there is a problem
869            projecting the image. This putback simply checks in the majority
870            of the work.
871    
872            * setup.py: Add gdalwarp library extension.
873    
874            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
875            Defaults to False, but can be overridden by subclasses if they
876            support classification.
877            (RasterLayer): New. Defines a new layer that represents an
878            image.
879    
880            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
881            tag handler.
882            (SessionLoader.start_layer): Encode the filename.
883            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
884            New. Supports reading a rasterlayer tag.
885    
886            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
887    
888            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
889            get a string in Latin1. If we get such as string convert it to
890            unicode first, otherwise leave if alone before encoding.
891            (SessionSaver.write_layer): Add support for writing both Layers
892            and RasterLayers.
893    
894            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
895            The right argument may not be a string, it could also be a Column.
896    
897            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
898            Make initial window size 600x400. Fixes RTBug #1872.
899    
900            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
901            the dialog is constructed so that we can support layers that
902            do not have classifications.
903            (Classifier._OnTry): Only build a classification if the layer
904            supports one.
905    
906            * Thuban/UI/legend.py: Change all checks that a layer is an
907            instance of Layer into checks against BaseLayer.
908            (LegendTree.__FillTreeLayer): Only add children to a branch if
909            the layer supports classification.
910    
911            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
912            MainWindow.OpenSession): Don't proceed with an action if the
913            user chooses Cancel when they are asked to save changes.
914            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
915            user to select an image file. Create a new RasterLayer and add
916            it to the map.
917    
918            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
919            for rendering RasterLayer layers.
920            (MapRenderer.draw_raster_layer): Actually method that calls
921            the GDALWarp python wrapper and constructs an image from the
922            data returned.
923    
924            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
925            Choices symbols to match those used in the table query method.
926            Replace deprecated method calls on table with new method names.
927    
928            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
929            how small the scale can get. This still needs more testing.
930    
931            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
932            Provides a driver to output in .bmp format.
933    
934            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
935            New. Provides IO routines which write to memory, rather than a file.
936    
937            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
938            of the gdalwarp utility provided in GDAL. Added function calls
939            that can be accessed from python.
940    
941            * Data/iceland_sample_raster.thuban: New. Sample file that uses
942            a raster layer.
943    
944            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
945            layer image data.
946    
947            * Doc/thuban.dtd: Added rasterlayer attribute definition.
948    
949            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
950            tests associated with the raster layer code.
951    
952            * test/test_transientdb.py
953            (TestTransientTable.test_auto_transient_table_query): Added a test
954            for using a Column object as the "right" parameter to a query.
955    
956    2003-05-19  Frank Koormann  <[email protected]>
957    
958            * Thuban/version.py (get_changelog_date):
959            Catch exceptions if ChangeLog does not exist.
960    
961            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
962    
963    2003-05-19  Frank Koormann  <[email protected]>
964    
965            Extended version information for Thuban
966    
967            * Thuban/version.py: New, version information for Thuban: Last
968            modification date and last ChangeLog entry date.
969    
970            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
971            information: Display Thuban, wxPython and Python version.
972    
973    2003-05-16  Bernhard Herzog  <[email protected]>
974    
975            * Thuban/Model/save.py: Remove some unused imports including the
976            __future__ import for nested_scopes as Thuban relies on Python 2.2
977            now.
978            (XMLWriter.encode): Remove the special case for a None argument.
979            In the saver encode is always called with a string argument.
980    
981    2003-05-16  Bernhard Herzog  <[email protected]>
982    
983            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
984            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
985            of the bug was that e.g. float("1.2") would fail. Thuban now
986            requires 2.4.x.
987            
988    2003-05-16  Frank Koormann   <[email protected]>
989    
990            Printing enhancement and WMF export (under Win32)
991    
992            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
993            ScreenRenderer. Renders Map, Legend and Scalebar for export.
994            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
995            PrintRender.
996    
997            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
998            to fullfil information needed for PrinterRenderer.
999            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
1000            (MapCanvas.Print): Adapted to new MapPrintout.
1001            (OutputTransform): General calculations to transform from canvas
1002            coordinates to export/printing devices.
1003    
1004            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
1005            new method_command to call ExportMap, with platform dependency (only
1006            __WXMSW__)
1007      
1008            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
1009            of scalebar drawing area as new parameters.
1010            
1011            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
1012    
1013            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
1014            Update to extended scalebar.DrawScalebar header.
1015    
1016            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
1017    
1018            * test/test_scalebar.py: Made test executable as standalone.
1019    
1020    2003-05-16  Bernhard Herzog  <[email protected]>
1021    
1022            * Thuban/Model/table.py (Table): Remove this compatibility alias
1023            for DBFTable.
1024    
1025            * test/test_table.py: Import DBFTable as Table because that alias
1026            doesn't exist anymore.
1027    
1028            * Thuban/UI/classgen.py: Remove some unused imports
1029    
1030    2003-05-14  Jonathan Coles   <[email protected]>
1031    
1032            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
1033            Fix docstring.
1034            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
1035            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
1036            values of the supplied range to determine the beginning and end
1037            bounds of the generated classes.
1038    
1039            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
1040            do not have a leading 0 (.5 is now accepted as well as 0.5).
1041    
1042            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
1043            call to ClassGenerator.GenUniformDistribution.
1044    
1045            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
1046            layout bug with the 'Projection' label.
1047    
1048            * test/support.py (FloatTestCase): New. Needed for the Range tests.
1049    
1050            * test/test_range.py: New. Imported from SciParam.
1051    
1052    2003-05-12  Jonathan Coles   <[email protected]>
1053    
1054            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
1055            to table.UniqueValues() with calls that retrieve all the values
1056            from the table. This will need to be replaced by a method on table
1057            which can simply return the list (perhaps more efficiently).
1058    
1059    2003-05-12  Jonathan Coles   <[email protected]>
1060    
1061            The return value of ClassGenerator.CalculateQuantiles has changed.
1062            Refer to the documentation for details.
1063    
1064            * test/test_classgen.py: Modified Quantile tests to use the
1065            new return values.
1066    
1067            * Thuban/Model/classgen.py
1068            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
1069            use new return values from CalculateQuantiles to produce the correct
1070            range bounds in the Classification.
1071            (ClassGenerator.CalculateQuantiles): Add more comments describing
1072            the return values and parameters. Make minor adjustments to improve
1073            the legibility of the code. Fix problem with adjusted not being set
1074            in most cases.
1075    
1076    2003-05-12  Frank Koormann <[email protected]>
1077            
1078            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
1079            and latin1. Fixes #1851 finally.
1080    
1081    2003-05-09  Jonathan Coles   <[email protected]>
1082    
1083            * test/test_classgen.py: New. Tests the Quantile algorithm.
1084    
1085            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
1086            Clean up debugging statement, add comments, fix a small bug in the
1087            returned adjusted percentiles.
1088            
1089    2003-05-09  Jonathan Coles   <[email protected]>
1090    
1091            Introduces Range class from SciParam into the ClassGroupRange class,
1092            and such ranges can now be saved and loaded from disk.
1093    
1094            Quantiles are now available in the Classification Generator.
1095    
1096            Initial support for building Queries on a table. Doesn't do anything
1097            but run some tests.
1098    
1099            * Thuban/Model/classification.py: Explicit imports.
1100            (ClassGroupRange): Use the Range class to store the underlying
1101            range information. The interface remains the same, except for
1102            GetRange(), and you can also supply a Range object as the min
1103            parameter to SetRange or __init__.
1104    
1105            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
1106            string appropriately for use in Thuban. Fixes RTbug #1851.
1107            (SessionLoader.end_projection): Handle the context of the
1108            projection tag a bit better by looking at what objects are not
1109            None. There was an assumption that a projection tag for a map
1110            could occur before any layers.
1111            (SessionLoader.start_clrange): Provide backward compatibility for
1112            reading min/max values as well as the new range parameter.
1113    
1114            * Thuban/Model/map.py: Explicit imports.
1115    
1116            * Thuban/Model/resource.py: Import _.
1117            (ProjFileSaver.write): write header using projfile.dtd.
1118    
1119            * Thuban/Model/save.py: Explicit imports.
1120            (XMLWriter.encode): New. Encode the given string from a format
1121            used by Thuban into UTF-8. Fixes RTbug #1851.
1122    
1123            * Thuban/UI/classgen.py: Explicit imports.
1124            (ClassGenDialog.__init__): Clean up the code and add support
1125            for Quantiles.
1126            (ClassGenDialog.OnOK): Add support for Quantiles.
1127            (GenQuantilesPanel): New. Input panel for Quantiles.
1128            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
1129            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
1130    
1131            * Thuban/Model/classgen.py: New. Contains all the classes named above.
1132    
1133            * Thuban/UI/classifier.py: Explicit imports.
1134            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
1135            ClassTable.SetValueAsCustom): Reworked to use new Range class.
1136    
1137            * Thuban/UI/legend.py: Explicit imports.
1138    
1139            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
1140            a Table menu and associated method calls.
1141            (MainWindow.choose_color): Removed. No longer needed.
1142    
1143            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
1144            should be disabled if no projection is selected in the available
1145            list.
1146    
1147            * Thuban/UI/renderer.py: Explicit imports.
1148    
1149            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
1150            with correctly selecting the rows and issuing the right events.
1151            Be sure to call Skip() to allow the grid to do some of its own
1152            handling which allows the rows to actually be selected.
1153            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
1154            selecting multiple shapes.
1155            (LayerTableFrame): Support for building Queries.
1156            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
1157    
1158            * Thuban/UI/tree.py: Explicit imports.
1159    
1160            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
1161            table view can call it.
1162    
1163            * test/test_classification.py: Explicit imports.
1164            (TestClassification.test_ClassGroupRange): Fix test for new
1165            Range class.
1166    
1167            * Doc/thuban.dtd: Add range parameter for clrange.
1168    
1169            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
1170            object in ClassGroupRange, and also uesd for inputting ranges in
1171            the classifer table and elsewhere.
1172    
1173            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
1174            yet.
1175    
1176    2003-05-09  Frank Koormann <[email protected]>
1177    
1178            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
1179    
1180    2003-05-08  Frank Koormann <[email protected]>
1181    
1182            Coding style updates
1183    
1184            * test/test_scalebar.py: Replaced tab indentation by spaces.
1185    
1186            * Thuban/UI/scalebar.py: Explicit imports.
1187    
1188    2003-05-08  Frank Koormann <[email protected]>
1189    
1190            * Thuban/UI/scalebar.py
1191            (ScaleBar.DrawScalebar): Format string bug fixed.
1192    
1193    2003-05-08  Frank Koormann <[email protected]>
1194    
1195            Reorganization of scalebar component (no wx in Thuban/Model)
1196    
1197            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
1198            (deriveInterval):
1199            Calculate scalebar interval and unit which fits in width for scale.
1200            (roundInterval): Round float.
1201    
1202            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
1203    
1204            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
1205    
1206            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
1207    
1208    2003-05-08  Frank Koormann <[email protected]>
1209    
1210            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
1211            Initialize ScaleBar with canvas.map
1212    
1213            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
1214            round intervals to display smarter lengths
1215            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
1216            layer. If the maps has no projection applied grey the scalebar.
1217    
1218    2003-05-07  Frank Koormann <[email protected]>
1219            
1220            Basic Scalebar features added.
1221    
1222            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
1223    
1224            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
1225            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
1226            and the renderer.
1227    
1228            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
1229    
1230            * Thuban/UI/messages.py: SCALE_CHANGED added.
1231    
1232    2003-05-07  Bernhard Herzog  <[email protected]>
1233    
1234            * Thuban/Model/session.py (Session.__init__): New instance
1235            variable shapestores to hold a list of all open shapestore objects
1236            (Session.ShapeStores): New. Accessor method for the shapestores
1237            list.
1238            (Session._add_shapestore, Session._clean_weak_store_refs): New.
1239            Internal methods to maintain the shapestores list.
1240            (Session.Tables): New. Return all tables open in the session.
1241            (Session.OpenShapefile): Insert the new ShapeStore into the
1242            shapestores list.
1243    
1244            * test/test_session.py (TestSessionSimple.test_initial_state): Add
1245            tests for ShapeStores and Tables
1246            (TestSessionWithContent.test_shape_stores)
1247            (TestSessionWithContent.test_tables): New. Test cases for
1248            ShapeStores and Tables
1249    
1250    2003-05-07  Bernhard Herzog  <[email protected]>
1251    
1252            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
1253            Add comments about the optimizations used.
1254            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
1255            Implement the ReadValue table interface method.
1256    
1257            * test/test_transientdb.py
1258            (TestTransientTable.run_iceland_political_tests)
1259            (TestTransientTable.test_transient_joined_table): Add tests for
1260            ReadValue
1261    
1262    2003-05-07  Frank Koormann <[email protected]>
1263    
1264            * Resources/Bitmaps/fulllayerextent.xpm,
1265            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
1266            new icons.
1267    
1268    2003-05-06  Bernhard Herzog  <[email protected]>
1269    
1270            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1271            New. Simply delegate to the transient table's version.
1272    
1273            * test/test_transientdb.py
1274            (TestTransientTable.test_auto_transient_table_query): New. Test
1275            case for AutoTransientTable's SimpleQuery
1276    
1277    2003-05-06  Bernhard Herzog  <[email protected]>
1278    
1279            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
1280            Implement a simple query method for the query dialog
1281            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
1282            the row index or shapeid.
1283            (TransientTable.create): Insert the right value of the row index
1284            (TransientJoinedTable.create): Copy the row index of the left
1285            table to the joined result table
1286    
1287            * test/test_transientdb.py
1288            (TestTransientTable.test_transient_table_read_twice): Fix
1289            doc-string
1290            (TestTransientTable.test_transient_table_query): New. Test for the
1291            SimpleQuery method
1292    
1293    2003-05-06  Bernhard Herzog  <[email protected]>
1294    
1295            Convert all table users to use the new table interface. This only
1296            covers Thuban itself, not GREAT-ER or other applications built on
1297            Thuban yet, so the compatibility interface stays in place for the
1298            time being but it now issues DeprecationWarnings.
1299    
1300            Finally, the new Table interface has a new method, HasColumn.
1301    
1302            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
1303            issue deprecation warnings when they're. The warnings refer to the
1304            caller of the method.
1305            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
1306            for the deprecation warnings
1307    
1308            * test/test_table.py: Ignore the deprecation warnings for the old
1309            table in the tests in this module. The purpose of the tests is to
1310            test the old interface, after all.
1311    
1312            * test/test_transientdb.py
1313            (TestTransientTable.run_iceland_political_tests): Use the
1314            constants for the types. Add a test for HasColumn
1315            (TestTransientTable.test_transient_joined_table): Adapt to new
1316            table interface. Add a test for HasColumn
1317            (TestTransientTable.test_transient_table_read_twice): Adapt to new
1318            table interface
1319    
1320            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
1321            Adapt to new table interface
1322    
1323            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
1324            new table interface
1325    
1326            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
1327            (RecordTable.SetTable): Adapt to new table interface
1328    
1329            * Thuban/UI/classifier.py (Classifier.__init__)
1330            (Classifier.__init__): Adapt to new table interface
1331    
1332            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1333            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
1334            to new table interface
1335    
1336            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
1337            (AutoTransientTable.HasColumn): Implement the new table interface
1338            method
1339            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
1340            (AutoTransientTable.UniqueValues): Adapt to new table interface
1341    
1342            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
1343            Adapt to new table interface
1344    
1345            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
1346            simplify opening shapefiles a bit easier.
1347            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1348            (TestLayer.test_point_layer): Use the new helper method
1349            (TestLayer.test_get_field_type): New. Test for the GetFieldType
1350            method
1351    
1352            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
1353            the new table method
1354    
1355            * test/test_memory_table.py (TestMemoryTable.test_has_column):
1356            Test for the new table method HasColumn
1357    
1358    2003-05-06  Jonathan Coles   <[email protected]>
1359    
1360            Addresses the "Selection Extent" wish of RTbug #1787.
1361    
1362            * Resources/Bitmaps/fulllayerextent.xpm,
1363            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
1364            extent. These are just place holders for the real bitmaps.
1365    
1366            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
1367            calculate the bounding box once (the first time compute_bbox() is
1368            called).
1369            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
1370            the bounding box for the shapes in lat/long coordinates.
1371    
1372            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
1373            option.
1374            (MainWindow.has_selected_shapes): New. Returns true if there are
1375            any selected shapes.
1376            (MainWindow.FullSelectionExtent): New. Calls
1377            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
1378            (_has_selected_shapes): New. Returns true if there are any
1379            selected shapes.
1380    
1381            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
1382            true if there are any selected shapes.
1383    
1384            * Thuban/UI/view.py (MapCanvas): Added delegated method
1385            HasSelectedShapes.
1386            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
1387            shapes on the canvas using the map projection (if any).
1388    
1389            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
1390            for Layer.ShapesBoundingBox().
1391    
1392    2003-05-06  Bernhard Herzog  <[email protected]>
1393    
1394            * Resources/Projections/defaults.proj: Fix spelling of Mercator
1395    
1396    2003-05-05  Jonathan Coles   <[email protected]>
1397    
1398            Addresses the "Full Layer Extent" wish of RTbug #1787.
1399    
1400            * Resources/Projections/defaults.proj: Added UK National Grid.
1401    
1402            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
1403            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
1404            when the user selects the menu option.
1405    
1406            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
1407            scales the given layer on the canvas using the map projection.
1408    
1409    2003-05-05  Bernhard Herzog  <[email protected]>
1410    
1411            Convert the table implementations to a new table interface. All
1412            tables use a common mixin class to provide backwards compatibility
1413            until all table users have been updated.
1414    
1415            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
1416            provide backwards compatibility for table classes implementing the
1417            new interface
1418            (DBFTable, MemoryTable): Implement the new table interface. Use
1419            OldTableInterfaceMixin as base for compatibility
1420            (DBFColumn, MemoryColumn): New. Column description for DBFTable
1421            and MemoryTable resp.
1422    
1423            * test/test_dbf_table.py: New. Test cases for the DBFTable with
1424            the new table interface.
1425    
1426            * test/test_memory_table.py: New. Test cases for the MemoryTable
1427            with the new table interface.
1428    
1429            * test/test_table.py: Document the all tests in this file as only
1430            for backwards compatibility. The equivalent tests for the new
1431            interface are in test_memory_table.py and test_dbf_table.py
1432            (MemoryTableTest.test_read): field_info should be returning tuples
1433            with four items
1434            (MemoryTableTest.test_write): Make doc-string a more precise.
1435    
1436            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
1437            table interface. Derive from from OldTableInterfaceMixin for
1438            compatibility.
1439            (TransientTableBase.create): New intance variable column_map to
1440            map from names and indices to column objects
1441            (TransientTable.create): Use the new table interface of the input
1442            table
1443            (AutoTransientTable): Convert to new table interface. Derive from
1444            from OldTableInterfaceMixin for compatibility.
1445            (AutoTransientTable.write_record): Removed. It's not implemented
1446            yet and we still have to decide how to handle writing with the new
1447            table and data framework.
1448    
1449            * test/test_transientdb.py
1450            (TestTransientTable.run_iceland_political_tests)
1451            (TestTransientTable.test_transient_joined_table): Use the new
1452            table interface
1453    
1454    2003-05-05  Jonathan Coles   <[email protected]>
1455    
1456            This is namely a collection of UI updates to improve user interactivity.
1457            Tabbing between controls now exists and you can use ESC to close dialog
1458            boxes; ENTER will active the default button.
1459    
1460            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
1461            order that the controls are created so that tabbing works correctly.
1462            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
1463            wxDialog can handle the default button correctly.
1464            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
1465            same reasons as for OnOK.
1466            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
1467            when we ask the table for the maximum/minimum values of a field
1468            which could take a very long time.
1469    
1470            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
1471            order that the controls are created so that tabbing works correctly.
1472            (SelectPropertiesDialog.__init__): Rearrange the order that the
1473            controls are created so that tabbing works correctly.
1474    
1475            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
1476            to derive from a wxDialog but behave like the original implementation
1477            which was derived from a wxFrame. wxDialog provides useful key
1478            handling functionality like ESC calling OnCancel and ENTER calling
1479            OnOK which is lost with wxFrame.
1480    
1481            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
1482            new dialogs.
1483    
1484            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
1485            order that the controls are created so that tabbing works correctly.
1486            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
1487            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
1488            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
1489            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
1490            can provide the "UK National Grid" as a default projection.
1491            (UTMPanel.__init__): Rearrange the order that the controls are
1492            created so that tabbing works correctly.
1493    
1494    2003-05-05  Bernhard Herzog  <[email protected]>
1495    
1496            * extensions/thuban/wxproj.cpp: Fix some of the comments.
1497            (project_point): If a map projection but no layer projection is
1498            given, convert degrees to radians before applying the map
1499            projection.
1500    
1501            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
1502            (TableGrid.allow_messages): New methods to make it possible to
1503            inhibit message sending.
1504            (TableGrid.issue): Only send the message if not inhibited.
1505            (LayerTableGrid.select_shape): Use the new methods to make sure
1506            that no ROW_SELECTED message is sent while we're updating the
1507            selected rows to match the selected shapes.
1508    
1509    2003-05-02  Jan-Oliver Wagner <[email protected]>
1510    
1511            Implementation of MemoryTable.
1512    
1513            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
1514            implementation that operates on a list of tuples. All of the data
1515            are kept in the memory.
1516    
1517            * test/test_table.py (MemoryTableTest): New.
1518    
1519            * test/test_transientdb.py (SimpleTable): Removed.
1520            (TestTransientTable.test_transient_joined_table,
1521            (TestTransientTable.test_transient_table_read_twice): Replaced
1522            SimpleTable by MemoryTable.
1523    
1524    2003-04-30  Jonathan Coles   <[email protected]>
1525    
1526            * Data/iceland_sample.thuban: Now contains correct projections
1527            for each of the layers.
1528    
1529            * Resources/Projections/defaults.proj: Geographic projection
1530            contains unit conversion parameter.
1531    
1532    2003-04-30  Jonathan Coles   <[email protected]>
1533    
1534            The most important part of this putback is the projection changes.
1535            It should now be possible to specify the projection that a layer
1536            is in and then specify a different projection for the map. The
1537            projection dialog has an extra parameter for a geographic projection
1538            which lets the user select if the input is in degrees or radians.
1539    
1540            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
1541            to say that the parameter is a tuple of unprojected
1542            points (which is what the callers to this method were assuming).
1543            Also, since the points are unprojected we need to projected them.
1544    
1545            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
1546            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
1547            groups are selected, move the layer up/down. Fixes RTbug #1833.
1548    
1549            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
1550    
1551            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
1552            parameter in call to SetClientData.
1553            (GeoPanel): Add support for selecting the units that the
1554            source data is in (Radians or Degrees).
1555    
1556            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
1557            the rendering loop by reducing the number of if's, removing the
1558            unnecessary try/except block, and checking if the old group
1559            is the same as the new one (which happens a lot if there is
1560            no classification, or lots of shapes are in the same group).
1561    
1562            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
1563            around the redraw routine to try to catch problems that the user
1564            may create by selecting invalid projections for the data set and
1565            map. Clears the display if there are any problems and prints the
1566            error.
1567            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
1568            rectangle.
1569    
1570            * extensions/thuban/wxproj.cpp (project_point): First invert the
1571            supplied point (which should be in projected coordinates) using
1572            the layer's projection and then project the point using the
1573            map's projection.
1574            (project_points): Use project_point() to project each point.
1575    
1576    2003-04-30  Jan-Oliver Wagner <[email protected]>
1577    
1578            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
1579            don't set the Classification to None if the classfication field
1580            is None (ie only a DEFAULT).
1581    
1582    2003-04-30  Bernhard Herzog  <[email protected]>
1583    
1584            * Thuban/UI/view.py: Fix some typos.
1585    
1586            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
1587            not pop up the dialog if the selection becomes empty (this could
1588            happen if e.g. a new selection is opened while the identify tool
1589            is active and dialog had been closed)
1590    
1591    2003-04-30  Bernhard Herzog  <[email protected]>
1592    
1593            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
1594            instance variable read_record_last_result
1595            (TransientTableBase.read_record): Make sure reading the same
1596            record twice works. The implementation uses the new instance
1597            variable read_record_last_result
1598    
1599            * test/test_transientdb.py
1600            (TestTransientTable.test_transient_table_read_twice): New test
1601            case for the above bug-fix.
1602    
1603    2003-04-29  Jonathan Coles   <[email protected]>
1604    
1605            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
1606    
1607            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
1608    
1609            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
1610            (ClassTable.SetValueAsCustom): Rename keyword argument in
1611            ClassGroup* constructors to match argument name.
1612    
1613    2003-04-29  Bernhard Herzog  <[email protected]>
1614    
1615            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
1616            transient DB if it exists to make sure it doesn't leave a journal
1617            file in the temp directory.
1618    
1619            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
1620            self.conn to None after closing the connection to make sure it's
1621            not closed twice
1622    
1623    2003-04-29  Jonathan Coles   <[email protected]>
1624    
1625            Add a visible parameter in the layer XML tag. The default value is
1626            "true". If anything other than "false" is specified we also assume
1627            "true". Addresses RTbug #1025.
1628    
1629            * Doc/thuban.dtd: Add visible parameter to a layer.
1630    
1631            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
1632            of visible from 1 to True.
1633            (Layer.__init__): Change default value of visible from 1 to True.
1634    
1635            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
1636            parameter.
1637    
1638            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
1639            parameter.
1640    
1641            * test/test_load.py: Add new test data contents_test_visible.
1642            (LoadSessionTest.setUp): save test data.
1643            (LoadSessionTest.testLayerVisibility): Test if the visible flag
1644            is loaded correctly.
1645    
1646            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
1647            for saving an invisible layer.
1648    
1649    2003-04-29  Jonathan Coles   <[email protected]>
1650    
1651            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
1652            legend dialog box and tell it to change its map to the one
1653            supplied to SetMap(). Fixes RTbug #1770.
1654    
1655    2003-04-29  Bernhard Herzog  <[email protected]>
1656    
1657            Next step of table implementation. Introduce a transient database
1658            using SQLite that some of the data is copied to on demand. This
1659            allows us to do joins and other operations that require an index
1660            for good performance with reasonable efficiency. Thuban now needs
1661            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
1662            haven't tested that.
1663            
1664            * Thuban/Model/transientdb.py: New. Transient database
1665            implementation.
1666    
1667            * test/test_transientdb.py: New. Tests for the transient DB
1668            classes.
1669    
1670            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
1671            classes to help automatically remove temporary files and
1672            directories.
1673            (Session.__init__): New instance variables temp_dir for the
1674            temporary directory and transient_db for the SQLite database
1675            (Session.temp_directory): New. Create a temporary directory if not
1676            yet done and return its name. Use AutoRemoveDir to have it
1677            automatically deleted
1678            (Session.TransientDB): Instantiate the transient database if not
1679            done yet and return it.
1680    
1681            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
1682            AutoTransientTable so that data is copied to the transient DB on
1683            demand.
1684            (SimpleStore): New class that simply combines a table and a
1685            shapefile
1686    
1687            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
1688            DBFTable and update its doc-string to reflect the fact that this
1689            is only the table interface to a DBF file. Table is now an alias
1690            for DBFTable for temporary backwards compatibility.
1691    
1692            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
1693            the last reference to the session goes away so that the temporary
1694            files are removed properly.
1695    
1696            * test/test_load.py (LoadSessionTest.tearDown): Remove the
1697            reference to the session to make sure the temporary files are
1698            removed.
1699    
1700    2003-04-29  Bernhard Herzog  <[email protected]>
1701    
1702            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
1703            the __parser instance variable into a normal local variable in
1704            read. It's only used there and read will never be called more than
1705            once. Plus it introduces a reference cycle that keeps can keep the
1706            session object alive for a long time.
1707    
1708    2003-04-29  Jonathan Coles   <[email protected]>
1709    
1710            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
1711            Projection an immutable item. Fixes RTbug #1825.
1712            (Projection.__init__): Initialize instance variables here.
1713            (ProjFile.Replace): New. Replace the given projection object with
1714            the new projection object. This solves the problem of needing the
1715            mutator Projection.SetProjection() in the ProjFrame class and
1716            allows a projection to change parameters without changing its
1717            location in the file.
1718    
1719            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
1720            be of type wxSAVE and should verify overwriting a file.
1721    
1722            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
1723            ProjFile.Replace() method instead of the mutator
1724            Projection.SetProjection(). Also requires that we reassign the
1725            client data to the new projection.
1726    
1727            * test/test_proj.py (TestProjection.test): Test GetName() and
1728            GetAllParameters()
1729            (TestProjFile.test): Remove tests for Set*() methods. Add tests
1730            for Replace().
1731    
1732    2003-04-25  Jonathan Coles   <[email protected]>
1733    
1734            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
1735            to save the name of the projection.
1736    
1737            * test/test_save.py (SaveSessionTest.testLayerProjection): New
1738            test to verify layer projections are saved correctly.
1739    
1740    2003-04-25  Jonathan Coles   <[email protected]>
1741    
1742            * Thuban/Model/proj.py (Projection.SetName): Set the name
1743            to "Unknown" if name is None.
1744            (Projection.SetAllParameters): New. Set the projection's
1745            parameter list to the one supplied.
1746            (Projection.SetProjection): New. Set the projection's
1747            properties to those of the supplied Projection.
1748    
1749            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
1750            the dialog title to include the map's title.
1751            (MainWindow.LayerProjection): Set the dialog title to include
1752            the layer's title.
1753    
1754            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
1755            error dialogs into a single method call.
1756            (ProjFrame.__VerifyButtons): Add more states to check.
1757            (ProjFrame.__GetProjection): Return the current state of an
1758            edited projection or None.
1759            (ProjFrame.__FillAvailList): Remove checks for states that
1760            shouldn't exist.
1761            (ProjFrame._OnNew): Clear all selected items and supply
1762            a projection panel if necessary.
1763    
1764            * test/test_proj.py (TestProjFile.test): Add tests for
1765            ProjFile.SetAllParameters, ProjFile.SetProjection,
1766            ProjFile.SetName.
1767    
1768    2003-04-25  Jonathan Coles   <[email protected]>
1769    
1770            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
1771            takes an optional argument to select the current projection.
1772            This does not guarantee that the item is visible due to
1773            limited wxWindows functionality. Fixes RTBug #1821.
1774    
1775    2003-04-25  Jonathan Coles   <[email protected]>
1776    
1777            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1778            the projection name and use it when constructing the Projection
1779            object.
1780    
1781            * Thuban/Model/proj.py (Projection.__init__): Change the default
1782            value for 'name' to None and then test if name is equal to None
1783            in the body of the constructor. This way the caller doesn't have to
1784            know what the default value should be. Namely, useful in load.py
1785            where we have to pick a default value if the 'name' parameter
1786            doesn't exist in the XML file.
1787    
1788            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1789            Tests a file where a layer has a projection.
1790    
1791    2003-04-25  Jonathan Coles   <[email protected]>
1792    
1793            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1794            tree for projection information.
1795    
1796            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1797            XMLReader.GetFileName.
1798            (SessionLoader): Added support for loading projection tags that
1799            appear inside a layer.
1800    
1801            * Thuban/Model/proj.py (ProjFile): Document the class. Move
1802            back to using a list because the order of the projections in
1803            the file is important to maintain. Fixes RTbug #1817.
1804    
1805            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1806            to ProjFile.GetFilename.
1807    
1808            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1809            information.
1810    
1811            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1812            ProjFrame._OnSaveAs. Removed old dead code from previous
1813            implementation.
1814            (ProjFrame._OnExport): Add support for exporting more than one
1815            projection to a single file.
1816            (ProjFrame.__FillAvailList): use string formatting (% operator)
1817            to build strings that are (partly) translated. Fixes RTbug #1818.
1818    
1819            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1820            class.
1821    
1822    2003-04-24  Bernhard Herzog  <[email protected]>
1823    
1824            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1825    
1826            * po/fr.po: New. French translation by Daniel Calvelo Aros
1827    
1828            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1829            empty strings.
1830    
1831    2003-04-24  Jonathan Coles   <[email protected]>
1832    
1833            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1834            implement the interface that the ProjFrame dialog expects.
1835    
1836            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1837            name of the projection to be changed.
1838            (ProjFile): Use a dictionary instead of a list so that removing
1839            projections is easier and we are sure about uniqueness.
1840            (ProjFile.Remove): Remove the given projection object.
1841    
1842            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1843            Return a list with only one projection file instead of searching for
1844            any projection file. This simplifies many things if the user can
1845            only have one system file and one user file.
1846    
1847            * Thuban/UI/classgen.py: Change all references to
1848            genCombo to genChoice.
1849    
1850            * Thuban/UI/mainwindow.py: Add a Projection option under the
1851            layer menu.
1852            (MainWindow.LayerProjection): New. Open up a projection window
1853            for a layer.
1854    
1855            * Thuban/UI/projdialog.py: Large changes to how the dialog is
1856            laid out. Use three panels instead of one. One for the list of
1857            projections, one for the edit controls, and one for the buttons.
1858            Fixed resizing problems so that the dialog resizes correctly
1859            when the projection panel changes. Added import/export, save, and
1860            new buttons/functionality.
1861    
1862  2003-04-24  Bernhard Herzog  <[email protected]>  2003-04-24  Bernhard Herzog  <[email protected]>
1863    
1864          First step towards table management. Introduce a simple data          First step towards table management. Introduce a simple data

Legend:
Removed from v.723  
changed lines
  Added in v.1143

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26