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

Legend:
Removed from v.701  
changed lines
  Added in v.1137

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26