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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26