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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1073 - (hide annotations)
Tue May 27 16:48:01 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 162812 byte(s)
update ChangeLog

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

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26