/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

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

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

Legend:
Removed from v.766  
changed lines
  Added in v.1127

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26