/[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 35 by bh, Thu Sep 6 15:33:09 2001 UTC revision 1077 by frank, Wed May 28 08:25:34 2003 UTC
# Line 1  Line 1 
1    2003-05-28  Frank Koormann  <[email protected]>
2    
3            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
4            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
5    
6    2003-05-27  Bernhard Herzog  <[email protected]>
7    
8            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
9            delegate SelectedLayer.
10            (MainWindow.LayerUnjoinTable): Implement.
11            (_can_unjoin): New. Helper function for the sensitivity of the
12            layer/unjoin command.
13    
14            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
15            (DerivedShapeStore.OrigShapeStore): New. Return the original
16            shapestore. Used to figure out how to unjoin.
17            (DerivedShapeStore.Shapefile): Fix a typo.
18    
19    2003-05-27  Bernhard Herzog  <[email protected]>
20    
21            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
22            well
23            (JoinDialog.__init__): Use the layer parameter and only build the
24            left choice when a layer is given
25            (JoinDialog.OnJoin): Handle layer joins as well
26            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
27            that the user selects the "Select..." item. The sensitivitly
28            updating is now in update_sensitivity
29            (JoinDialog.y): New method to refactor the sensitivity update of
30            the join button into its own method.
31    
32            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
33    
34    2003-05-27  Bernhard Herzog  <[email protected]>
35    
36            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
37            iff there are unreferenced tables in the session
38    
39    2003-05-27  Bernhard Herzog  <[email protected]>
40    
41            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
42    
43            * Thuban/Model/session.py (Session.UnreferencedTables): New method
44            to return tables that are not referenced by other tables or shape
45            stores and can be removed.
46            (Session.RemoveTable): Issue a TABLE_REMOVED message after
47            removing the table
48    
49            * Thuban/UI/mainwindow.py: Remove unused imports
50            (MainWindow.TableClose): Implement.
51    
52            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
53            messages so that the frame will be automatically closed when a new
54            session is opened or the table is removed.
55            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
56            __init__
57            (TableFrame.close_on_session_replaced)
58            (TableFrame.close_on_table_removed): New. Subscribers that close
59            the window
60    
61            * test/test_session.py (TestSessionMessages.test_remove_table)
62            (TestSessionSimple.test_remove_table): Move the test to
63            TestSessionSimple and add test for the TABLE_REMOVED message
64            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
65            (TestSessionSimple.test_unreferenced_tables) New. Test for the
66            UnreferencedTables method.
67            (UnreferencedTablesTests): New. Class with some more sophisticated
68            tests for UnreferencedTables.
69    
70    2003-05-27  Frank Koormann  <[email protected]>
71    
72            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
73            display has some unwanted side effects. Removed again.
74    
75    2003-05-27  Frank Koormann  <[email protected]>
76    
77            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
78    
79            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
80    
81    2003-05-27  Jan-Oliver Wagner <[email protected]>
82    
83            * test/test_menu.py (MenuTest.test): Added test for
84            Menu.RemoveItem().
85    
86            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
87            the menu.
88    
89    2003-05-27  Frank Koormann  <[email protected]>
90            
91            Nonmodal dialogs without parent (i.e. they can fall behind the main
92            window)
93    
94            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
95            all dialogs in the dialogs dictionary and the canvas.
96    
97            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
98            parent, i.e. can fall behind other windows.
99            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
100            dictionary before removing it.
101    
102            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
103    
104            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
105            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
106            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
107    
108    2003-05-27  Bernhard Herzog  <[email protected]>
109    
110            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
111            tableview dialog
112            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
113            Also, don't use the table's titles as the dialog names. The titles
114            aren't guaranteed to be unique.
115            (MainWindow.TableOpen): Open a table view dialog after opening the
116            table
117    
118    2003-05-27  Bernhard Herzog  <[email protected]>
119    
120            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
121            effect can be achieved by simply closing the window showing the
122            table.
123            (MainWindow.TableHide): Removed.
124            (main_menu): Removed "table_hide"
125    
126    2003-05-27  Frank Koormann  <[email protected]>
127    
128            Fix legend tree display problems under Win32
129    
130            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
131            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
132            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
133    
134            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
135    
136    2003-05-27  Jan-Oliver Wagner <[email protected]>
137    
138            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
139            'after' now allows to insert separators almost anywhere in the menu.
140    
141    2003-05-27  Frank Koormann  <[email protected]>
142    
143            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
144            "S" of selection box label to hint on hot key (Alt-S). Works under
145            Win32 but is ignored under GTK.
146    
147    2003-05-26  Frank Koormann  <[email protected]>
148    
149            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
150            Center Choices.
151    
152    2003-05-26  Bernhard Herzog  <[email protected]>
153    
154            Remove the Precision methods again. They're too DBF specific to be
155            part of the table interface and they're only used in table_to_dbf
156            anyway.
157            
158            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
159            fixed precision of 12 for doubles.
160            (TransientTableBase.Precision): Removed
161            (AutoTransientTable.Width): Delegate to self.table.
162    
163            * Thuban/Model/table.py (DBFTable.Precision)
164            (MemoryTable.Precision): Removed.
165            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
166            (table_to_dbf): Use a fixed precision of 12 for floats unless the
167            column object specifies something else.
168    
169            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
170            test for table_to_dbf
171    
172    2003-05-26  Bernhard Herzog  <[email protected]>
173    
174            * test/test_transientdb.py
175            (TestTransientTable.run_iceland_political_tests): Fix a comment.
176    
177    2003-05-26  Bernhard Herzog  <[email protected]>
178    
179            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
180            implementation. Mark parts of the file format strings for
181            localization.
182    
183            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
184            file and add the table to the tables managed by the session
185    
186            * test/test_session.py (TestSessionSimple.test_open_table_file):
187            New. test case for OpenTableFile
188    
189    2003-05-26  Jan-Oliver Wagner <[email protected]>
190    
191            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
192            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
193            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
194            Replace the true/false of wxWindows by True/False of Python 2.2.1.
195    
196    2003-05-26  Jan-Oliver Wagner <[email protected]>
197    
198            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
199            already a selection present, update the grid accordingly.
200    
201            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
202            resizeable and increase its initial size.
203    
204    2003-05-26  Frank Koormann  <[email protected]>
205    
206            Table export functionality
207    
208            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
209            Return width (in characters) for a column.
210            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
211            (table_to_dbf): Write table to dbf file.
212            (table_to_csv): Write table to csv file.
213    
214            * Thuban/Model/transientdb.py (TransientTableBase.Width,
215            TransientTableBase.Precision): Return column width and precision.
216    
217            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
218            or table_to_csv depending on file selection.
219    
220            * test/test_dbf_table.py:
221            Test table_to_dbf (extension of former part of test).
222    
223            * test/test_csv_table.py:
224            Test table_to_csv.
225    
226    2003-05-23  Jan-Oliver Wagner <[email protected]>
227    
228            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
229            Use QueryTableFrame instead of TableFrame.
230    
231            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
232            table window with 'Layer Table:' instead of 'Table:'.
233    
234    2003-05-23  Jan-Oliver Wagner <[email protected]>
235    
236            Give all tables a title via mix-in TitledObject.LayerShowTable
237    
238            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
239            only if it exists.
240    
241            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
242            and call its init-method with a default title. Remove Title() method.
243    
244            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
245            AutoTransientTable): mix-in TitledObject and call its init-method with
246            a default title. Remove Title() method.
247    
248    2003-05-23  Bernhard Herzog  <[email protected]>
249    
250            * Thuban/Model/session.py (Session.AddShapeStore): Define
251            AddShapeStore analogously to AddTable.
252    
253            * test/test_session.py (TestSessionSimple.test_add_shapestore):
254            New. Test for AddShapeStore
255    
256    2003-05-23  Jan-Oliver Wagner <[email protected]>
257    
258            Introducing QueryTableFrame and a very coarse ShowTable implementation.
259    
260            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
261            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
262            The latter implements the selection GUI without dependency on a layer.
263            LayerTableFrame now is derived from QueryTableFrame and connects
264            to a layer.
265    
266            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
267            implementation that still needs work.
268    
269            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
270    
271    2003-05-22  Frank Koormann  <[email protected]>
272    
273            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
274            Added "outer_join = False" as optional parameter.
275            (TransientJoinedTable.create): If outer join is true, perform a
276            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
277            the left table. Records not matching are filled with 0 / None.
278    
279            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
280            (JoinDialog.OnJoin): Consider outer join check box.
281    
282    2003-05-22  Bernhard Herzog  <[email protected]>
283    
284            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
285            somewhat safer way. Storing the traceback in a local variable can
286            lead to memory leaks
287    
288    2003-05-22  Bernhard Herzog  <[email protected]>
289    
290            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
291            the wxMessageDialog's Destroy() method.
292    
293    2003-05-22  Frank Koormann  <[email protected]>
294    
295            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
296            TransientTable.Title()
297    
298    2003-05-22  Frank Koormann  <[email protected]>
299    
300            Join Dialog, initial version.
301    
302            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
303    
304            * Thuban/UI/join.py (JoinDialog): Functional implementation of
305            former framework. Renamed Table1/Table2 to LeftTable/RightTable
306            in all occurences.
307    
308            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
309            Typo fixed.
310    
311    2003-05-22  Bernhard Herzog  <[email protected]>
312    
313            Give the tables titles so that the GUI can display more meaningful
314            names. For now the titles are fixed but depend on e.g. filenames
315            or the titles of the joined tables.
316    
317            * Thuban/Model/transientdb.py (TransientTable.Title)
318            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
319    
320            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
321    
322            * test/test_transientdb.py
323            (TestTransientTable.test_auto_transient_table_title): New. Test
324            for the Title method
325            (TestTransientTable.test_transient_joined_table)
326            (TestTransientTable.test_transient_table): Add test for the Title
327            methods
328    
329            * test/test_memory_table.py (TestMemoryTable.test_title): New.
330            Test for the Title method
331    
332            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
333            the Title method
334    
335    2003-05-22  Bernhard Herzog  <[email protected]>
336    
337            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
338            Provide a better way to destroy the layers
339            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
340            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
341            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
342            the new way to destroy the layers.
343            (TestLayer.test_derived_store): New. Test for using a layer with a
344            DerivedShapeStore
345    
346            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
347            filename if the shape store actually has one.
348    
349    2003-05-22  Bernhard Herzog  <[email protected]>
350    
351            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
352            for the filename
353    
354            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
355            for the FileName method
356            (TestDBFTableWriting.test_write): Fix spelling of filename
357    
358    2003-05-22  Thomas Koester  <[email protected]>
359    
360            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
361            from SciParam that now really is immutable.
362    
363    2003-05-22  Frank Koormann  <[email protected]>
364    
365            Layer Top/Bottom placement added to legend.
366    
367            * Thuban/UI/legend.py
368            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
369            bound to tool events.
370            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
371            New, methods binding the event methods with the map methods.
372    
373            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
374            layer at top/bottom of layer stack.
375    
376            * Resources/Bitmaps/top_layer.xpm: New button icon.
377    
378            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
379    
380    2003-05-22  Bernhard Herzog  <[email protected]>
381    
382            * Thuban/Model/session.py (Session.RemoveTable): New method to
383            remove tables
384    
385            * test/test_session.py (TestSessionSimple.test_remove_table): New.
386            Test for RemoveTable
387    
388    2003-05-22  Thomas Koester  <[email protected]>
389    
390            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
391            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
392    
393    2003-05-22  Bernhard Herzog  <[email protected]>
394    
395            Implement a way to discover dependencies between tables and
396            shapestores.
397    
398            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
399            (TransientJoinedTable.Dependencies)
400            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
401            interface
402            (TransientJoinedTable.__init__): Keep tack of the original table
403            objects in addition to the corresponding transient tables.
404    
405            * Thuban/Model/table.py (DBFTable.Dependencies)
406            (MemoryTable.Dependencies): New. Implement the dependencies
407            interface
408    
409            * Thuban/Model/data.py (ShapeTable): New. Helper class for
410            ShapefileStore
411            (ShapefileStore.__init__): Use ShapeTable instead of
412            AutoTransientTable
413            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
414            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
415            methods for filename and type
416            (ShapefileStore.Dependencies): New. Implement the dependencies
417            interface
418            (DerivedShapeStore): New class to replace SimpleStore. The main
419            difference to SimpleStore is that it depends not on a shapefile
420            but another shapestore which expresses the dependencies a bit
421            better
422            (SimpleStore.__init__): Add deprecation warning.
423    
424            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
425            Test for the Dependencies method.
426    
427            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
428            New. Test for the Dependencies method.
429    
430            * test/test_transientdb.py
431            (TestTransientTable.test_auto_transient_table_dependencies): New.
432            Test for the Dependencies method.
433            (TestTransientTable.test_transient_joined_table): Add test for the
434            Dependencies method.
435    
436            * test/test_session.py (TestSessionSimple.setUp)
437            (TestSessionSimple.tearDown): New. Implement a better way to
438            destroy the sessions.
439            (TestSessionSimple.test_initial_state)
440            (TestSessionSimple.test_add_table): Bind session to self.session
441            so that it's destroyed by tearDown
442            (TestSessionSimple.test_open_shapefile): New. Test for
443            OpenShapefile and the object it returns
444    
445    2003-05-22  Bernhard Herzog  <[email protected]>
446    
447            * Thuban/Model/session.py (Session.AddTable): New method to
448            register tables with the session.
449            (Session.Tables): Return the tables registered with AddTable too.
450    
451            * test/test_session.py (TestSessionSimple.test_add_table): New.
452            Test case for the AddTable method
453    
454    2003-05-22  Frank Koormann  <[email protected]>
455    
456            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
457            lower right corner, center labels for selections, initialize controls
458            in reasonable order for keyboard navigation.
459    
460            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
461            (ProjFrame.__DoOnProjAvail): Determine position of current projection
462            using the wxListBox.FindString() method. Still a problem (#1886)
463    
464            * Thuban/UI/classifier.py
465            (Classifier.__init__, SelectPropertiesDialog.__init__)
466    
467            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
468            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
469            different classification types from here to __init__.
470            (GenUniquePanel.__init__): Set the column width of the first field
471            in the Field ListCtrl to the full width.
472    
473            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
474            Button to 'Export'. Center Buttons in Selection Box, set Focus to
475            Grid.
476            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
477            changes focus to the Selection when pressing "Alt-S".
478    
479            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
480            the text if not visible. The italic font sometimes exceeds the
481            rendering area.
482    
483    2003-05-21  Jonathan Coles   <[email protected]>
484    
485            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
486            to OnClose so that Thuban closes correctly.
487    
488            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
489            DockFrame.OnClose, not DockFrame._OnClose.
490    
491    2003-05-21  Jonathan Coles   <[email protected]>
492    
493            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
494            references to 'inf' and use new Range __init__ to pass floats
495            directly rather than converting them to strings first.
496            Fixes RTBug #1876.
497    
498            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
499            Use new Range ___init__ to pass floats.
500    
501            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
502            filename is a valid image file. Throw IOError otherwise.
503    
504            * Thuban/Model/range.py: Brought over new Range from SciParam that
505            is immutable and has an __init__ which can accept floats.
506    
507            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
508            into try block. AddLayer doesn't throw any exceptions anymore.
509            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
510            try block.
511    
512            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
513            the first item in choices. Fixes RTBug #1882.
514    
515            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
516            has gone to 0 which is a serious problem. abort.
517            (MapRenderer.draw_raster_layer): Catch IOError seperately and
518            print the error from GDAL.
519    
520            * Thuban/UI/tableview.py (TableGrid.__init__): Call
521            ToggleEventListeners to turn on listening.
522            (TableGrid.ToggleEventListeners): New. Turns event listening on
523            and off so as to prevent excessive messages.
524            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
525            to suppress excessive messages when selecting many rows.
526            Fixes RTBug #1880.
527    
528            * Thuban/UI/view.py: Added checks against if scale == 0. This
529            is a serious problem that can occur when an image without
530            geo data is loading and causes the map projection bounds to
531            go to infinity. Right now, the solution is to simply try
532            to recover.
533    
534            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
535            to set the MFILEReceiver attributes even if the data is NULL.
536    
537            * extensions/thuban/gdalwarp.cpp: Improved the error handling
538            and passed GDAL messages back up to the Python layer. Also
539            tried to fix some memory leaks that were present in the original
540            utility but didn't matter because the program aborted.
541    
542            * test/test_range.py: Copied over tests from SciParam. Removed
543            tests against importing. Fixes RTBug #1867.
544    
545    2003-05-21  Bernhard Herzog  <[email protected]>
546    
547            * test/test_load.py: Remove unused imports and restructure the
548            test code
549            (LoadSessionTest): Split into one class for each test and turn
550            LoadSessionTest itself into the base class for all such session
551            tests.
552            (ClassificationTest): New base class for load tests that test
553            classifications
554            (TestSingleLayer, TestLayerVisibility, TestClassification)
555            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
556            for the individual tests
557    
558            * test/support.py (FileLoadTestCase.filename): New base class for
559            file loading tests
560    
561    2003-05-21  Jan-Oliver Wagner <[email protected]>
562    
563            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
564            Mercator' to 'UTM Zone 32' as a more convenient example.
565            Added 'Gauss Krueger Zone 6'.
566    
567            * Data/iceland_sample_raster.thuban: political polygon now
568            filled transparent to have the raster image visible at once.
569    
570    2003-05-21  Frank Koormann  <[email protected]>
571    
572            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
573            OnClose() to keep in sync with extensions. Internally Thuban
574            still uses "underscored" names.
575    
576    2003-05-20  Jonathan Coles   <[email protected]>
577    
578            This puts back Raster layer support. These layers support projections
579            through the GDAL library. Currently, the CVS version is being used.
580            There are no Debian packages available although this may change soon.
581            A GDAL driver was extended to support writing to memory rather to
582            files.
583    
584            There is still some work that needs to be done, such as some error
585            handling when loading invalid images or when there is a problem
586            projecting the image. This putback simply checks in the majority
587            of the work.
588    
589            * setup.py: Add gdalwarp library extension.
590    
591            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
592            Defaults to False, but can be overridden by subclasses if they
593            support classification.
594            (RasterLayer): New. Defines a new layer that represents an
595            image.
596    
597            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
598            tag handler.
599            (SessionLoader.start_layer): Encode the filename.
600            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
601            New. Supports reading a rasterlayer tag.
602    
603            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
604    
605            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
606            get a string in Latin1. If we get such as string convert it to
607            unicode first, otherwise leave if alone before encoding.
608            (SessionSaver.write_layer): Add support for writing both Layers
609            and RasterLayers.
610    
611            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
612            The right argument may not be a string, it could also be a Column.
613    
614            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
615            Make initial window size 600x400. Fixes RTBug #1872.
616    
617            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
618            the dialog is constructed so that we can support layers that
619            do not have classifications.
620            (Classifier._OnTry): Only build a classification if the layer
621            supports one.
622    
623            * Thuban/UI/legend.py: Change all checks that a layer is an
624            instance of Layer into checks against BaseLayer.
625            (LegendTree.__FillTreeLayer): Only add children to a branch if
626            the layer supports classification.
627    
628            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
629            MainWindow.OpenSession): Don't proceed with an action if the
630            user chooses Cancel when they are asked to save changes.
631            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
632            user to select an image file. Create a new RasterLayer and add
633            it to the map.
634    
635            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
636            for rendering RasterLayer layers.
637            (MapRenderer.draw_raster_layer): Actually method that calls
638            the GDALWarp python wrapper and constructs an image from the
639            data returned.
640    
641            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
642            Choices symbols to match those used in the table query method.
643            Replace deprecated method calls on table with new method names.
644    
645            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
646            how small the scale can get. This still needs more testing.
647    
648            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
649            Provides a driver to output in .bmp format.
650    
651            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
652            New. Provides IO routines which write to memory, rather than a file.
653    
654            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
655            of the gdalwarp utility provided in GDAL. Added function calls
656            that can be accessed from python.
657    
658            * Data/iceland_sample_raster.thuban: New. Sample file that uses
659            a raster layer.
660    
661            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
662            layer image data.
663    
664            * Doc/thuban.dtd: Added rasterlayer attribute definition.
665    
666            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
667            tests associated with the raster layer code.
668    
669            * test/test_transientdb.py
670            (TestTransientTable.test_auto_transient_table_query): Added a test
671            for using a Column object as the "right" parameter to a query.
672    
673    2003-05-19  Frank Koormann  <[email protected]>
674    
675            * Thuban/version.py (get_changelog_date):
676            Catch exceptions if ChangeLog does not exist.
677    
678            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
679    
680    2003-05-19  Frank Koormann  <[email protected]>
681    
682            Extended version information for Thuban
683    
684            * Thuban/version.py: New, version information for Thuban: Last
685            modification date and last ChangeLog entry date.
686    
687            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
688            information: Display Thuban, wxPython and Python version.
689    
690    2003-05-16  Bernhard Herzog  <[email protected]>
691    
692            * Thuban/Model/save.py: Remove some unused imports including the
693            __future__ import for nested_scopes as Thuban relies on Python 2.2
694            now.
695            (XMLWriter.encode): Remove the special case for a None argument.
696            In the saver encode is always called with a string argument.
697    
698    2003-05-16  Bernhard Herzog  <[email protected]>
699    
700            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
701            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
702            of the bug was that e.g. float("1.2") would fail. Thuban now
703            requires 2.4.x.
704            
705    2003-05-16  Frank Koormann   <[email protected]>
706    
707            Printing enhancement and WMF export (under Win32)
708    
709            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
710            ScreenRenderer. Renders Map, Legend and Scalebar for export.
711            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
712            PrintRender.
713    
714            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
715            to fullfil information needed for PrinterRenderer.
716            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
717            (MapCanvas.Print): Adapted to new MapPrintout.
718            (OutputTransform): General calculations to transform from canvas
719            coordinates to export/printing devices.
720    
721            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
722            new method_command to call ExportMap, with platform dependency (only
723            __WXMSW__)
724      
725            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
726            of scalebar drawing area as new parameters.
727            
728            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
729    
730            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
731            Update to extended scalebar.DrawScalebar header.
732    
733            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
734    
735            * test/test_scalebar.py: Made test executable as standalone.
736    
737    2003-05-16  Bernhard Herzog  <[email protected]>
738    
739            * Thuban/Model/table.py (Table): Remove this compatibility alias
740            for DBFTable.
741    
742            * test/test_table.py: Import DBFTable as Table because that alias
743            doesn't exist anymore.
744    
745            * Thuban/UI/classgen.py: Remove some unused imports
746    
747    2003-05-14  Jonathan Coles   <[email protected]>
748    
749            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
750            Fix docstring.
751            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
752            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
753            values of the supplied range to determine the beginning and end
754            bounds of the generated classes.
755    
756            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
757            do not have a leading 0 (.5 is now accepted as well as 0.5).
758    
759            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
760            call to ClassGenerator.GenUniformDistribution.
761    
762            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
763            layout bug with the 'Projection' label.
764    
765            * test/support.py (FloatTestCase): New. Needed for the Range tests.
766    
767            * test/test_range.py: New. Imported from SciParam.
768    
769    2003-05-12  Jonathan Coles   <[email protected]>
770    
771            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
772            to table.UniqueValues() with calls that retrieve all the values
773            from the table. This will need to be replaced by a method on table
774            which can simply return the list (perhaps more efficiently).
775    
776    2003-05-12  Jonathan Coles   <[email protected]>
777    
778            The return value of ClassGenerator.CalculateQuantiles has changed.
779            Refer to the documentation for details.
780    
781            * test/test_classgen.py: Modified Quantile tests to use the
782            new return values.
783    
784            * Thuban/Model/classgen.py
785            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
786            use new return values from CalculateQuantiles to produce the correct
787            range bounds in the Classification.
788            (ClassGenerator.CalculateQuantiles): Add more comments describing
789            the return values and parameters. Make minor adjustments to improve
790            the legibility of the code. Fix problem with adjusted not being set
791            in most cases.
792    
793    2003-05-12  Frank Koormann <[email protected]>
794            
795            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
796            and latin1. Fixes #1851 finally.
797    
798    2003-05-09  Jonathan Coles   <[email protected]>
799    
800            * test/test_classgen.py: New. Tests the Quantile algorithm.
801    
802            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
803            Clean up debugging statement, add comments, fix a small bug in the
804            returned adjusted percentiles.
805            
806    2003-05-09  Jonathan Coles   <[email protected]>
807    
808            Introduces Range class from SciParam into the ClassGroupRange class,
809            and such ranges can now be saved and loaded from disk.
810    
811            Quantiles are now available in the Classification Generator.
812    
813            Initial support for building Queries on a table. Doesn't do anything
814            but run some tests.
815    
816            * Thuban/Model/classification.py: Explicit imports.
817            (ClassGroupRange): Use the Range class to store the underlying
818            range information. The interface remains the same, except for
819            GetRange(), and you can also supply a Range object as the min
820            parameter to SetRange or __init__.
821    
822            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
823            string appropriately for use in Thuban. Fixes RTbug #1851.
824            (SessionLoader.end_projection): Handle the context of the
825            projection tag a bit better by looking at what objects are not
826            None. There was an assumption that a projection tag for a map
827            could occur before any layers.
828            (SessionLoader.start_clrange): Provide backward compatibility for
829            reading min/max values as well as the new range parameter.
830    
831            * Thuban/Model/map.py: Explicit imports.
832    
833            * Thuban/Model/resource.py: Import _.
834            (ProjFileSaver.write): write header using projfile.dtd.
835    
836            * Thuban/Model/save.py: Explicit imports.
837            (XMLWriter.encode): New. Encode the given string from a format
838            used by Thuban into UTF-8. Fixes RTbug #1851.
839    
840            * Thuban/UI/classgen.py: Explicit imports.
841            (ClassGenDialog.__init__): Clean up the code and add support
842            for Quantiles.
843            (ClassGenDialog.OnOK): Add support for Quantiles.
844            (GenQuantilesPanel): New. Input panel for Quantiles.
845            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
846            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
847    
848            * Thuban/Model/classgen.py: New. Contains all the classes named above.
849    
850            * Thuban/UI/classifier.py: Explicit imports.
851            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
852            ClassTable.SetValueAsCustom): Reworked to use new Range class.
853    
854            * Thuban/UI/legend.py: Explicit imports.
855    
856            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
857            a Table menu and associated method calls.
858            (MainWindow.choose_color): Removed. No longer needed.
859    
860            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
861            should be disabled if no projection is selected in the available
862            list.
863    
864            * Thuban/UI/renderer.py: Explicit imports.
865    
866            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
867            with correctly selecting the rows and issuing the right events.
868            Be sure to call Skip() to allow the grid to do some of its own
869            handling which allows the rows to actually be selected.
870            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
871            selecting multiple shapes.
872            (LayerTableFrame): Support for building Queries.
873            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
874    
875            * Thuban/UI/tree.py: Explicit imports.
876    
877            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
878            table view can call it.
879    
880            * test/test_classification.py: Explicit imports.
881            (TestClassification.test_ClassGroupRange): Fix test for new
882            Range class.
883    
884            * Doc/thuban.dtd: Add range parameter for clrange.
885    
886            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
887            object in ClassGroupRange, and also uesd for inputting ranges in
888            the classifer table and elsewhere.
889    
890            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
891            yet.
892    
893    2003-05-09  Frank Koormann <[email protected]>
894    
895            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
896    
897    2003-05-08  Frank Koormann <[email protected]>
898    
899            Coding style updates
900    
901            * test/test_scalebar.py: Replaced tab indentation by spaces.
902    
903            * Thuban/UI/scalebar.py: Explicit imports.
904    
905    2003-05-08  Frank Koormann <[email protected]>
906    
907            * Thuban/UI/scalebar.py
908            (ScaleBar.DrawScalebar): Format string bug fixed.
909    
910    2003-05-08  Frank Koormann <[email protected]>
911    
912            Reorganization of scalebar component (no wx in Thuban/Model)
913    
914            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
915            (deriveInterval):
916            Calculate scalebar interval and unit which fits in width for scale.
917            (roundInterval): Round float.
918    
919            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
920    
921            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
922    
923            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
924    
925    2003-05-08  Frank Koormann <[email protected]>
926    
927            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
928            Initialize ScaleBar with canvas.map
929    
930            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
931            round intervals to display smarter lengths
932            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
933            layer. If the maps has no projection applied grey the scalebar.
934    
935    2003-05-07  Frank Koormann <[email protected]>
936            
937            Basic Scalebar features added.
938    
939            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
940    
941            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
942            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
943            and the renderer.
944    
945            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
946    
947            * Thuban/UI/messages.py: SCALE_CHANGED added.
948    
949    2003-05-07  Bernhard Herzog  <[email protected]>
950    
951            * Thuban/Model/session.py (Session.__init__): New instance
952            variable shapestores to hold a list of all open shapestore objects
953            (Session.ShapeStores): New. Accessor method for the shapestores
954            list.
955            (Session._add_shapestore, Session._clean_weak_store_refs): New.
956            Internal methods to maintain the shapestores list.
957            (Session.Tables): New. Return all tables open in the session.
958            (Session.OpenShapefile): Insert the new ShapeStore into the
959            shapestores list.
960    
961            * test/test_session.py (TestSessionSimple.test_initial_state): Add
962            tests for ShapeStores and Tables
963            (TestSessionWithContent.test_shape_stores)
964            (TestSessionWithContent.test_tables): New. Test cases for
965            ShapeStores and Tables
966    
967    2003-05-07  Bernhard Herzog  <[email protected]>
968    
969            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
970            Add comments about the optimizations used.
971            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
972            Implement the ReadValue table interface method.
973    
974            * test/test_transientdb.py
975            (TestTransientTable.run_iceland_political_tests)
976            (TestTransientTable.test_transient_joined_table): Add tests for
977            ReadValue
978    
979    2003-05-07  Frank Koormann <[email protected]>
980    
981            * Resources/Bitmaps/fulllayerextent.xpm,
982            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
983            new icons.
984    
985    2003-05-06  Bernhard Herzog  <[email protected]>
986    
987            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
988            New. Simply delegate to the transient table's version.
989    
990            * test/test_transientdb.py
991            (TestTransientTable.test_auto_transient_table_query): New. Test
992            case for AutoTransientTable's SimpleQuery
993    
994    2003-05-06  Bernhard Herzog  <[email protected]>
995    
996            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
997            Implement a simple query method for the query dialog
998            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
999            the row index or shapeid.
1000            (TransientTable.create): Insert the right value of the row index
1001            (TransientJoinedTable.create): Copy the row index of the left
1002            table to the joined result table
1003    
1004            * test/test_transientdb.py
1005            (TestTransientTable.test_transient_table_read_twice): Fix
1006            doc-string
1007            (TestTransientTable.test_transient_table_query): New. Test for the
1008            SimpleQuery method
1009    
1010    2003-05-06  Bernhard Herzog  <[email protected]>
1011    
1012            Convert all table users to use the new table interface. This only
1013            covers Thuban itself, not GREAT-ER or other applications built on
1014            Thuban yet, so the compatibility interface stays in place for the
1015            time being but it now issues DeprecationWarnings.
1016    
1017            Finally, the new Table interface has a new method, HasColumn.
1018    
1019            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
1020            issue deprecation warnings when they're. The warnings refer to the
1021            caller of the method.
1022            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
1023            for the deprecation warnings
1024    
1025            * test/test_table.py: Ignore the deprecation warnings for the old
1026            table in the tests in this module. The purpose of the tests is to
1027            test the old interface, after all.
1028    
1029            * test/test_transientdb.py
1030            (TestTransientTable.run_iceland_political_tests): Use the
1031            constants for the types. Add a test for HasColumn
1032            (TestTransientTable.test_transient_joined_table): Adapt to new
1033            table interface. Add a test for HasColumn
1034            (TestTransientTable.test_transient_table_read_twice): Adapt to new
1035            table interface
1036    
1037            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
1038            Adapt to new table interface
1039    
1040            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
1041            new table interface
1042    
1043            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
1044            (RecordTable.SetTable): Adapt to new table interface
1045    
1046            * Thuban/UI/classifier.py (Classifier.__init__)
1047            (Classifier.__init__): Adapt to new table interface
1048    
1049            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1050            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
1051            to new table interface
1052    
1053            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
1054            (AutoTransientTable.HasColumn): Implement the new table interface
1055            method
1056            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
1057            (AutoTransientTable.UniqueValues): Adapt to new table interface
1058    
1059            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
1060            Adapt to new table interface
1061    
1062            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
1063            simplify opening shapefiles a bit easier.
1064            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1065            (TestLayer.test_point_layer): Use the new helper method
1066            (TestLayer.test_get_field_type): New. Test for the GetFieldType
1067            method
1068    
1069            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
1070            the new table method
1071    
1072            * test/test_memory_table.py (TestMemoryTable.test_has_column):
1073            Test for the new table method HasColumn
1074    
1075    2003-05-06  Jonathan Coles   <[email protected]>
1076    
1077            Addresses the "Selection Extent" wish of RTbug #1787.
1078    
1079            * Resources/Bitmaps/fulllayerextent.xpm,
1080            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
1081            extent. These are just place holders for the real bitmaps.
1082    
1083            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
1084            calculate the bounding box once (the first time compute_bbox() is
1085            called).
1086            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
1087            the bounding box for the shapes in lat/long coordinates.
1088    
1089            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
1090            option.
1091            (MainWindow.has_selected_shapes): New. Returns true if there are
1092            any selected shapes.
1093            (MainWindow.FullSelectionExtent): New. Calls
1094            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
1095            (_has_selected_shapes): New. Returns true if there are any
1096            selected shapes.
1097    
1098            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
1099            true if there are any selected shapes.
1100    
1101            * Thuban/UI/view.py (MapCanvas): Added delegated method
1102            HasSelectedShapes.
1103            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
1104            shapes on the canvas using the map projection (if any).
1105    
1106            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
1107            for Layer.ShapesBoundingBox().
1108    
1109    2003-05-06  Bernhard Herzog  <[email protected]>
1110    
1111            * Resources/Projections/defaults.proj: Fix spelling of Mercator
1112    
1113    2003-05-05  Jonathan Coles   <[email protected]>
1114    
1115            Addresses the "Full Layer Extent" wish of RTbug #1787.
1116    
1117            * Resources/Projections/defaults.proj: Added UK National Grid.
1118    
1119            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
1120            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
1121            when the user selects the menu option.
1122    
1123            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
1124            scales the given layer on the canvas using the map projection.
1125    
1126    2003-05-05  Bernhard Herzog  <[email protected]>
1127    
1128            Convert the table implementations to a new table interface. All
1129            tables use a common mixin class to provide backwards compatibility
1130            until all table users have been updated.
1131    
1132            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
1133            provide backwards compatibility for table classes implementing the
1134            new interface
1135            (DBFTable, MemoryTable): Implement the new table interface. Use
1136            OldTableInterfaceMixin as base for compatibility
1137            (DBFColumn, MemoryColumn): New. Column description for DBFTable
1138            and MemoryTable resp.
1139    
1140            * test/test_dbf_table.py: New. Test cases for the DBFTable with
1141            the new table interface.
1142    
1143            * test/test_memory_table.py: New. Test cases for the MemoryTable
1144            with the new table interface.
1145    
1146            * test/test_table.py: Document the all tests in this file as only
1147            for backwards compatibility. The equivalent tests for the new
1148            interface are in test_memory_table.py and test_dbf_table.py
1149            (MemoryTableTest.test_read): field_info should be returning tuples
1150            with four items
1151            (MemoryTableTest.test_write): Make doc-string a more precise.
1152    
1153            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
1154            table interface. Derive from from OldTableInterfaceMixin for
1155            compatibility.
1156            (TransientTableBase.create): New intance variable column_map to
1157            map from names and indices to column objects
1158            (TransientTable.create): Use the new table interface of the input
1159            table
1160            (AutoTransientTable): Convert to new table interface. Derive from
1161            from OldTableInterfaceMixin for compatibility.
1162            (AutoTransientTable.write_record): Removed. It's not implemented
1163            yet and we still have to decide how to handle writing with the new
1164            table and data framework.
1165    
1166            * test/test_transientdb.py
1167            (TestTransientTable.run_iceland_political_tests)
1168            (TestTransientTable.test_transient_joined_table): Use the new
1169            table interface
1170    
1171    2003-05-05  Jonathan Coles   <[email protected]>
1172    
1173            This is namely a collection of UI updates to improve user interactivity.
1174            Tabbing between controls now exists and you can use ESC to close dialog
1175            boxes; ENTER will active the default button.
1176    
1177            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
1178            order that the controls are created so that tabbing works correctly.
1179            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
1180            wxDialog can handle the default button correctly.
1181            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
1182            same reasons as for OnOK.
1183            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
1184            when we ask the table for the maximum/minimum values of a field
1185            which could take a very long time.
1186    
1187            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
1188            order that the controls are created so that tabbing works correctly.
1189            (SelectPropertiesDialog.__init__): Rearrange the order that the
1190            controls are created so that tabbing works correctly.
1191    
1192            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
1193            to derive from a wxDialog but behave like the original implementation
1194            which was derived from a wxFrame. wxDialog provides useful key
1195            handling functionality like ESC calling OnCancel and ENTER calling
1196            OnOK which is lost with wxFrame.
1197    
1198            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
1199            new dialogs.
1200    
1201            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
1202            order that the controls are created so that tabbing works correctly.
1203            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
1204            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
1205            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
1206            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
1207            can provide the "UK National Grid" as a default projection.
1208            (UTMPanel.__init__): Rearrange the order that the controls are
1209            created so that tabbing works correctly.
1210    
1211    2003-05-05  Bernhard Herzog  <[email protected]>
1212    
1213            * extensions/thuban/wxproj.cpp: Fix some of the comments.
1214            (project_point): If a map projection but no layer projection is
1215            given, convert degrees to radians before applying the map
1216            projection.
1217    
1218            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
1219            (TableGrid.allow_messages): New methods to make it possible to
1220            inhibit message sending.
1221            (TableGrid.issue): Only send the message if not inhibited.
1222            (LayerTableGrid.select_shape): Use the new methods to make sure
1223            that no ROW_SELECTED message is sent while we're updating the
1224            selected rows to match the selected shapes.
1225    
1226    2003-05-02  Jan-Oliver Wagner <[email protected]>
1227    
1228            Implementation of MemoryTable.
1229    
1230            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
1231            implementation that operates on a list of tuples. All of the data
1232            are kept in the memory.
1233    
1234            * test/test_table.py (MemoryTableTest): New.
1235    
1236            * test/test_transientdb.py (SimpleTable): Removed.
1237            (TestTransientTable.test_transient_joined_table,
1238            (TestTransientTable.test_transient_table_read_twice): Replaced
1239            SimpleTable by MemoryTable.
1240    
1241    2003-04-30  Jonathan Coles   <[email protected]>
1242    
1243            * Data/iceland_sample.thuban: Now contains correct projections
1244            for each of the layers.
1245    
1246            * Resources/Projections/defaults.proj: Geographic projection
1247            contains unit conversion parameter.
1248    
1249    2003-04-30  Jonathan Coles   <[email protected]>
1250    
1251            The most important part of this putback is the projection changes.
1252            It should now be possible to specify the projection that a layer
1253            is in and then specify a different projection for the map. The
1254            projection dialog has an extra parameter for a geographic projection
1255            which lets the user select if the input is in degrees or radians.
1256    
1257            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
1258            to say that the parameter is a tuple of unprojected
1259            points (which is what the callers to this method were assuming).
1260            Also, since the points are unprojected we need to projected them.
1261    
1262            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
1263            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
1264            groups are selected, move the layer up/down. Fixes RTbug #1833.
1265    
1266            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
1267    
1268            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
1269            parameter in call to SetClientData.
1270            (GeoPanel): Add support for selecting the units that the
1271            source data is in (Radians or Degrees).
1272    
1273            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
1274            the rendering loop by reducing the number of if's, removing the
1275            unnecessary try/except block, and checking if the old group
1276            is the same as the new one (which happens a lot if there is
1277            no classification, or lots of shapes are in the same group).
1278    
1279            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
1280            around the redraw routine to try to catch problems that the user
1281            may create by selecting invalid projections for the data set and
1282            map. Clears the display if there are any problems and prints the
1283            error.
1284            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
1285            rectangle.
1286    
1287            * extensions/thuban/wxproj.cpp (project_point): First invert the
1288            supplied point (which should be in projected coordinates) using
1289            the layer's projection and then project the point using the
1290            map's projection.
1291            (project_points): Use project_point() to project each point.
1292    
1293    2003-04-30  Jan-Oliver Wagner <[email protected]>
1294    
1295            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
1296            don't set the Classification to None if the classfication field
1297            is None (ie only a DEFAULT).
1298    
1299    2003-04-30  Bernhard Herzog  <[email protected]>
1300    
1301            * Thuban/UI/view.py: Fix some typos.
1302    
1303            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
1304            not pop up the dialog if the selection becomes empty (this could
1305            happen if e.g. a new selection is opened while the identify tool
1306            is active and dialog had been closed)
1307    
1308    2003-04-30  Bernhard Herzog  <[email protected]>
1309    
1310            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
1311            instance variable read_record_last_result
1312            (TransientTableBase.read_record): Make sure reading the same
1313            record twice works. The implementation uses the new instance
1314            variable read_record_last_result
1315    
1316            * test/test_transientdb.py
1317            (TestTransientTable.test_transient_table_read_twice): New test
1318            case for the above bug-fix.
1319    
1320    2003-04-29  Jonathan Coles   <[email protected]>
1321    
1322            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
1323    
1324            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
1325    
1326            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
1327            (ClassTable.SetValueAsCustom): Rename keyword argument in
1328            ClassGroup* constructors to match argument name.
1329    
1330    2003-04-29  Bernhard Herzog  <[email protected]>
1331    
1332            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
1333            transient DB if it exists to make sure it doesn't leave a journal
1334            file in the temp directory.
1335    
1336            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
1337            self.conn to None after closing the connection to make sure it's
1338            not closed twice
1339    
1340    2003-04-29  Jonathan Coles   <[email protected]>
1341    
1342            Add a visible parameter in the layer XML tag. The default value is
1343            "true". If anything other than "false" is specified we also assume
1344            "true". Addresses RTbug #1025.
1345    
1346            * Doc/thuban.dtd: Add visible parameter to a layer.
1347    
1348            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
1349            of visible from 1 to True.
1350            (Layer.__init__): Change default value of visible from 1 to True.
1351    
1352            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
1353            parameter.
1354    
1355            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
1356            parameter.
1357    
1358            * test/test_load.py: Add new test data contents_test_visible.
1359            (LoadSessionTest.setUp): save test data.
1360            (LoadSessionTest.testLayerVisibility): Test if the visible flag
1361            is loaded correctly.
1362    
1363            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
1364            for saving an invisible layer.
1365    
1366    2003-04-29  Jonathan Coles   <[email protected]>
1367    
1368            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
1369            legend dialog box and tell it to change its map to the one
1370            supplied to SetMap(). Fixes RTbug #1770.
1371    
1372    2003-04-29  Bernhard Herzog  <[email protected]>
1373    
1374            Next step of table implementation. Introduce a transient database
1375            using SQLite that some of the data is copied to on demand. This
1376            allows us to do joins and other operations that require an index
1377            for good performance with reasonable efficiency. Thuban now needs
1378            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
1379            haven't tested that.
1380            
1381            * Thuban/Model/transientdb.py: New. Transient database
1382            implementation.
1383    
1384            * test/test_transientdb.py: New. Tests for the transient DB
1385            classes.
1386    
1387            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
1388            classes to help automatically remove temporary files and
1389            directories.
1390            (Session.__init__): New instance variables temp_dir for the
1391            temporary directory and transient_db for the SQLite database
1392            (Session.temp_directory): New. Create a temporary directory if not
1393            yet done and return its name. Use AutoRemoveDir to have it
1394            automatically deleted
1395            (Session.TransientDB): Instantiate the transient database if not
1396            done yet and return it.
1397    
1398            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
1399            AutoTransientTable so that data is copied to the transient DB on
1400            demand.
1401            (SimpleStore): New class that simply combines a table and a
1402            shapefile
1403    
1404            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
1405            DBFTable and update its doc-string to reflect the fact that this
1406            is only the table interface to a DBF file. Table is now an alias
1407            for DBFTable for temporary backwards compatibility.
1408    
1409            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
1410            the last reference to the session goes away so that the temporary
1411            files are removed properly.
1412    
1413            * test/test_load.py (LoadSessionTest.tearDown): Remove the
1414            reference to the session to make sure the temporary files are
1415            removed.
1416    
1417    2003-04-29  Bernhard Herzog  <[email protected]>
1418    
1419            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
1420            the __parser instance variable into a normal local variable in
1421            read. It's only used there and read will never be called more than
1422            once. Plus it introduces a reference cycle that keeps can keep the
1423            session object alive for a long time.
1424    
1425    2003-04-29  Jonathan Coles   <[email protected]>
1426    
1427            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
1428            Projection an immutable item. Fixes RTbug #1825.
1429            (Projection.__init__): Initialize instance variables here.
1430            (ProjFile.Replace): New. Replace the given projection object with
1431            the new projection object. This solves the problem of needing the
1432            mutator Projection.SetProjection() in the ProjFrame class and
1433            allows a projection to change parameters without changing its
1434            location in the file.
1435    
1436            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
1437            be of type wxSAVE and should verify overwriting a file.
1438    
1439            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
1440            ProjFile.Replace() method instead of the mutator
1441            Projection.SetProjection(). Also requires that we reassign the
1442            client data to the new projection.
1443    
1444            * test/test_proj.py (TestProjection.test): Test GetName() and
1445            GetAllParameters()
1446            (TestProjFile.test): Remove tests for Set*() methods. Add tests
1447            for Replace().
1448    
1449    2003-04-25  Jonathan Coles   <[email protected]>
1450    
1451            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
1452            to save the name of the projection.
1453    
1454            * test/test_save.py (SaveSessionTest.testLayerProjection): New
1455            test to verify layer projections are saved correctly.
1456    
1457    2003-04-25  Jonathan Coles   <[email protected]>
1458    
1459            * Thuban/Model/proj.py (Projection.SetName): Set the name
1460            to "Unknown" if name is None.
1461            (Projection.SetAllParameters): New. Set the projection's
1462            parameter list to the one supplied.
1463            (Projection.SetProjection): New. Set the projection's
1464            properties to those of the supplied Projection.
1465    
1466            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
1467            the dialog title to include the map's title.
1468            (MainWindow.LayerProjection): Set the dialog title to include
1469            the layer's title.
1470    
1471            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
1472            error dialogs into a single method call.
1473            (ProjFrame.__VerifyButtons): Add more states to check.
1474            (ProjFrame.__GetProjection): Return the current state of an
1475            edited projection or None.
1476            (ProjFrame.__FillAvailList): Remove checks for states that
1477            shouldn't exist.
1478            (ProjFrame._OnNew): Clear all selected items and supply
1479            a projection panel if necessary.
1480    
1481            * test/test_proj.py (TestProjFile.test): Add tests for
1482            ProjFile.SetAllParameters, ProjFile.SetProjection,
1483            ProjFile.SetName.
1484    
1485    2003-04-25  Jonathan Coles   <[email protected]>
1486    
1487            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
1488            takes an optional argument to select the current projection.
1489            This does not guarantee that the item is visible due to
1490            limited wxWindows functionality. Fixes RTBug #1821.
1491    
1492    2003-04-25  Jonathan Coles   <[email protected]>
1493    
1494            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1495            the projection name and use it when constructing the Projection
1496            object.
1497    
1498            * Thuban/Model/proj.py (Projection.__init__): Change the default
1499            value for 'name' to None and then test if name is equal to None
1500            in the body of the constructor. This way the caller doesn't have to
1501            know what the default value should be. Namely, useful in load.py
1502            where we have to pick a default value if the 'name' parameter
1503            doesn't exist in the XML file.
1504    
1505            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1506            Tests a file where a layer has a projection.
1507    
1508    2003-04-25  Jonathan Coles   <[email protected]>
1509    
1510            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1511            tree for projection information.
1512    
1513            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1514            XMLReader.GetFileName.
1515            (SessionLoader): Added support for loading projection tags that
1516            appear inside a layer.
1517    
1518            * Thuban/Model/proj.py (ProjFile): Document the class. Move
1519            back to using a list because the order of the projections in
1520            the file is important to maintain. Fixes RTbug #1817.
1521    
1522            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1523            to ProjFile.GetFilename.
1524    
1525            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1526            information.
1527    
1528            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1529            ProjFrame._OnSaveAs. Removed old dead code from previous
1530            implementation.
1531            (ProjFrame._OnExport): Add support for exporting more than one
1532            projection to a single file.
1533            (ProjFrame.__FillAvailList): use string formatting (% operator)
1534            to build strings that are (partly) translated. Fixes RTbug #1818.
1535    
1536            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1537            class.
1538    
1539    2003-04-24  Bernhard Herzog  <[email protected]>
1540    
1541            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1542    
1543            * po/fr.po: New. French translation by Daniel Calvelo Aros
1544    
1545            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1546            empty strings.
1547    
1548    2003-04-24  Jonathan Coles   <[email protected]>
1549    
1550            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1551            implement the interface that the ProjFrame dialog expects.
1552    
1553            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1554            name of the projection to be changed.
1555            (ProjFile): Use a dictionary instead of a list so that removing
1556            projections is easier and we are sure about uniqueness.
1557            (ProjFile.Remove): Remove the given projection object.
1558    
1559            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1560            Return a list with only one projection file instead of searching for
1561            any projection file. This simplifies many things if the user can
1562            only have one system file and one user file.
1563    
1564            * Thuban/UI/classgen.py: Change all references to
1565            genCombo to genChoice.
1566    
1567            * Thuban/UI/mainwindow.py: Add a Projection option under the
1568            layer menu.
1569            (MainWindow.LayerProjection): New. Open up a projection window
1570            for a layer.
1571    
1572            * Thuban/UI/projdialog.py: Large changes to how the dialog is
1573            laid out. Use three panels instead of one. One for the list of
1574            projections, one for the edit controls, and one for the buttons.
1575            Fixed resizing problems so that the dialog resizes correctly
1576            when the projection panel changes. Added import/export, save, and
1577            new buttons/functionality.
1578    
1579    2003-04-24  Bernhard Herzog  <[email protected]>
1580    
1581            First step towards table management. Introduce a simple data
1582            abstraction so that we replace the data a layer uses more easily
1583            in the next step.
1584    
1585            * Thuban/Model/data.py: New file with a simple data abstraction
1586            that bundles shapefile and dbffile into one object.
1587    
1588            * Thuban/Model/session.py (Session.OpenShapefile): New method to
1589            open shapefiles and return a shape store object
1590    
1591            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1592            object instead of a shapefile filename. This introduces a new
1593            instance variable store holding the datastore. For intermediate
1594            backwards compatibility keep the old instance variables.
1595            (open_shapefile): Removed. No longer needed with the shape store.
1596            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1597            get the shape store used by a layer.
1598            (Layer.Destroy): No need to explicitly destroy the shapefile or
1599            table anymore.
1600    
1601            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1602            (MainWindow.AddLayer): Use the session's OpenShapefile method to
1603            open shapefiles
1604    
1605            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1606            session's OpenShapefile method to open shapefiles
1607    
1608            * test/test_classification.py
1609            (TestClassification.test_classification): Use the session's
1610            OpenShapefile method to open shapefiles and build the filename in
1611            a more platform independed way
1612    
1613            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1614            Implement to have a session to use in the tests
1615            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1616            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1617            session's OpenShapefile method to open shapefiles
1618            (TestLayerLegend.setUp): Instantiate a session so that we can use
1619            it to open shapefiles.
1620            (TestLayerLegend.tearDown): Make sure that all references to
1621            layers and session are removed otherwise we may get a resource
1622            leak
1623    
1624            * test/test_map.py (TestMapAddLayer.test_add_layer)
1625            (TestMapWithContents.setUp): Instantiate a session so that we can
1626            use it to open shapefiles.
1627            (TestMapWithContents.tearDown): Make sure that all references to
1628            layers, maps and sessions are removed otherwise we may get a
1629            resource leak
1630            ("__main__"): use support.run_tests() so that more info about
1631            uncollected garbage is printed
1632    
1633            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1634            session's OpenShapefile method to open shapefiles
1635            ("__main__"): use support.run_tests() so that more info about
1636            uncollected garbage is printed
1637    
1638            * test/test_selection.py (TestSelection.tearDown): Make sure that
1639            all references to the session and the selection are removed
1640            otherwise we may get a resource leak
1641            (TestSelection.get_layer): Instantiate a session so that we can
1642            use it to open shapefiles.
1643            ("__main__"): use support.run_tests() so that more info about
1644            uncollected garbage is printed
1645    
1646            * test/test_session.py (TestSessionBase.tearDown)
1647            (TestSessionWithContent.tearDown): Make sure that all references
1648            to the session and layers are removed otherwise we may get a
1649            resource leak
1650            (TestSessionWithContent.setUp): Use the session's OpenShapefile
1651            method to open shapefiles
1652    
1653    2003-04-24  Jonathan Coles   <[email protected]>
1654    
1655            * Thuban/Model/load.py (XMLReader.read): Should have been checking
1656            if the file_or_filename object had the 'read' attribute.
1657    
1658    2003-04-23  Jonathan Coles   <[email protected]>
1659    
1660            * Thuban/Model/resource.py: Fixes RTbug #1813.
1661            (ReadProjFile): Add documentation about which exceptions are raised.
1662            Always pass the exceptions up to the caller.
1663            (GetProjFiles): If the directory can't be read return an empty list.
1664            If any of the proj files can't be read skip that file and go
1665            on to the next one.
1666    
1667            * test/test_proj.py: Added test cases to handle nonexistent files,
1668            unreadable files, and files that don't parse correctly.
1669    
1670    2003-04-23  Jonathan Coles   <[email protected]>
1671    
1672            Projection dialog. Allows the user to select from a list
1673            of projection templates and optionally edit them and save new ones.
1674    
1675            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1676            (ProjPanel): Base class for projection specific panels.
1677            (TMPanel): Projection panel for Transverse Mercartor.
1678            (UTMPanel): Projection panel for Universal Transverse Mercartor.
1679            (LCCPanel): Projection panel for Lambert Conic Conformal.
1680            (GeoPanel): Projetion panel for Geographic Projection.
1681    
1682    2003-04-23  Jonathan Coles   <[email protected]>
1683    
1684            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1685            promote symmetry. There now exists XMLReader and XMLWriter.
1686            (XMLReader.read): New. Call to read the given file descriptor or
1687            filename.
1688            (XMLReader.close): New. Make sure the file is closed.
1689            (XMLReader.GetFileName): New. Return just the file name that is being
1690            read from.
1691            (XMLReader.GetDirectory): New. Return just the directory of the file
1692            that is being read.
1693            (XMLReader.AddDispatchers): New. Take a dictionary which contains
1694            the names of functions to call as the XML tree is parsed.
1695            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1696            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1697            (SessionLoader): Removed class variables start_dispatcher and
1698            end_dispatcher since this functionality is now part of a class
1699            instance. Fixes RTbug #1808.
1700            (SessionLoader.__init__): Add dispatcher functions.
1701            (load_xmlfile): Code was moved into the XMLReader.read().
1702            (load_session): Use modified SessionLoader.
1703    
1704            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1705            map's projection.
1706    
1707            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1708            GetAllParameters.
1709            (Projection.GetParameter): Returns the value for the given parameter.
1710    
1711            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1712            (GetProjFiles): Renamed from GetProjections. Now returns a list
1713            of ProjFile objects.
1714            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1715            a list of ProjFile objects whose files are not user defined.
1716            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1717            list of ProjFile objects whose files are user defined.
1718            (ProjFileReader): Extend new XMLReader.
1719    
1720            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1721            promote symmetry.
1722    
1723            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1724            control instead of a wxComboBox. wxChoice controls do not generate
1725            events as the uses highlights possible choices which fixes problems
1726            with resizing the dialog when the use selects an option.
1727    
1728            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1729            control instead of a wxComboBox.
1730    
1731            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1732            dialog.
1733    
1734            * test/test_proj.py (TestProjection.test): New tests for GetParameter
1735            method.
1736    
1737    2003-04-22  Bernhard Herzog  <[email protected]>
1738    
1739            * Thuban/UI/mainwindow.py: Remove some unused imports and global
1740            constants
1741    
1742            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1743            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1744    
1745    2003-04-17  Bernhard Herzog  <[email protected]>
1746    
1747            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1748            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1749            anymore.
1750            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1751            (Layer.ShapeType, Layer.Shape): No need to call
1752            self.open_shapefile since it's always called in __init__
1753    
1754            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1755            In wxPython 2.4 there's no need to extend MainLoop anymore since
1756            wxPython itself makes sure OnExit is called.
1757    
1758    2003-04-16  Jonathan Coles   <[email protected]>
1759    
1760            Initial putback of projection management code. Includes new
1761            classes to read and write projection files. The current load
1762            and save classes were abstracted a bit so they could be reused.
1763            The Projection class was extended to provide new methods and
1764            have a name.
1765    
1766            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1767            general XML reading methods that were part of ProcessSession.
1768    
1769            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1770            name.
1771            (ProjFile): New. Represents a file that contains projection
1772            information.
1773    
1774            * Thuban/Model/resource.py: New. Contains general utilities
1775            for read and writing projection files.
1776    
1777            * Thuban/Model/save.py (XMLSaver): New. Contains all the
1778            general XML writing methods that were part of SessionSaver.
1779            (SessionSaver): Renamed from Saver.
1780    
1781            * test/test_proj.py: New test cases for the projection
1782            file read and write functions.
1783    
1784    2003-04-16  Jonathan Coles   <[email protected]>
1785    
1786            * Thuban/Model/classification.py: Use repr() around values
1787            in the ClassGroup*.__repr__() methods so it is clearer when
1788            a value is a string and when it is a number.
1789    
1790            * test/test_load.py: Rework the classification test to test
1791            that we can load old files.
1792            (testLabels): Test a file where the groups have labels.
1793    
1794    2003-04-16  Bernhard Herzog  <[email protected]>
1795    
1796            Safer implementation of the performance enhancements of the
1797            low-level renderer:
1798            
1799            * extensions/thuban/wxproj.cpp (extract_projection)
1800            (extract_pointer): Rename extract_projection to extract_pointer
1801            and redefine its purpose to return the pointer stored in a CObject
1802            returned by the object's cobject method. Update all callers.
1803            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1804            handling of these low-level parameters so that each s_draw_info
1805            instance is handled as a CObject at python level that also
1806            contains real references to the actual python objects which
1807            contain the values in the struct. Add free_draw_info as the
1808            destructor.
1809            (draw_polygon_shape): Add the py_draw_info parameter which must a
1810            cobject containing an s_draw_info pointer.
1811    
1812            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1813            method to instantiat the low-level render parameter
1814            (MapRenderer.draw_shape_layer): Use the new method. Remove some
1815            commented out code.
1816            (MapRenderer.draw_polygon_shape): Make the first parameter not the
1817            layer but the low-level render parameter
1818            (ScreenRenderer.draw_shape_layer): Use the low-level render
1819            parameter.
1820    
1821    2003-04-15  Jonathan Coles   <[email protected]>
1822    
1823            * Thuban/Model/classification.py: Implemented __repr__ for
1824            the ClassGroup* classes to make debugging a bit easier.
1825            (ClassGroup.SetLabel): Check that the string is an instance
1826            of StringTypes not StringType. Accounts for Unicode strings.
1827    
1828            * Thuban/Model/color.py: Implemented __repr__ to make
1829            debugging a bit easier.
1830    
1831            * Thuban/Model/save.py (Saver.write_classification): Need to
1832            save the group label.
1833    
1834            * test/test_load.py (testClassification): New. Loads the
1835            iceland_sample_test.thuban file and checks if it was loaded
1836            correctly.
1837    
1838    2003-04-15  Jonathan Coles   <[email protected]>
1839    
1840            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1841            to improve rendering performance by initializing the variables
1842            that are not change each time draw_polygon_shape() is called.
1843            The values are stored in a global struct draw_info.
1844            (draw_polygon_shape): Removed initialization code that is
1845            now in draw_polygon_init().
1846    
1847            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1848            drawing initialization call to draw_polygon_init()
1849            (MapRenderer.draw_polygon_shape): Use new signature of
1850            draw_polygon_shape.
1851    
1852            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1853            weirdness by setting the range to (1, maxint).
1854    
1855            * Thuban/Model/classification.py (ClassGroupProperties): Make
1856            instance variables private and optimize comparison operator
1857            by first checking if the color references are the same.
1858            (ClassGroupSingleton): Make instance variables private.
1859            (ClassGroupRange): Make instance variables private.
1860    
1861            * HOWTO-Release: Filled in missing steps for releasing packages.
1862    
1863    2003-04-15  Bernhard Herzog  <[email protected]>
1864    
1865            First stab at internationalized messages:
1866    
1867            * Thuban/__init__.py (_): Implement the translation function for
1868            real using the python gettext module.
1869    
1870            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1871            translate empty strings.
1872    
1873            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1874            Add a missing space to a warning message
1875    
1876            * po/README: New. Notes about the management of the translation
1877            files.
1878    
1879            * po/Makefile: New. Makefile to help manage the translation files.
1880    
1881            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1882    
1883            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1884            translations and support files in po/
1885    
1886            * setup.py (data_files): Add the *.mo files to the data_files too
1887    
1888            * README: Add note about the translations when building from CVS
1889    
1890    2003-04-14  Jonathan Coles   <[email protected]>
1891    
1892            * Thuban/UI/dock.py: Fixes some window resizing problems most
1893            noticable under windows. Always assume the button bitmaps will
1894            be there. Code clean up.
1895            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1896            images for the dock/undock button to the same images.
1897            Work around for RTbug #1801.
1898    
1899            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1900            be allowed to grow within the sizer. Fixes a bug under Windows
1901            where the toolbar wasn't being drawn.
1902    
1903    2003-04-14  Frank Koormann   <[email protected]>
1904    
1905            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1906            Updated design to try to make the button functionality more
1907            transparent.
1908    
1909    2003-04-14  Jonathan Coles   <[email protected]>
1910    
1911            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1912            finalize the intialization of the panel.
1913    
1914            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1915            creation of the panel. Should be the last thing called in the
1916            initializer of a subclass.
1917    
1918            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1919            set the current selections in the combo boxes. This is needed
1920            under Windows.
1921    
1922            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1923            level panel to the dialog so that the background colors are
1924            consistent under Windows.
1925    
1926    2003-04-11  Jonathan Coles   <[email protected]>
1927    
1928            * Thuban/UI/classgen.py: Change color ramps to start at white
1929            not black.
1930    
1931            * Thuban/UI/legend.py: Enable/disable the legend buttons when
1932            the legend changes. Fixes RTbug #1793.
1933    
1934            * test/test_classification.py: Added test for copying of
1935            classifications.
1936    
1937    2003-04-11  Jonathan Coles   <[email protected]>
1938    
1939            * Thuban/UI/resource.py: New. Centralize the loading of resources
1940            such as bitmaps.
1941    
1942            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1943            added images to the move buttons, added 'reverse' button.
1944            (CustomRampPanel.__init__): Added images to the move buttons.
1945            (GreyRamp): New. Generates a ramp from white to black.
1946            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1947    
1948            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1949            ID_PROPERTY_*.
1950            (Classifier.__init__): Minor changes to the layout.
1951            (Classifier._OnTitleChanged): Listen for when the user edits the
1952            title and update the dialog's title and the layer's title.
1953    
1954            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1955    
1956            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1957            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1958            if the layer's title changes.
1959    
1960            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1961            to open a dialog to rename the map.
1962            (MainWindow): Use new resource class to import bitmaps.
1963    
1964    2003-04-11  Jonathan Coles   <[email protected]>
1965    
1966            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1967            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1968            Resources/Bitmaps/group_use_none.xpm,
1969            Resources/Bitmaps/group_use_not.xpm,
1970            Resources/Bitmaps/hide_layer.xpm,
1971            Resources/Bitmaps/layer_properties.xpm,
1972            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1973            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1974            New.
1975    
1976    2003-04-10  Jonathan Coles   <[email protected]>
1977    
1978            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1979            Should pass group to ClassGroup constructor.
1980    
1981    2003-04-10  Jonathan Coles   <[email protected]>
1982    
1983            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1984            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1985            here. Implement SetVisible(), IsVisible().
1986            (ClassGroup.__init__): Add group parameter which acts as a copy
1987            constructor.
1988    
1989            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1990            "Visible" check boxes.
1991            (Classifier): Rename the buttons and refactor the code to match
1992            the new labels.
1993    
1994            * Thuban/UI/legend.py: Classify button is now called "Properties".
1995            Refactored the code to change variable names.
1996            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1997    
1998            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1999            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
2000            renamed to MainWindow.LayerEditProperties.
2001            (MainWindow.ToggleLegend): Don't include map name in legend title.
2002            (MainWindow.SetMap): Added the map name to the window title.
2003            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
2004            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
2005            Functionality is found in the layer properties dialog.
2006    
2007            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2008            draw visible groups.
2009    
2010    2003-04-09  Jonathan Coles   <[email protected]>
2011    
2012            * Thuban/UI/classgen.py: Modifications to allow simple
2013            addition and selection of new color schemes.
2014            (MonochromaticRamp): New. Generates a ramp between two colors.
2015            (RedRamp): New. Generates a ramp of all red.
2016            (GreenRamp): New. Generates a ramp of all green.
2017            (BlueRamp): New. Generates a ramp of all blue.
2018    
2019    2003-04-09  Jonathan Coles   <[email protected]>
2020    
2021            * Thuban/Model/classification.py (Classification.__deepcopy__):
2022            Need to copy over field and fieldType attributes.
2023    
2024            * Thuban/Model/table.py (Table.field_range): New. Retrive the
2025            maximum and minimum values over the entire table for a given
2026            field.
2027            (Table.GetUniqueValues): New. Retrieve all the unique values
2028            in the table for a given field.
2029    
2030            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
2031            (GenUniquePanel): New. Controls to allow the user to select
2032            which unique field values they would like in the classification.
2033            (CustomRampPanel): Code that was in ClassGenDialog that allows
2034            the user to select the properties for a custom ramp.
2035            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
2036    
2037            * Thuban/UI/classifier.py: Removed a lot of debugging code.
2038            (Classifier._SetClassification): Callback method so that the
2039            class generator can set the classification in the grid.
2040            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
2041            editing of a group properties class into a wxWindows control.
2042    
2043            * Thuban/UI/dock.py: It was decided that if the user closes
2044            a dockable window the window should simply hide itself. That
2045            way if the user wants to show the dock again it appears in the
2046            same place as it was when it was closed.
2047            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
2048            (DockableWindow._OnButtonClose): Hide the window instead of
2049            destroying it.
2050            (DockableWindow._OnClose): Hide the window instead of
2051            destroying it.
2052    
2053            * Thuban/UI/legend.py (LegendTree): Use a private method to
2054            consistently set the font and style of the text. Fixes RTbug #1786.
2055    
2056            * Thuban/UI/mainwindow.py: Import just the Classifier class.
2057    
2058    2003-04-07  Bernhard Herzog  <[email protected]>
2059    
2060            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
2061            to the map module
2062    
2063    2003-04-07  Bernhard Herzog  <[email protected]>
2064    
2065            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
2066            favor of ToggleSessionTree
2067            (MainWindow.ToggleSessionTree): New method to toggle visibility of
2068            the session tree.
2069            (MainWindow.SessionTreeShown): New method to return whether the
2070            session tree is currently shown.
2071            (MainWindow.ToggleLegend): New method to toggle visibility of the
2072            legend
2073            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
2074            LegendShown
2075            (MainWindow.LegendShown): New method to return whether the legend
2076            is currently shown.
2077            (_method_command): Add checked parameter so we can define check
2078            menu items
2079            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
2080            mainwindow methods.
2081            (show_session_tree, show_legend commands): Removed.
2082            (toggle_session_tree, toggle_legend commands): New commands to
2083            toggle the visibility of the dialogs
2084    
2085    2003-04-07  Jonathan Coles   <[email protected]>
2086    
2087            * Thuban/UI/classgen.py: Fix Windows problem.
2088    
2089            * Thuban/UI/dock.py: Fix Windows problem.
2090    
2091            * Thuban/UI/mainwindow.py: Use False instead of false.
2092            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
2093    
2094    2003-04-07  Jonathan Coles   <[email protected]>
2095    
2096            Since we now say that the order of the groups in a classification
2097            matters, it makes sense to be able to manipulate that order. Most
2098            of the changes to Thuban/Model/classification.py are to that end.
2099    
2100            * Thuban/Model/classification.py (Classification.AppendGroup,
2101            Classification.InsertGroup, Classification.ReplaceGroup,
2102            Classification.RemoveGroup, Classification.GetGroup): Do as the
2103            names imply.
2104            (Classification.FindGroup): This was called GetGroup, but GetGroup
2105            takes an index, while FindGroup takes a value.
2106            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
2107            REFERENCE. Currently there is a cyclic reference between the layer
2108            and its classification. If the classification doesn't need to know
2109            its owning layer we can change this, since it may make sense to be
2110            able to use the same classification with different layers.
2111    
2112            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
2113    
2114            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
2115            not AddGroup()
2116    
2117            * Thuban/UI/classifier.py: Now that we can depend on the order in
2118            a Classification and have methods to manipulate that order we don't
2119            need to use our own data structures in the grid. We can simply make
2120            the grid/table access the information they need from a copy of
2121            the classification object.
2122            (Classifier._OnCloseBtn): Event handler for when the user clicks
2123            'Close'. This is needed so if the user applies changes and then
2124            continues to change the table the user has the option of discarding
2125            the most recent changes and keeping what they applied.
2126    
2127            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
2128            into the same group.
2129    
2130            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
2131            with a really old version of proj, PJ_VERSION won't even be defined.
2132            If it isn't defined then just compile so that the function always
2133            returns Py_False.
2134    
2135            * test/test_classification.py: Fix tests to use the renamed methods.
2136            Still need to write tests for the new methods.
2137    
2138    2003-04-04  Jonathan Coles   <[email protected]>
2139    
2140            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
2141            call to SetSelection out of the method and before the call
2142            to __SelectField in __init__. This prevents a recursion of events
2143            when _OnFieldSelect is triggered by the user.
2144    
2145    2003-04-04  Jonathan Coles   <[email protected]>
2146    
2147            * Thuban/Model/classification.py: Rename Color.None to
2148            Color.Transparent.
2149            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
2150            Don't bother copying the color, since Colors are immutable.
2151    
2152            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
2153            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
2154            Thuban/UI/renderer.py, Thuban/UI/view.py:
2155            Rename Color.None to Color.Transparent.
2156        
2157            * test/test_classification.py, test/test_load.py: Rename Color.None
2158            to Color.Transparent.
2159    
2160    2003-04-04  Jonathan Coles   <[email protected]>
2161    
2162            * Thuban/Model/classification.py: Fix assert calls.
2163            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
2164            Copy the color parameter rather than hold onto a reference.
2165    
2166            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
2167            the color object.
2168            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
2169            are sure there exists only one refernce to Color.None in the system.
2170            This allows us to use 'is' rather than the comparision functions.
2171            
2172            * Thuban/Model/save.py: Fix assert calls.
2173            
2174            * Thuban/UI/classifier.py: Fix assert calls.
2175            (ClassGrid._OnCellDClick): Call up to the classifier to open the
2176            dialog to edit the groups properties.
2177            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
2178            correctly if a cell is resized.
2179            (ClassTable.SetClassification): New. Changes the classification
2180            that is in the table.
2181            (ClassTable.__SetRow): Allow groups to be prepended.
2182            (Classifier): New code for opening the EditProperties and
2183            GenerateRanges dialogs.
2184            (SelectPropertiesDialog.__GetColor): Only set the color in the
2185            color dialog if the current color is not None.
2186            
2187            * Thuban/UI/dock.py: Fix assert calls.
2188            
2189            * Thuban/UI/legend.py: Fix assert calls.
2190            
2191            * Thuban/UI/renderer.py: Fix assert calls.
2192            
2193            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
2194            classifications.
2195            (GenRangePanel): Panel specific to range generation.
2196            (GenSingletonPanel): Panel specific to singleton generation.
2197            (ClassGenerator): Class responsible for actually generating
2198            the classification from the data gathered in the dialog box.
2199            (PropertyRamp): Generates properties whose values range from
2200            a starting property to an ending property.
2201    
2202    2003-04-03  Bernhard Herzog  <[email protected]>
2203    
2204            * test/support.py (print_garbage_information): New function that
2205            prints information about still connected messages and memory
2206            leaks.
2207            (run_suite): Removed.
2208            (run_tests): New function for use as a replacement of
2209            unittest.main in the test_* files. This one calls
2210            print_garbage_information at the end.
2211    
2212            * test/runtests.py (main): Use support.print_garbage_information
2213    
2214            * test/test_layer.py: Use support.run_tests instead of
2215            unittest.main so we get memory leak information
2216            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2217            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
2218            (TestLayerLegend.test_visibility): Call the layer's Destroy method
2219            to fix a memory leak.
2220    
2221            * test/test_classification.py: Use support.run_tests instead of
2222            unittest.main so we get memory leak information
2223            (TestClassification.test_classification): Call the layer's Destroy
2224            method to fix a memory leak.
2225    
2226    2003-04-02  Bernhard Herzog  <[email protected]>
2227    
2228            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
2229            Handle the reference counts of the return value and errors in
2230            PyArg_ParseTuple correctly.
2231    
2232            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
2233            sure the filename is absolute to avoid problems when saving the
2234            session again
2235    
2236            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
2237    
2238    2003-04-01  Jonathan Coles   <[email protected]>
2239    
2240            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
2241            that there actually are points in the returned list of points
2242            before trying to index into the list. The list may be empty if
2243            the shape is a Null Shape.
2244    
2245    2003-04-01  Bernhard Herzog  <[email protected]>
2246    
2247            * test/test_map.py: Don't use from <module> import *
2248    
2249    2003-04-01  Jonathan Coles   <[email protected]>
2250    
2251            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
2252            LAYER_LEGEND_CHANGED
2253    
2254            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
2255            self.Destroy() to close the window after yesterday's changes.
2256    
2257            * test/test_map.py, test/test_session.py: Fix messages that
2258            are sent from maps and layers.
2259    
2260    2003-03-31  Jonathan Coles   <[email protected]>
2261    
2262            * Thuban/UI/classifier.py: Commented out some debugging statements.
2263            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
2264            RTbug #1769.
2265    
2266            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
2267            position (although position doesn't work yet under GTK).
2268            (DockableWindow.Destroy): New. Called when the window must be
2269            closed. Namely needed when the DockFrame closes and must close
2270            its children.
2271            (DockFrame): Listen for EVT_CLOSE and destroy all children.
2272    
2273            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
2274            when then window is told to close.
2275            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
2276            comment in source for more info.
2277    
2278            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
2279    
2280            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
2281            symmetry with other such methods.
2282            (MainWindow.ShowLegend): Show the legend docked by default.
2283    
2284    2003-03-28  Jonathan Coles   <[email protected]>
2285    
2286            * Thuban/UI/classifier.py: Support for highlighting a specific
2287            group within the grid when the classification dialog is opened.
2288            Also contains a lot of debugging printouts which will later
2289            be removed.
2290    
2291            * Thuban/UI/dock.py: Complete rework on the dock code so that
2292            that it is fairly removed from the rest of the Thuban application.
2293            It is easy to add new docks which the rest of the program having
2294            to be aware of them.
2295    
2296            * Thuban/UI/legend.py: Modifications to support selecting a
2297            specific group in the classification dialog. Changed how layers
2298            are drawn when the layer is visible/invisible.
2299    
2300            * Thuban/UI/mainwindow.py: Removed legend specific code and
2301            replaced it with calls to the new dock code.
2302    
2303            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
2304            to check if scale > 0. Trying to track down a divide by zero.
2305    
2306    2003-03-26  Jonathan Coles   <[email protected]>
2307    
2308            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
2309            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
2310            now part of DockableWindow.
2311            (LegendPanel.DoOnSelChanged): Select the current layer in the
2312            map.
2313            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
2314            with the selected layer and/or group.
2315    
2316    2003-03-26  Jonathan Coles   <[email protected]>
2317    
2318            This putback contains the code for dockable windows. There is
2319            no support in wxWindows as of this date for windows that can
2320            attach themselves to other windows.
2321    
2322            The current model contains a DockableWindow which has a parent
2323            window for when it is detached and a dock window that it puts
2324            its contents in when it is docked. The contents of a DockableWindow
2325            must be a DockPanel. DockPanel itself derives from wxPanel.
2326    
2327            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
2328            message, not a LAYER_LEGEND_CHANGED message.
2329    
2330            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
2331    
2332            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
2333            as one of the style properties for the fieldTypeText item to
2334            be sure that its size is correct when the text changes.
2335    
2336            * Thuban/UI/dock.py: New. Classes for the DockPanel and
2337            DockableWindow.
2338    
2339            * Thuban/UI/legend.py: Added some more buttons and made the
2340            LegendPanel a DockPanel.
2341    
2342            * Thuban/UI/mainwindow.py: Added sash windows to the main window
2343            and supporting functions for manipulating the sashes.
2344            (MainWindow.ShowLegend): Create a DockableWindow with the
2345            LegendPanel as the contents.
2346    
2347            * Thuban/UI/messages.py: Added DOCKABLE_* messages
2348    
2349            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
2350            not LAYER_LEGEND_CHANGED, messages.
2351    
2352    2003-03-25  Jonathan Coles   <[email protected]>
2353    
2354            * setup.py: Added custom script bdist_rpm_build_script so that
2355            when the rpm is built the path to wx-config is correct.
2356    
2357            * setup.cfg: Added line saying to use the custom build script
2358    
2359    2003-03-20  Jonathan Coles   <[email protected]>
2360    
2361            Initial implementation of the Legend.
2362    
2363            * Thuban/UI/legend.py: New. Creates a window that shows the map's
2364            Legend information and allows the user to add/modify classifications
2365            and how the layers are drawn on the map.
2366    
2367            * setup.py: New command 'build_docs' which currently uses
2368            happydoc to generate html documentation for Thuban.
2369    
2370            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
2371            Returns a string which is appropriately describes the group.
2372    
2373            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
2374            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
2375    
2376            * Thuban/Model/map.py (Map): Rename messages and use new, more
2377            specific, messages.
2378    
2379            * Thuban/Model/messages.py: New message to indicate that a layer's
2380            data has changed (LAYER_CHANGED). New map messages to indicate
2381            when layers have been added/removed/changed or if the stacking order
2382            of the layers has changed.
2383    
2384            * Thuban/Model/session.py: Rename and use new messages.
2385    
2386            * Thuban/UI/classifier.py: Remember if any changes have actually
2387            been applied so that if the dialog is cancelled without an application
2388            of changes we don't have to set a new classification.
2389            (ClassDataPreviewer): Pulled out the window specific code and put it
2390            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
2391            symbols on any DC.
2392            
2393            * Thuban/UI/mainwindow.py: New code to open the legend.
2394    
2395            * Thuban/UI/view.py: Use new message names.
2396    
2397    2003-03-19  Jonathan Coles   <[email protected]>
2398    
2399            * Thuban/UI/main.py (verify_versions): New. Checks the versions
2400            of Python, wxPython, and some other libraries.
2401    
2402            * extensions/thuban/wxproj.cpp (check_version): Checks the given
2403            version against what wxproj was compiled with.
2404            (check_version_gtk): If wxproj was compiled with gtk then check
2405            the given version against the version of the gtk library
2406            currently being used.
2407    
2408    2003-03-14  Bernhard Herzog  <[email protected]>
2409    
2410            * test/test_command.py: Run the tests when the module is run as a
2411            script
2412    
2413    2003-03-14  Bernhard Herzog  <[email protected]>
2414    
2415            Implement selection of multiple selected shapes in the same layer:
2416    
2417            - Introduce a new class to hold the selection. This basically
2418              replaces the interactor which was nothing more than the
2419              selection anyway. A major difference is of course that the new
2420              selection class supports multiple selected shapes in one layer
2421            
2422            - Move the object that represents the selection from the
2423              application to the canvas. The canvas is a better place than the
2424              application because the selection represents which shapes and
2425              layer of the map displayed by the canvas are selected and
2426              affects how the map is drawn.
2427    
2428            - Make the selection and its messages publicly available through
2429              the mainwindow.
2430    
2431            - The non-modal dialogs do not get a reference to the interactor
2432              anymore as they can simply refer to their parent, the
2433              mainwindow, for the what the interactor had to offer.
2434    
2435            * Thuban/UI/selection.py: New module with a class to represent the
2436            selection.
2437    
2438            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
2439            these unused messages
2440    
2441            * Thuban/UI/application.py (ThubanApplication.OnInit)
2442            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
2443            interactor is gone now.
2444            (ThubanApplication.CreateMainWindow): There is no interactor
2445            anymore so we pass None as the interactor argument for now for
2446            compatibility.
2447    
2448            * Thuban/UI/view.py (MapCanvas.delegated_messages)
2449            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
2450            Unsubscribe, delegate messages according to the delegated_messages
2451            class variable.
2452            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
2453            attributes from instance variables as described with the
2454            delegated_methods class variable.
2455            (MapCanvas.__init__): New instance variable selection holding the
2456            current selection
2457            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
2458            pass them on to the renderer
2459            (MapCanvas.SetMap): Clear the selection when a different map is
2460            selected.
2461            (MapCanvas.shape_selected): Simple force a complete redraw. The
2462            selection class now takes care of only issueing SHAPES_SELECTED
2463            messages when the set of selected shapes actually does change.
2464            (MapCanvas.SelectShapeAt): The selection is now managed in
2465            self.selection
2466    
2467            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
2468            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
2469            Unsubscribe, delegate messages according to the delegated_messages
2470            class variable.
2471            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
2472            attributes from instance variables as described with the
2473            delegated_methods class variable.
2474            (MainWindow.__init__): The interactor as ivar is gone. The
2475            parameter is still there for compatibility. The selection messages
2476            now come from the canvas.
2477            (MainWindow.current_layer, MainWindow.has_selected_layer):
2478            Delegate to the the canvas.
2479            (MainWindow.LayerShowTable, MainWindow.Classify)
2480            (MainWindow.identify_view_on_demand): The dialogs don't need the
2481            interactor parameter anymore.
2482    
2483            * Thuban/UI/tableview.py (TableFrame.__init__)
2484            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
2485            (LayerTableFrame.row_selected): The interactor is gone. It's job
2486            from the dialog's point of view is now done by the mainwindow,
2487            i.e. the parent. Subscribe to SHAPES_SELECTED instead
2488            of SELECTED_SHAPE
2489            
2490            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
2491            is gone. It's job from the dialog's point of view is now done by
2492            the mainwindow, i.e. the parent.
2493            
2494            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
2495            gone. It's job from the dialog's point of view is now done by the
2496            mainwindow, i.e. the parent.
2497    
2498            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
2499            gone. It's job from the dialog's point of view is now done by the
2500            mainwindow, i.e. the parent.
2501            (SessionTreeCtrl.__init__): New parameter mainwindow which is
2502            stored as self.mainwindow. The mainwindow is need so that the tree
2503            can still subscribe to the selection messages.
2504            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
2505            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
2506            selection is now accessible through the mainwindow. Subscribe to
2507            SHAPES_SELECTED instead of SELECTED_SHAPE
2508    
2509            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
2510            SHAPES_SELECTED message now.
2511            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
2512            so deal with multiple shapes
2513            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
2514            gone. It's job from the dialog's point of view is now done by the
2515            mainwindow, i.e. the parent.
2516    
2517            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
2518            parameter is now a list of shape ids.
2519            (RecordTable.SetTable): The second parameter is now a list of
2520            indices.
2521    
2522            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
2523            selected_shape parameter and ivar to selected_shapes. It's now a
2524            list of shape ids.
2525            (MapRenderer.draw_label_layer): Deal with multiple selected
2526            shapes. Rearrange the code a bit so that the setup and shape type
2527            distinctions are only executed once.
2528    
2529            * test/test_selection.py: Test cases for the selection class
2530    
2531    2003-03-11  Jonathan Coles   <[email protected]>
2532    
2533            * Thuban/Model/load.py: Temporary fix so that the xml reader
2534            doesn't cause Thuban to crash.
2535    
2536            * Thuban/Model/layer.py: Handle the cyclic references between
2537            a layer and its classification better, and be sure to disconnect
2538            the classification from the layer when the layer is destroyed
2539            so that we don't maintain a cyclic reference that may not be
2540            garbage collected.
2541    
2542            * Thuban/Model/classification.py: See comment for layer.py.
2543    
2544    2003-03-12  Jan-Oliver Wagner <[email protected]>
2545    
2546            * HOWTO-Release: New. Information on the steps for releasing
2547            a new version of Thuban.
2548    
2549    2003-03-11  Jonathan Coles   <[email protected]>
2550    
2551            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
2552            Use True instead of true.
2553            (Classifier): Should have a single panel in which all the controls lie.
2554    
2555            * Thuban/UI/proj4dialog.py: Add normal border.
2556    
2557            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
2558    
2559            * Thuban/UI/mainwindow.py: Use True instead of true.
2560    
2561            * setup.py: Update some definitions to use wxWindows2.4 files
2562    
2563            * Data/iceland_sample_class.thuban: Fixed file so that the
2564            field_type information is present.
2565    
2566    2003-03-10  Jonathan Coles   <[email protected]>
2567    
2568            * Thuban/UI/classifier.py (Classifier.__init__): Make the
2569            field type label grow so that when the text changes the
2570            size is updated correctly. This may be a wxWindows bug.
2571    
2572    2003-03-10  Jonathan Coles   <[email protected]>
2573    
2574            * Thuban/UI/application.py: Changed SESSION_CHANGED to
2575            SESSION_REPLACED.
2576    
2577            * Thuban/UI/classifier.py: Wrap text with _().
2578            (ClassGrid.CreateTable): Set dimensions and size hints here,
2579            instead of in Reset, so we only set the size once.
2580    
2581            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
2582    
2583            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2584            Call Close() instead of Shutdown().
2585    
2586            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2587    
2588            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2589            Go back to using OnClose() instead of Shutdown().
2590    
2591    2003-03-10  Jonathan Coles   <[email protected]>
2592    
2593            * Thuban/UI/classifier.py (Classifier): SelectField() needed
2594            to know the old field index as well as the new one.
2595    
2596    2003-03-10  Jonathan Coles   <[email protected]>
2597    
2598            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
2599            to correctly set the table information and call this from
2600            __init__ and from _OnFieldSelect so that all the information
2601            is up to date when the dialog opens and when a field is changed.
2602    
2603    2003-03-10  Jonathan Coles   <[email protected]>
2604    
2605            * Thuban/Model/classification.py (Classification): Don't use
2606            layer's message function directly, use the ClassChanged() method
2607            when then classification changes. SetField/SetFieldType/SetLayer
2608            must keep the information about field name and field type in
2609            sync when an owning layer is set or removed.
2610    
2611            * Thuban/Model/layer.py: Added ClassChanged() so that the
2612            classification can tell the layer when its data has changed.
2613            (Layer.SetClassification): Accepts None as an arguement to
2614            remove the current classification and correctly handles
2615            adding a new classification.
2616    
2617            * Thuban/Model/load.py: Comment out print statement
2618    
2619            * test/test_classification.py, test/test_save.py: New and
2620            improved tests.
2621    
2622    2003-03-07  Jonathan Coles   <[email protected]>
2623    
2624            * Thuban/Model/classification.py: Implemented __copy__ and
2625            __deepcopy__ for ClassGroup* and ClassGroupProperites so
2626            they can easily be copied by the classifier dialog.
2627            (ClassGroupProperites.__init__): The default line color should
2628            have been Color.Black.
2629    
2630            * Thuban/UI/classifier.py: Setting and Getting table values now
2631            uses a consistent set of functions.
2632            (Classifier): Now non-modal. Has field type label which changes
2633            as the field changes. Keep track of buttons in a list so that
2634            we can enable/disable the buttons when the None field is selected.
2635            (SelectPropertiesDialog): Add buttons to make the colors transparent.
2636    
2637            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
2638            does what OnClose did, but can be called by the application to
2639            close a window. Needed when a session changes, and we have to
2640            close the classifier windows.
2641    
2642            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2643            Shuts down open dialogs. Used when a new session is created
2644            or a session is opened.
2645            (MainWindow.SaveSession): Should only call application.SaveSession()
2646            if we don't call SaveSessionAs first.
2647            (MainWindow.Classify): Allow different classifier dialogs for
2648            different layers.
2649    
2650            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
2651            the parent class handle it. Add Shutdown() to unsubscibe from
2652            event notification and call the parent Shutdown(). This was
2653            necessary so the application can close the tree window.
2654    
2655    2003-03-06  Jonathan Coles   <[email protected]>
2656    
2657            * Thuban/Model/classification.py: Minor documentation changes,
2658            Addition of __eq__ and __ne__ methods.
2659            (Classification.SetLayer): prevent recursion between this method
2660            and Layer.SetClassification().
2661    
2662            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
2663    
2664            * Thuban/Model/layer.py (SetClassification): prevent recursion
2665            between this method and Classification.SetLayer().
2666    
2667            * test/test_classification.py, test/test_load.py,
2668            test/test_session.py: Fixed and added tests for the classification
2669            classes.
2670    
2671    2003-03-06  Bernhard Herzog  <[email protected]>
2672    
2673            * Thuban/UI/classifier.py (ClassGrid.__init__)
2674            (ClassGrid.CreateTable): Move the SetSelectionMode call to
2675            CreateTable because otherwise it triggers an assertion in
2676            wxPython/wxGTK 2.4.
2677    
2678    2003-03-05  Jonathan Coles   <[email protected]>
2679    
2680            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
2681    
2682            * Thuban/Model/load.py: import FIELDTYPE constants from table.
2683    
2684            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
2685    
2686            * Thuban/Model/table.py: Put FIELDTYPE constants back.
2687    
2688    2003-03-05  Jonathan Coles   <[email protected]>
2689    
2690            * Thuban/UI/classifier.py: Added class documentation.
2691            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
2692            Store just the groups in the table and generate the other
2693            column information when it is requested. Add "None" field
2694            to pull-down to select no classification.
2695    
2696            * Thuban/common.py: Moved FIELDTYPE constants from table.py
2697            (Str2Num): Only catch ValueError exceptions.
2698    
2699            * Thuban/Model/classification.py: Class documentation. Renaming
2700            of methods with Stroke to Line. Groups are stored in a single
2701            list with the default as the first element. Groups are searched
2702            in the order they appear in the list.
2703    
2704            * Thuban/Model/color.py: Documentation.
2705    
2706            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
2707            the kind of data represented by a field.
2708    
2709            * Thuban/Model/load.py (ProcessSession): Use proper string
2710            conversion function; fixes RTbug #1713.
2711    
2712            * Thuban/Model/save.py (Saver): Store field type information.
2713    
2714            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
2715            (Table): Add field_info_by_name() to retrieve field information
2716            by specifying the field name, not the number.
2717    
2718            * Thuban/UI/mainwindow.py: Function name changes.
2719    
2720            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2721            get the layer classification once. Don't try to classify
2722            values when the field is None: just use the default properties.
2723    
2724            * Thuban/UI/view.py: Function name changes.
2725    
2726            * Doc/thuban.dtd: Add field_type attribute to a classification.
2727    
2728    2003-03-04  Bernhard Herzog  <[email protected]>
2729    
2730            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
2731            the fill and stroke layer attributes optional with suitable
2732            default values. Add the stroke_width layer attribute. Use correct
2733            syntax for empty elements. Make the attribute list for labels
2734            refer to the label element.
2735    
2736    2003-03-04  Bernhard Herzog  <[email protected]>
2737    
2738            * setup.py (thuban_build_py.build): Add a comment about distutils in
2739            Python 2.3 containing some of the functionality we implement in
2740            setup.py ourselves.
2741    
2742            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
2743            before the selection mode. Doing it the other way round triggers
2744            an assertion in wxWindows.
2745    
2746            * Thuban/Model/save.py (escape): Fix typo in doc-string
2747    
2748            * Thuban/Model/classification.py: Remove unnecessary wxPython
2749            import
2750    
2751    2003-03-04  Jonathan Coles   <[email protected]>
2752    
2753            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
2754            Parameter 'value' should default to None.
2755    
2756            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
2757            the class attribute __classification is now private.
2758    
2759            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
2760            Classifier to ClassGrid. Added support for removing selected rows,
2761            which including code for keeping track of when cells are selected,
2762            and deselected.
2763            (ClassTable): Support for added/removing rows. Fixed a problem
2764            with __ParseInput whereby it would not allow strings (only numbers)
2765            to be entered.
2766            (Classifier): Added button and supporting code for removing
2767            selected rows.
2768    
2769    2003-02-27  Jonathan Coles   <[email protected]>
2770    
2771            * Thuban/common.py: Moved color conversion functions into
2772            Thuban/UI/common.py.
2773            (Str2Num): Now converts the float (not the string) to a long/int
2774            so that an exception isn't thrown.
2775    
2776            * Thuban/UI/common.py: Common functions used in several UI modules
2777    
2778            * Thuban/Model/classification.py: Changed the class hierarchy
2779            so that a Classification consists of Groups which return
2780            Properties when a value matches a Group.
2781    
2782            * Thuban/Model/layer.py: Fixed name resolution problem.
2783    
2784            * Thuban/Model/load.py: Use new Classification and Group functions.
2785    
2786            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
2787            failure.
2788            (Saver.write_classification): Use new Classification and Group
2789            functions.
2790    
2791            * Thuban/UI/classifier.py: Changes to use new Classification and Group
2792            functions. Fix to create a tuple with a single value instead of
2793            simply returning the value.
2794    
2795            * Thuban/UI/renderer.py: Use new Classification and Group functions.
2796            Use common.py functions.
2797    
2798            * Thuban/UI/tree.py: Use common.py functions.
2799            
2800            * test/test_classification.py: Use new Classification and Group
2801            classes.
2802    
2803    2003-02-24  Jonathan Coles   <[email protected]>
2804    
2805            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
2806            functions from Thuban color objects to wxWindow colour objects.
2807    
2808            * Thuban/Model/classification.py (Classification): Renamed
2809            GetProperties() to GetClassData(). Used the new iterator
2810            in TreeInfo().
2811            (ClassIterator): Iterator implementation to iterate over the
2812            ClassData objects in a classification object.
2813    
2814            * Thuban/Model/save.py (Saver.write_classificaton): Uses
2815            the new iterator to save the classification information.
2816    
2817            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
2818            for changing the stroke and fill colors and previewing the
2819            changes.
2820    
2821            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
2822            MainWindow.SaveSessionAs): Text string changes so the dialogs
2823            have more meaningful titles.
2824    
2825            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
2826            Classification method name from GetProperties to GetClassData.
2827    
2828            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
2829            instead of accessing now non-existent class variables.
2830    
2831    2003-02-24  Bernhard Herzog  <[email protected]>
2832    
2833            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
2834            unneeded Shape() call. Rendering is substantially faster without
2835            it and it avoids some problems with broken shape files.
2836    
2837    2003-02-20  Frank Koormann   <[email protected]>
2838    
2839            Force minimal size of identify and label dialogs. The autosizing
2840            looked too ugly.
2841    
2842            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
2843            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
2844            Set size of listctrl.
2845            * Thuban/UI/identifyview.py (IdentifyView.__init__):
2846            Set size of dialog.
2847    
2848    2003-02-19  Jonathan Coles   <[email protected]>
2849    
2850            * test/test_classification.py, test/test_layer.py,
2851            test/test_load.py, test/test_map.py, test/test_session.py:
2852            Updated the tests to use the new functions that are in the
2853            respective classes.
2854    
2855            * Thuban/Model/classification.py (Classification):
2856            Uses the new ClassData* classes. Modification messages are
2857            passed up to the parent layer (if it exists).
2858            (ClassData): New class to encapsulate the common data in each
2859            classification property.
2860            (ClassDataDefault): Represents the Default class. data.
2861            (ClassDataPoint): Represents a single class. data point
2862            (ClassDataRange): Represents a class. range
2863            (ClassDataMap): Represents a class. map (unused).
2864    
2865            * Thuban/Model/color.py: Added Color.None to represent something
2866            with no color. Color.Black represents the color black.
2867            (NoColor): Helper class derived from Color to represent something
2868            with no color.
2869    
2870            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
2871            stroke_width attributes. Made the 'classification' attribute private.
2872            New methods for setting/getting the classification.
2873    
2874            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
2875            to get the classifcation and use the new ClassData* classes to
2876            hold the classification data. Use Str2Num to convert numbers
2877            properly.
2878    
2879            * Thuban/Model/save.py (Saver): Use new Color and Classification
2880            methods
2881    
2882            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
2883            custom grid.
2884            (ClassTable): Support for editing Values and Labels and for
2885            changing what type (point or range) of data is stored in each
2886            property based on how the user enters the data.
2887            (Classifier): Support for saving the new classifications and
2888            launching the dialog to edit a property.
2889            (SelectPropertiesDialog): New class for editing the visual
2890            properties of a classification (stroke color, width, and fill color)
2891            (ClassPreviewer): Took the Draw method from ClassRenderer and
2892            made most of it into this new class. Intend to use this class in
2893            the SelectPropertiesDialog for previewing changes.
2894    
2895            * Thuban/UI/renderer.py: Use new Color and Classification methods.
2896    
2897            * Thuban/UI/tree.py: Formatting changes.
2898    
2899            * Doc/thuban.dtd: Add 'label' element
2900    
2901            * Thuban/common.py: New. Contains common routines used throughout
2902            the code.
2903            (Str2Num): Takes a string and converts it to the "best" type of
2904            number.
2905    
2906    2003-02-14  Bernhard Herzog  <[email protected]>
2907    
2908            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
2909            dragging flag is always set to 0 even when the tool implementation
2910            raises an exception
2911    
2912    2003-02-11  Bernhard Herzog  <[email protected]>
2913    
2914            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
2915            method to create a splash screen.
2916            (ThubanApplication.ShowMainWindow): New. Show the main window.
2917            Needed so the splash screen can display the mainwindow
2918            (ThubanApplication.OnInit): Call the
2919            new splash_screen method to determine whether the application
2920            should display a splash screen. If it displays a splash screen do
2921            not immediately show the main window.
2922    
2923    2003-02-11  Jonathan Coles  <[email protected]>
2924    
2925            * Thuban/Model/classification.py: Added import line to fix
2926            feature conflicts between running on python2.2 and python2.1.
2927    
2928            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2929            onto the clinfo parameter, so removed the deepcopy().
2930    
2931    2003-02-10  Jonathan Coles  <[email protected]>
2932    
2933            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2934            Added element_open variable to track opening and closing of tags
2935            so that tags that don't span more than one line are closed with
2936            /> instead of </tag_name>. Use the GetDefault*() methods of
2937            the Classification class.
2938    
2939            * Thuban/Model/classification.py (Classificaton): Added set and
2940            get methods for the default data. The class also takes a layer
2941            reference so that modification messages can be sent. Fixed the
2942            methods to use the new ClassData class.
2943            (ClassData): New class to encapsulate the classification data
2944    
2945            * Thuban/Model/layer.py (Layer): Remove the
2946            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2947            SetDefault*() methods on the layer's classification object.
2948            (Layer.__init__): Use the new SetDefault*() methods in the
2949            Classification class.
2950    
2951            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2952            object instead of a dictionary.
2953    
2954            * Thuban/UI/classifier.py (ClassRenderer): New class to
2955            draw the classifications in the dialog box's table.
2956            (Classifier): Modified to use the ClassRenderer class.
2957    
2958            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2959            methods of the Classification class.
2960    
2961            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2962            of the ClassData class.
2963    
2964            * test/test_classification.py, test/test_layer.py,
2965            test/test_map.py, test/test_session.py: Fix the tests to work
2966            with the above code changes.
2967    
2968    2003-02-03  Jonathan Coles  <[email protected]>
2969    
2970            * Thuban/Model/classification.py (Classification): Added getNull()
2971            to return the NullData reference
2972    
2973            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2974            Layer.SetStrokeWidth): Modified these functions to change the
2975            null data in the classification rather than keep these values
2976            directly in the Layer class. Menu options to change these values
2977            work again.
2978    
2979    2003-01-28  Jonathan Coles  <[email protected]>
2980    
2981            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2982            Fixed crashing problem on some systems. Dialog box shows
2983            classification data.
2984    
2985            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2986            Colors in the tree view.
2987    
2988            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2989            the tree info for classifications. Commented out unnecessary lines.
2990    
2991            * Thuban/Model/classification.py (Classification.TreeInfo): New
2992            function to add information about the classification into the
2993            tree view.
2994    
2995    2003-01-27  Jan-Oliver Wagner <[email protected]>
2996    
2997            * Thuban/__init__.py (_): New.
2998    
2999            * Thuban/Model/classification.py, Thuban/Model/extension.py,
3000            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
3001            Thuban/Model/session.py, Thuban/UI/application.py,
3002            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
3003            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
3004            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
3005            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
3006            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
3007    
3008    2003-01-27  Jonathan Coles  <[email protected]>
3009    
3010            * Thuban/Model/layer.py: Classification initialization calls.
3011    
3012            * Thuban/Model/classification.py: Created class to encapsulate
3013            a layer classification. Supports specific data points and
3014            ranges.
3015    
3016            * Thuban/Model/load.py: Added support for loading classification
3017            information.
3018    
3019            * Thuban/Model/save.py: Added support for saving classification
3020            information.
3021    
3022            * Thuban/UI/classifier.py: Initial class for a dialog box for
3023            specifying classification information.
3024    
3025            * Thuban/UI/mainwindows.py: Support for opening the classifier
3026            dialog.
3027    
3028            * Thuban/UI/renderer.py: Support for drawing a layer with the
3029            classification information.
3030    
3031            * Data/iceland_sample_class.thuban: iceland_sample with
3032            classification data.
3033    
3034            * test/test_classification: Tests for the Classification class.
3035    
3036    2002-12-09  Bernhard Herzog  <[email protected]>
3037    
3038            * test/test_command.py: New. Tests for the command classes.
3039    
3040            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
3041            (Command.IsTool): New method to distinguish between command
3042            switching tools and other commands.
3043    
3044            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
3045            the tool to avoid direct assignments to instance variables
3046            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
3047            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
3048            change the tool
3049    
3050            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
3051            active tool's command turns insensitive, disable the tool.
3052            (_tool_command): Use the new ToolCommand class
3053    
3054            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
3055            SelectTool method to change the tool
3056            (iconfile): Use the ToolCommand class
3057    
3058    2002-12-03  Bernhard Herzog  <[email protected]>
3059    
3060            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
3061            the case of selected items that are not children of Layers or Maps
3062            properly. Previously this bug would trigger an assertion in
3063            wxWindows.
3064    
3065    2002-11-06  Frank Koormann  <[email protected]>
3066    
3067            * Thuban/UI/mainwindow.py: Altered the order of tools in the
3068            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
3069            Full Extent).
3070    
3071    2002-10-23  Bernhard Herzog  <[email protected]>
3072    
3073            * setup.py (setup call): version now 0.1.3
3074    
3075            * MANIFEST.in: Add the files in test/
3076    
3077            * test/README: Add note about tests requiring the iceland data
3078    
3079            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
3080            copyright notice.
3081    
3082    2002-10-18  Bernhard Herzog  <[email protected]>
3083    
3084            * test/test_map.py
3085            (TestMapWithContents.test_projected_bounding_box): Use an explicit
3086            epsilon.
3087    
3088            * test/support.py (FloatComparisonMixin.assertFloatEqual)
3089            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
3090            message if the assertion fails and don't return the return value
3091            of self.assert_. In assertFloatSeqEqual the return meant that not
3092            all items of the sequence were compared.
3093    
3094    2002-09-20  Bernhard Herzog  <[email protected]>
3095    
3096            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
3097    
3098            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
3099    
3100            * test/test_map.py (TestMapWithContents.test_tree_info): Create
3101            the string with the bounding box on the fly because of platform
3102            differences in the way %g is handled.
3103    
3104            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
3105            DBFfile too because Thuban layers can't yet cope missing DBF
3106            files.
3107    
3108    2002-09-20  Bernhard Herzog  <[email protected]>
3109    
3110            * test/test_menu.py: Use initthuban instead of
3111            add_thuban_dir_to_path to initialize Thuban.
3112    
3113            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
3114            Mixin class for float comparisons
3115            (SubscriberMixin): New. Mixin class to test messages sent through
3116            the Connector class
3117    
3118            * test/README: Fix a typo and add the -v flag to the command for
3119            individual tests
3120    
3121            * test/test_session.py: New. Test cases for Thuban.Model.session
3122    
3123            * test/test_proj.py: New. Test cases for Thuban.Model.proj
3124    
3125            * test/test_map.py: New. Test cases for Thuban.Model.map
3126    
3127            * test/test_layer.py: New. Test cases for Thuban.Model.layer
3128    
3129            * test/test_label.py: New. Test cases for Thuban.Model.label
3130    
3131            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
3132    
3133            * test/test_color.py: New. Test cases for Thuban.Model.color
3134    
3135            * test/test_base.py: New. Test cases for Thuban.Model.base
3136    
3137    2002-09-13  Bernhard Herzog  <[email protected]>
3138    
3139            * Thuban/Model/session.py (Session.forwarded_channels): Forward
3140            the CHANGED channel too.
3141    
3142            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
3143            CHANGED channel too.
3144            (Map.__init__): Call the Modifiable constructor as well.
3145    
3146            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
3147            event if the modified flag changes.
3148            (Modifiable.changed): Tweak the doc-string.
3149    
3150            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
3151            (MainWindow.set_position_text): Put the code that puts the text
3152            with the mouse position into the status bar into the new method
3153            set_position_text so that it can overwritten in derived classes.
3154    
3155    2002-09-12  Bernhard Herzog  <[email protected]>
3156    
3157            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
3158            message box on the main window.
3159    
3160    2002-09-11  Bernhard Herzog  <[email protected]>
3161    
3162            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
3163            the 'E' because it's less likely to interfere with other menu
3164            entries.
3165            (MainWindow.build_menu): remove an incorrect comment.
3166    
3167    2002-09-10  Bernhard Herzog  <[email protected]>
3168    
3169            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
3170            (_tool_command): Add sensitive parameter
3171            (_has_visible_map): Sensitivity callback to tools and other
3172            commands that require a visible map. Use it in map_zoom_in_tool,
3173            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
3174            and map_full_extent
3175    
3176    2002-09-06  Bernhard Herzog  <[email protected]>
3177    
3178            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
3179            VIEW_POSITION
3180    
3181    2002-09-04  Frank Koormann  <[email protected]>
3182    
3183            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
3184    
3185    2002-09-02  Bernhard Herzog  <[email protected]>
3186    
3187            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
3188            wxWindows already and our implementation doesn't work correctly
3189            with wxGTK 2.3:
3190            (MapCanvas.__init__): Remove the instance variable
3191            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
3192            be drawin
3193            (MapCanvas.OnIdle): Removed.
3194    
3195            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
3196            a parameter to determine the size of the rectangle.
3197            (MapCanvas.find_shape_at): Create the box around the point on a
3198            layer by layer basis and make the size depend on the shape type.
3199            This solves a problem with the selection of point shapes at the
3200            border of the layer's bounding box
3201    
3202    2002-08-30  Bernhard Herzog  <[email protected]>
3203    
3204            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
3205            for the sensitivity  of remove layer.
3206            (_can_remove_layer): New. Sensitivity callback for remove layer
3207            (Command layer_remove): Use _can_remove_layer
3208    
3209            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
3210            determine whether a given layer can be deleted.
3211    
3212            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
3213            (MapCanvas.do_redraw): Get rid of the unused update_region
3214            instance variable
3215    
3216            * Thuban/UI/view.py: Add/update some doc-strings.
3217    
3218            * test/: new subdirectory with a bunch of unit tests.
3219    
3220            * test/README, test/test_table.py, test/test_save.py,
3221            test/test_menu.py, test/test_load.py: Initial set of tests and
3222            brief instructions on how to run them
3223    
3224    2002-08-29  Bernhard Herzog  <[email protected]>
3225    
3226            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
3227            arcs with multiple parts.
3228    
3229            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
3230            Handle degenrate rectangles.
3231    
3232            * Thuban/Model/table.py: Make writing records work correctly:
3233            (Table.__init__): Keep track of whether the DBF is open for
3234            writing
3235            (Table.write_record): Open the DBF file for writing when necessary
3236    
3237    2002-08-27  Bernhard Herzog  <[email protected]>
3238    
3239            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
3240            dbf files only for reading by default. Use a new writable dbf
3241            object for writing.
3242    
3243    2002-08-26  Bernhard Herzog  <[email protected]>
3244    
3245            * Thuban/UI/mainwindow.py: Refactor the context creation:
3246            (MainWindow.Context): New method to return a context
3247            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
3248            new method
3249    
3250            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
3251            layer table specific code from TableGrid into LayerTableGrid
3252            (TableFrame, LayerTableFrame): Split the layer table specific code
3253            from TableFrame into LayerTableFrame
3254            (LayerTableGrid.select_shape): Remove a debug print
3255    
3256            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
3257            LayerTableFrame
3258    
3259    2002-08-23  Bernhard Herzog  <[email protected]>
3260    
3261            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
3262            absolute filename.
3263    
3264    2002-08-22  Bernhard Herzog  <[email protected]>
3265    
3266            * Thuban/Model/table.py (Table.write_record): New method to write
3267            records.
3268            (Table.__init__): Open the DBF file for writing too.
3269    
3270            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
3271            into the underlying table.
3272    
3273            * extensions/shapelib/shapefil.h (DBFCommit),
3274            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
3275            commit any changes made to the DBF file.
3276    
3277            * Thuban/UI/mainwindow.py (make_check_current_tool)
3278            (_tool_command): Put the code that generates the "checked"
3279            callback into a separate function so that we can reuse it
3280            elsewhere
3281    
3282            * Thuban/Model/save.py (Saver): New class to handle serializing a
3283            session into an XML file. The main reason to introduce a class is
3284            that applications built on Thuban can derive from it so that they
3285            can save additional information in a session file.
3286            (save_session): Delegate almost all the work to the Saver class.
3287            Rename the filename argument to file because it may be a file like
3288            object now.
3289    
3290            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
3291            code. Remove the little test code which would be executed when the
3292            module is run as a script which didn't work anymore since it can't
3293            import the other Thuban modules.
3294            (ProcessSession, load_session): Refactor the ProcessSession to
3295            have one method for each element start and end tag so that derived
3296            classes can easily override the processing of individual tags.
3297            Also, always parse with namespaces enabled because applications
3298            built on top of Thuban will likely use namespaces if they extend
3299            the session file format.
3300    
3301    2002-08-21  Bernhard Herzog  <[email protected]>
3302    
3303            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
3304            because thubaninit_contents will do it for us.
3305    
3306    2002-08-16  Jan-Oliver Wagner <[email protected]>
3307    
3308            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
3309            tree window already open
3310    
3311    2002-08-15  Bernhard Herzog  <[email protected]>
3312    
3313            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
3314            with self.
3315    
3316            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
3317            when we have actually captured it.
3318    
3319            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
3320            shapefile and destroy the table.
3321    
3322            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
3323    
3324    2002-08-14  Bernhard Herzog  <[email protected]>
3325    
3326            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
3327            instance variable columns
3328            (RecordTable.GetTypeName): row and col may be negative in some
3329            cases.
3330    
3331            * setup.py (InstallLocal.initialize_options)
3332            (InstallLocal.finalize_options, InstallLocal.user_options): New
3333            option create-init-file to build a thubaninit.py when running
3334            install_local
3335            (InstallLocal.run): Create the thubaninit.py module when requested
3336            (thubaninit_contents): Split the template into several parts and
3337            create a new function thubaninit_contents that creates the
3338            contents of a thubaninit module.
3339            (ThubanInstall.run): Use the new function to create the thubaninit
3340            module.
3341    
3342    2002-07-30  Bernhard Herzog  <[email protected]>
3343    
3344            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
3345            cleanup.
3346            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
3347    
3348            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
3349            direct base class' Destroy method.
3350    
3351            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
3352            layers.
3353            (Map.Destroy): Destroy the label_layer as well and call the
3354            inherited Desatroymethod first so that no more messages are
3355            issued.
3356            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
3357            message if the stacking order actually has changed. Add
3358            doc-strings.
3359            (Map.BoundingBox): Correct the doc-string.
3360            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
3361            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
3362    
3363            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
3364            all labels.
3365    
3366    2002-07-29  Bernhard Herzog  <[email protected]>
3367    
3368            * Thuban/Model/map.py (Map.subscribe_layer_channels)
3369            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
3370            to a layer's channels into separate methods.
3371            (Map.RemoveLayer, Map.AddLayer): Call the new methods
3372            (Map.Destroy): Unsubscribe from a layer's channels before
3373            destroying it.
3374    
3375            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
3376            selected_layer parameter to searched_layer which is the layer to
3377            search in.
3378            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
3379            search to that layer. Return the selected layer and shape.
3380    
3381            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
3382            typo
3383    
3384    2002-07-24  Bernhard Herzog  <[email protected]>
3385    
3386            * Thuban/UI/application.py (ThubanApplication.create_session):
3387            Extend the doc string.
3388            (ThubanApplication.subscribe_session)
3389            (ThubanApplication.unsubscribe_session): New methods to
3390            subscribe/unsubscribe to/from session channels.
3391            (ThubanApplication.SetSession): Call the new methods here.
3392            (ThubanApplication.maps_changed, ThubanApplication.set_map):
3393            Renamed set_map to maps_changed. Its now a subscriber for
3394            MAPS_CHANGED.
3395    
3396            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
3397            x-coordinate in case of simple clicks
3398    
3399            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
3400            don't pass it as a parameter
3401    
3402            * Thuban/Model/session.py (Session.RemoveMap): New
3403    
3404            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
3405            window size into a parameter.
3406    
3407    2002-07-23  Bernhard Herzog  <[email protected]>
3408    
3409            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
3410            just commands.
3411    
3412            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
3413            parameter list a bit to allow setting the window title and the
3414            initial message in the status bar. Update the callers.
3415    
3416            * Thuban/UI/application.py (ThubanApplication.OnInit)
3417            (ThubanApplication.CreateMainWindow): Put the mainwindow
3418            instantiation into a separate method so that it can be overridden
3419            by a subclass.
3420    
3421    2002-07-19  Bernhard Herzog  <[email protected]>
3422    
3423            * Thuban/Model/session.py: Issue a CHANGED message every time
3424            another changed message is issued to make it easier to get
3425            notified of changes.
3426            (Session): Update the doc string
3427            (Session.forward): Issue changed-events as CHANGED as well.
3428            (Session.changed): Overwrite the inherited version to issue
3429            CHANGED events as well.
3430    
3431            * Thuban/UI/tree.py: We can now simply subscribe to the session's
3432            CHANGED channel to be informed of changes.
3433            (SessionTreeCtrl.session_channels): Not needed any longer.
3434            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
3435            Only have to (un)subscribe CHANGED
3436    
3437            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
3438    
3439            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
3440            for the wxPython locale bug to __init__.py so that it's
3441            automatically executed by anybody using UI code from Thuban.
3442    
3443    2002-07-18  Bernhard Herzog  <[email protected]>
3444    
3445            * Thuban/UI/main.py (main): app no longer needs to be global
3446    
3447            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
3448            as parameter and store it in an instance variable
3449            (MainWindow.invoke_command, MainWindow.update_command_ui)
3450            (MainWindow.save_modified_session, MainWindow.NewSession)
3451            (MainWindow.OpenSession, MainWindow.SaveSession)
3452            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
3453            application object.
3454    
3455            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
3456            the main window with self.
3457    
3458            * Thuban/UI/context.py: New module with the context class
3459    
3460            * Thuban/UI/command.py (Command): Update doc string.
3461    
3462            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
3463            MainWindow.update_command_ui): Pass an instance of the context
3464            class to the command's methods
3465            (check_current_tool, call_method): Handle the new context
3466            implementation
3467    
3468            * Examples/simple_extensions/simple_tool.py (simple_tool,
3469            check_simple_tool): Handle the new context implementation
3470    
3471            * Examples/simple_extensions/simple_command.py (simple_command):
3472            Handle the new context implementation. Update the comments about
3473            the context.
3474    
3475            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
3476            doc-string
3477            (ThubanApplication.Session): New method to return the session
3478            object
3479    
3480            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
3481            interactor's selected_layer may not be a layer of the current
3482            session when the tree is updated while a new session is being set.
3483    
3484    2002-07-17  Bernhard Herzog  <[email protected]>
3485    
3486            * Thuban/UI/tree.py (color_string): Removed. No longer used.
3487            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
3488            update_tree into update_tree and add_items. The tree now uses a
3489            more generic way to display the contents of the tree.
3490            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
3491    
3492            * Thuban/Model/layer.py (Layer.TreeInfo),
3493            Thuban/Model/extension.py (Extension.TreeInfo),
3494            Thuban/Model/map.py (Map.TreeInfo),
3495            Thuban/Model/session.py (Session.TreeInfo):
3496            Add TreeInfo methods to implement the new tree view update scheme
3497    
3498    2002-07-16  Bernhard Herzog  <[email protected]>
3499    
3500            * Thuban/UI/application.py: Don't use "import from" for the
3501            MainWindow. It can't always be resolved.
3502            (ThubanApplication.OnInit): change reference to MainWindow
3503            accordingly.
3504    
3505            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
3506            completely
3507    
3508    2002-07-10  Bernhard Herzog  <[email protected]>
3509    
3510            * setup.py (create_init_module): New configurable variable whose
3511            default depends on the platform we're running on.
3512            (ThubanInstall.initialize_options): Initialize
3513            self.create_init_module from the global create_init_module
3514            (ThubanInstall.user_options): indictate that the options
3515            create-init-module and init-module-dir have arguments.
3516    
3517            * setup.py: In the setup call change the version number to include
3518            cvs.
3519    
3520            * MANIFEST.in: Add the files in Examples
3521    
3522    2002-07-09  Bernhard Herzog  <[email protected]>
3523    
3524            * setup.py: In the setup call, use the thuban homepage as the
3525            value of the url parameter.
3526    
3527            * Examples: New subdirectory for examples.
3528    
3529            * Examples/simple_extensions/simple_tool.xpm,
3530            Examples/simple_extensions/simple_tool.py,
3531            Examples/simple_extensions/simple_command.py,
3532            Examples/simple_extensions/README: Simple examples showing how to
3533            add new commands and tools.
3534    
3535            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
3536            bdist_rpm that we also have an install script.
3537            (bdist_inno): Add 2002 to the copyright notice.
3538    
3539            * setup.py: Create a file in python's site-packages directory to
3540            make installation of Thuban as a library easier.
3541            (ThubanInstall.user_options): Add two new options,
3542            create-init-module and init-module-dir
3543            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
3544            filenames for installation in the default directories.
3545            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
3546            the inherited methods to capture some filenames before they're
3547            transformed too much by distutils.
3548            (ThubanInstall.run): Create the init module if requested.
3549            (ThubanInstall.thuban_init_filename): New method to return the
3550            full name of the init module.
3551            (ThubanInstall.get_outputs): Append the filename of the init
3552            module.
3553    
3554    2002-07-08  Bernhard Herzog  <[email protected]>
3555    
3556            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
3557            handle the prefix properly which means that the default for the
3558            installation prefix should be /usr for RPMs and /usr/local when
3559            doing a normal source install.
3560            (bdist_rpm_install_script): Script to override the default install
3561            commands in the specfile generated by the bdist_rpm command.
3562            (thuban_bdist_rpm.user_options): Add a prefix option
3563            (thuban_bdist_rpm.initialize_options): Init the prefix option.
3564            Create the script files for the spec files as empty files here
3565            (thuban_bdist_rpm._make_spec_file): Override the inherited method
3566            to fill the script files with content.
3567    
3568            * Thuban/Model/save.py (relative_filename): Wrapper around
3569            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
3570            argument. save_session now automatically uses this version,
3571            solving a problem when saving to a relative filename.
3572    
3573            * setup.py: In the setup call, make sure that the library
3574            directories are under $prefix/lib not directly under $prefix.
3575    
3576    2002-06-20  Jan-Oliver Wagner <[email protected]>
3577    
3578            * Thuban/Model/extension.py: new module to handle extension objects.
3579            * Thuban/Model/messages.py: new messages for extensions.
3580            * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
3581            Session.AddExtension): new for handling extensions.
3582            Also some other minor changes to round up extension handling.
3583            * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
3584            of Extension titles and title and names of its objects.
3585    
3586    2002-05-29  Bernhard Herzog  <[email protected]>
3587    
3588            * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
3589            the events for a command.
3590            (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
3591            Call bind_command_events to bind the events. add_toolbar_command
3592            can now bind events too so that it's possible to have commands
3593            that are only available through the toolbar.
3594            (MainWindow.init_ids): New instance variable events_bound to keep
3595            track of for which commands events have been bound.
3596    
3597    2002-05-28  Bernhard Herzog  <[email protected]>
3598    
3599            * Thuban/UI/menu.py: New module to build and manage menus.
3600    
3601            * Thuban/UI/mainwindow.py: Remove some unused imports.
3602            (MainWindow.__init__, main_menu): move the definition of the main
3603            menu from __init__ to the Menu instance main_menu.
3604            (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
3605            build the menu bar and sub-menus from a menu description.
3606    
3607            * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
3608            startup file
3609            (ThubanApplication.read_startup_files): New method to run
3610            ~/.thuban/thubanstart.py
3611    
3612            * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
3613            Move the toolbar definition to the Menu instance main_toolbar.
3614            (MainWindow.build_toolbar): New method to build the toolbar
3615            similar to the build_menu methods
3616    
3617    2002-05-23  Bernhard Herzog  <[email protected]>
3618    
3619            * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
3620            layer_outline_color. Fix it in the definition of the command too.
3621    
3622            * Thuban/UI/command.py (Command): Fix typo in doc string
3623    
3624    2002-05-22  Bernhard Herzog  <[email protected]>
3625    
3626            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
3627            in the docstring
3628    
3629    2002-05-15  Bernhard Herzog  <[email protected]>
3630    
3631            * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
3632            when the shapefile is empty.
3633            (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
3634            now return None for empty shapefiles. Update doc-strings.
3635    
3636            * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
3637            the layer's bbox being None.
3638    
3639            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
3640            layer's bbox being None.
3641    
3642            * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
3643            necessary.
3644            (MapCanvas.__init__): New instance variables, last_selected_layer
3645            and last_selected_shape to determine how the selection has
3646            changed.
3647    
3648            * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
3649            AutoSizeColumns because it will cause a traversal of the entire
3650            table which for large .dbf files will take a very long time.
3651    
3652    2002-05-14  Bernhard Herzog  <[email protected]>
3653    
3654            * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
3655            maximum depth for the tree than shapelib does by default.
3656    
3657    2002-05-10  Bernhard Herzog  <[email protected]>
3658    
3659            * setup.py (py_modules): The shptree modules doesn't have a
3660            wrapper, so don't include it in the py_modules
3661    
3662    2002-05-08  Bernhard Herzog  <[email protected]>
3663    
3664            * extensions/shapelib/shptree.c (compare_ints): Make arguments
3665            const void * as in the qsort prototype
3666            (SHPTreeFindLikelyShapes): Remove some unused variables.
3667    
3668            * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
3669            maintains to redraw the window during a drag.
3670            (MapCanvas.unprojected_rect_around_point): New method to determine
3671            a small region around a point for hit-testing.
3672            (MapCanvas.find_shape_at): Only test the shapes in a small region
3673            around the point.
3674    
3675            * setup.py: Increment the version to 0.1.2
3676    
3677            * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
3678            debug print and set session to None after unsubscribing
3679    
3680    2002-05-07  Bernhard Herzog  <[email protected]>
3681    
3682            * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
3683            the file to have a .thuban extension.
3684    
3685            * Thuban/UI/tree.py (session_channels): New class constant with
3686            all the session channels to subscribe to to update the tree
3687            (SessionTreeCtrl.session_changed): Remember the session so that we
3688            can unsubscribe properly. Use the new class constant to
3689            unsubscribe from the old session and subscribe to the new one.
3690            (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
3691            subscriptions of the SessionTreeCtrl.
3692            (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
3693    
3694            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
3695            Session Tree" command to the file menu.
3696    
3697            * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
3698            as update_region to the renderer.
3699    
3700            * Thuban/UI/renderer.py
3701            (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
3702            update box is now directly a tuple, not a wxRect anymore.
3703    
3704            * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
3705            prints.
3706    
3707    2002-05-07  Bernhard Herzog  <[email protected]>
3708    
3709            * setup.py: Add the shptree extension module. See
3710            extensions/pyshapelib/ChangeLog for more details.
3711    
3712            * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
3713            extensions/shapelib/dbfopen.c: Really update to the versions of
3714            shapelib 1.2.9. For some reason it wasn't really done on
3715            2002-04-11.
3716    
3717            * extensions/shapelib/shptree.c: Modified version of shptree.c of
3718            shapelib 1.2.9. The only real difference is the use of qsort
3719            instead of a bubble sort implementation
3720    
3721            * Thuban/Model/layer.py (Layer.__init__): New instance variable
3722            shapetree to hold the shapelib quadtree for the shapefile
3723            (Layer.open_shapefile): Create the quad tree.
3724            (Layer.ShapesInRegion): New method to return the ids of shapes in
3725            a given region using the quad tree.
3726    
3727            * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
3728            comment
3729            (draw_polygon_shape): Accept both arcs and polygons.
3730            (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
3731            the api.
3732    
3733            * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
3734            return the shape ids to be rendered in a given layer.
3735            (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
3736            ids. Use draw_polygon_shape to draw arc shapes as well.
3737            (ScreenRenderer.RenderMap): New parameter for the rectangle that
3738            has to be updated
3739            (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
3740            calling it's ShapesInRegion method.
3741    
3742            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3743            update_region for the update region.
3744            (MapCanvas.OnPaint): Maintain the update region
3745            (MapCanvas.do_redraw): Pass the bounding box of the update_region
3746            to the renderer when drawing the bitmap. Reset the update_region.
3747    
3748    2002-05-03  Bernhard Herzog  <[email protected]>
3749    
3750            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
3751            MainWindow.OpenSession): Change the file extension of the session
3752            files to .thuban
3753    
3754            * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
3755            Move the map channels to be forwarded by the session into the
3756            class constant with forwarded_channels. Also add
3757            LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
3758            forwarded_channels
3759    
3760            * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
3761            typo and some rewording).
3762    
3763    2002-05-02  Bernhard Herzog  <[email protected]>
3764    
3765            * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
3766            around to speed up most redraws:
3767            (MapCanvas.__init__): New instance variable bitmap which holds the
3768            bitmap
3769            (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
3770            self.bitmap to draw.
3771            (MapCanvas.full_redraw): New method to force a full redraw
3772            including the bitmap
3773            (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
3774            make sure the bitmap is redrawn.
3775            (MapCanvas.projection_changed, MapCanvas.set_view_transform,
3776            MapCanvas.shape_selected): Call full_redraw instead of readraw to
3777            make sure the bitmap is redrawn.
3778            (MapCanvas.OnSize): New method to handle size events so that the
3779            bitmap can be redrawn.
3780    
3781    2002-04-29  Bernhard Herzog  <[email protected]>
3782    
3783            * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
3784            canvas' VIEW_POSITION event
3785            (MainWindow.view_position_changed): Handler for VIEW_POSITION.
3786            Update the text in the status-bar accordingly.
3787    
3788            * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
3789            (MapCanvas.__del__): Implement because Publisher.__del__ has to be
3790            called.
3791            (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
3792            current_position
3793            (MapCanvas.set_current_position): New method to set
3794            current_position. Issue a VIEW_POSITION event
3795            (MapCanvas.CurrentPosition): New public method to return the value
3796            of current_position. Should be called when the VIEW_POSITION event
3797            is processed.
3798            (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
3799            Update the position.
3800            (MapCanvas.OnLeaveWindow): Set the position to None.
3801    
3802            * Thuban/UI/messages.py (VIEW_POSITION): New message for the
3803            position in the statusbar
3804    
3805    2002-04-26  Frank Koormann <[email protected]>
3806    
3807            * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
3808    
3809    2002-04-24  Frank Koormann <[email protected]>
3810    
3811            * Resources/Bitmaps/identify.xpm: shadow added
3812    
3813            * Resources/Bitmaps/fullextent.xpm: new
3814    
3815    2002-04-22  Jan-Oliver Wagner <[email protected]>
3816    
3817            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
3818            box
3819    
3820    2002-04-21  Jan-Oliver Wagner <[email protected]>
3821    
3822            * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
3823    
3824            * Thuban/UI/tree.py (update_tree): added added map extent
3825    
3826            * Thuban/UI/mainwindow.py (_method_command): extended by parameter
3827            icon; added map_full_extend as tool
3828    
3829    2002-04-19  Jan-Oliver Wagner <[email protected]>
3830    
3831            * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
3832            saving _new_ sessions
3833    
3834            * Thuban/Model/session.py (create_empty_session): new session
3835            don't have a filename (set to None)
3836    
3837            * Thuban/UI/tree.py (update_tree): added filename and modified flag
3838    
3839            * Thuban/Model/load.py (ProcessSession): convert projection
3840            parameters from unicode to regular string
3841    
3842            * Data/iceland_sample.session: Added UTM Zone 26 projection.
3843    
3844    2002-04-11  Bernhard Herzog  <[email protected]>
3845    
3846            * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
3847            extensions/shapelib/dbfopen.c: Update to the versions of shapelib
3848            1.2.9
3849    
3850            * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
3851            the pyshapelib directoy into the list of include dirs, so that
3852            pyshapelib_api.h can be found.
3853    
3854            * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
3855            holds the pyshapelib C-API
3856            (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
3857            pyshapelib_api to access the shapelib functions.
3858            (initwxproj): Import the c_api from the shapelib module and
3859            initialize pyshapelib_api.
3860    
3861    2002-04-04  Bernhard Herzog  <[email protected]>
3862    
3863            * setup.py (thuban_bdist_rpm.initialize_options): Use
3864            initialize_options to create the scripts for the rpm.
3865    
3866            * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
3867    
3868    2002-04-03  Bernhard Herzog  <[email protected]>
3869    
3870            * setup.py: Increment version to 0.1.1
3871    
3872            * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
3873            Layer" and "Remove Layer" commands from the layer menu to the map
3874            menu
3875    
3876    2002-02-15  Bernhard Herzog  <[email protected]>
3877    
3878            * Thuban/Model/layer.py (Layer.Shape): list append only takes one
3879            argument (python <= 1.5.2 erroneously accepted multiuple
3880            arguments)
3881    
3882    2002-02-04  Bernhard Herzog  <[email protected]>
3883    
3884            * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
3885            RecordGrid in the identifyview.
3886            (IdentifyView.__init__): Use IdentifyGridCtrl instead of
3887            IdentifyListCtrl. The grid allows editing of the values.
3888    
3889            * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
3890            implementing a grid for a single row of a thuban table.
3891    
3892            * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
3893            layers by default. Easier to use than the previous default of only
3894            searching through the select layer which meant that if no layer
3895            was selected, you couldn't select a shape.
3896    
3897            * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
3898    
3899            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
3900            stroke_width attribute
3901    
3902            * Thuban/Model/save.py (save_session): Write the new stroke_width
3903            attribute
3904    
3905            * Thuban/Model/load.py (ProcessSession.startElement): Read the
3906            stroke_width attribute
3907    
3908            * Thuban/Model/layer.py (Layer.__init__): New parameter and
3909            instance variable stroke_width
3910            (Layer.SetStrokeWidth): Set the stroke_width.
3911    
3912    2002-02-01  Bernhard Herzog  <[email protected]>
3913    
3914            * extensions/thuban/wxproj.cpp (project_points): Fix two
3915            off-by-one errors in the last loop that joins the various parts
3916            together.
3917    
3918    2002-01-14  Bernhard Herzog  <[email protected]>
3919    
3920            * setup.py (data_dist.make_distribution): Fix some typos
3921    
3922    2001-09-18  Bernhard Herzog  <[email protected]>
3923    
3924            * README: Slight tweaking in preparation for the 0.1 release
3925    
3926            * setup.cfg: Add section for sdist to create both tgz and zip
3927            archives
3928    
3929            * setup.py: increase version number to 0.1
3930            (data_dist): New command class for data distribution
3931    
3932    2001-09-14  Bernhard Herzog  <[email protected]>
3933    
3934            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3935            Handle the case of no layer (i.e. layer is None) properly.
3936    
3937            * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3938            Set the initial selection of the combo boxes to reflect the
3939            projection we're starting with in a way that works on windows,
3940            too.
3941    
3942            * Thuban/Lib/connector.py (Connector.print_connections): Print the
3943            puiblisher's ids in hex to make it easier to compare them to the
3944            standard repr of python methods
3945    
3946            * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
3947            messages
3948    
3949    2001-09-13  Bernhard Herzog  <[email protected]>
3950    
3951            * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
3952            deselect the layer if no layer is selected
3953    
3954            * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
3955            idle time when there actually is something to draw. If there's
3956            nothing to draw simply clear the window
3957            (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
3958            (MapCanvas.SetMap): force a redraw in all cases because
3959            FitMapToWindow doesn't always do it.
3960            (MapCanvas.ZoomFactor): Add an optional parameter, center, to
3961            specify the point to move into the center of the window
3962            (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
3963            dragged, zoon in/out by a factor of 2
3964            (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
3965            index, i.e. reversed drawing order) so that objects appearing to
3966            be in from of others are selected first. This is probably mostly
3967            relevant for point shapes where the symbols used may overlap
3968    
3969            * Thuban/Model/session.py (create_empty_session): Unset the
3970            modified bit before returning it
3971    
3972            * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
3973            create_empty_session session to create the new, empty session.
3974    
3975            * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
3976            the tool bitmaps.
3977            (MainWindow.OnClose, MainWindow.save_modified_session): Separate
3978            the code that asks whether the session should be saved into the
3979            new method save_modified_session.
3980            (MainWindow.OpenSession, MainWindow.NewSession): Use the new
3981            method to save modified session here too.
3982    
3983    2001-09-11  Bernhard Herzog  <[email protected]>
3984    
3985            * setup.py (InnoIconItem): fix typo
3986    
3987            (thuban_bdist_inno.run):
3988            (bdist_inno.run): Move the decision not to create symlinks on
3989            non-nt platforms to thuban_bdist_inno and do it unconditinally
3990            since we never want to create the symlinks here
3991    
3992    2001-09-10  Bernhard Herzog  <[email protected]>
3993    
3994            * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
3995            identify view immediately
3996    
3997            * Thuban/UI/controls.py: New file with two classes RecordListCtrl
3998            and SelectableRecordListCtrl that implement the code shared by the
3999            identify view and the label dialog
4000    
4001            * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
4002            new class RecordListCtrl
4003    
4004            * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
4005            return value of GetValue is None instead of using it as a boolean
4006            directly so that Zero numbers are handled properly.
4007            (LabelListCtrl): Derive from the new class
4008            SelectableRecordListCtrl
4009    
4010            * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
4011            (Proj4Dialog.dialogLayout): Make the window resizable and set the
4012            size of the text control explicitly to make the sizers work on
4013            both Windows and X.
4014    
4015    2001-09-07  Bernhard Herzog  <[email protected]>
4016    
4017            * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
4018            that can limit the search to the currently selected layer.
4019            (MapCanvas.SelectShapeAt): Make sure that the currently selected
4020            layer stays selected even when no shape is found
4021            (MapCanvas.FitRectToWindow): If the rect has zero with or zero
4022            height do nothing (avoids zero division errors)
4023    
4024  2001-09-06  Bernhard Herzog  <[email protected]>  2001-09-06  Bernhard Herzog  <[email protected]>
4025    
4026            * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
4027            Correct the spelling of SessionTreeCtrl. dabbrev is too damn
4028            convenient :-)
4029            (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
4030            a new instvar layer_to_item to map layers to tree items
4031            (SessionTreeCtrl.layer_selected): Select the appropriate tree item
4032            to match the current selection in the interactor
4033    
4034            * Thuban/UI/interactor.py (Interactor.SelectedLayer):
4035            (Interactor.HasSelectedLayer): New methods to query the current
4036            selection
4037    
4038            * Thuban/UI/mainwindow.py (MainWindow.current_layer):
4039            (MainWindow.has_selected_layer): Simply call the appropriate
4040            interactor method
4041    
4042            * Thuban/UI/mainwindow.py (MainWindow.__init__):
4043            (MainWindow.LayerShowTable):
4044            (MainWindow.identify_view_on_demand): Store the interactor in an
4045            instvar and use that reference instead of going through main.app
4046    
4047            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
4048            * Thuban/UI/application.py (ThubanApplication.OnInit):
4049            * Thuban/UI/main.py (main): Create the session tree view in main
4050            with the new mainwindow method ShowSessionTree and not directly
4051            the application's OnInit method
4052    
4053            * Thuban/UI/tree.py (myTreeCtrlPanel):
4054            (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
4055            TreeCtrl isntead of a panel. This affects most method since we now
4056            refer to self instead of self.tree
4057            (SessionTreeView): New class implementing a non-modal dialog
4058            showing the session tree.
4059    
4060          * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the          * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
4061          layer to the tableview dialog.          layer to the tableview dialog.
4062    
4063          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
4064          (TableGrid):          (TableGrid):
4065          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
4066          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
4067          (TableFrame.__init__):          (TableFrame.__init__):
# Line 71  Line 4128 
4128  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
4129    
4130          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
4131            
4132          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
4133          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
4134            
4135          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
4136          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
4137          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 121  Line 4178 
4178          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
4179          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
4180          link_file method          link_file method
4181            
4182          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
4183          the window when the first layer is added to the map.          the window when the first layer is added to the map.
4184    
# Line 158  Line 4215 
4215          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
4216          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
4217          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
4218            
4219          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
4220          installer          installer
4221    

Legend:
Removed from v.35  
changed lines
  Added in v.1077

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26