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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26