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

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

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

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

Legend:
Removed from v.688  
changed lines
  Added in v.1089

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26