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

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

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

revision 595 by bh, Wed Apr 2 18:28:09 2003 UTC revision 899 by jonathan, Mon May 12 12:20:10 2003 UTC
# Line 1  Line 1 
1    2003-05-12  Jonathan Coles   <[email protected]>
2    
3            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
4            to table.UniqueValues() with calls that retrieve all the values
5            from the table. This will need to be replaced by a method on table
6            which can simply return the list (perhaps more efficiently).
7    
8    2003-05-12  Jonathan Coles   <[email protected]>
9    
10            The return value of ClassGenerator.CalculateQuantiles has changed.
11            Refer to the documentation for details.
12    
13            * test/test_classgen.py: Modified Quantile tests to use the
14            new return values.
15    
16            * Thuban/Model/classgen.py
17            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
18            use new return values from CalculateQuantiles to produce the correct
19            range bounds in the Classification.
20            (ClassGenerator.CalculateQuantiles): Add more comments describing
21            the return values and parameters. Make minor adjustments to improve
22            the legibility of the code. Fix problem with adjusted not being set
23            in most cases.
24    
25    2003-05-12  Frank Koormann <[email protected]>
26            
27            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
28            and latin1. Fixes #1851 finally.
29    
30    2003-05-09  Jonathan Coles   <[email protected]>
31    
32            * test/test_classgen.py: New. Tests the Quantile algorithm.
33    
34            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
35            Clean up debugging statement, add comments, fix a small bug in the
36            returned adjusted percentiles.
37            
38    2003-05-09  Jonathan Coles   <[email protected]>
39    
40            Introduces Range class from SciParam into the ClassGroupRange class,
41            and such ranges can now be saved and loaded from disk.
42    
43            Quantiles are now available in the Classification Generator.
44    
45            Initial support for building Queries on a table. Doesn't do anything
46            but run some tests.
47    
48            * Thuban/Model/classification.py: Explicit imports.
49            (ClassGroupRange): Use the Range class to store the underlying
50            range information. The interface remains the same, except for
51            GetRange(), and you can also supply a Range object as the min
52            parameter to SetRange or __init__.
53    
54            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
55            string appropriately for use in Thuban. Fixes RTbug #1851.
56            (SessionLoader.end_projection): Handle the context of the
57            projection tag a bit better by looking at what objects are not
58            None. There was an assumption that a projection tag for a map
59            could occur before any layers.
60            (SessionLoader.start_clrange): Provide backward compatibility for
61            reading min/max values as well as the new range parameter.
62    
63            * Thuban/Model/map.py: Explicit imports.
64    
65            * Thuban/Model/resource.py: Import _.
66            (ProjFileSaver.write): write header using projfile.dtd.
67    
68            * Thuban/Model/save.py: Explicit imports.
69            (XMLWriter.encode): New. Encode the given string from a format
70            used by Thuban into UTF-8. Fixes RTbug #1851.
71    
72            * Thuban/UI/classgen.py: Explicit imports.
73            (ClassGenDialog.__init__): Clean up the code and add support
74            for Quantiles.
75            (ClassGenDialog.OnOK): Add support for Quantiles.
76            (GenQuantilesPanel): New. Input panel for Quantiles.
77            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
78            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
79    
80            * Thuban/Model/classgen.py: New. Contains all the classes named above.
81    
82            * Thuban/UI/classifier.py: Explicit imports.
83            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
84            ClassTable.SetValueAsCustom): Reworked to use new Range class.
85    
86            * Thuban/UI/legend.py: Explicit imports.
87    
88            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
89            a Table menu and associated method calls.
90            (MainWindow.choose_color): Removed. No longer needed.
91    
92            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
93            should be disabled if no projection is selected in the available
94            list.
95    
96            * Thuban/UI/renderer.py: Explicit imports.
97    
98            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
99            with correctly selecting the rows and issuing the right events.
100            Be sure to call Skip() to allow the grid to do some of its own
101            handling which allows the rows to actually be selected.
102            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
103            selecting multiple shapes.
104            (LayerTableFrame): Support for building Queries.
105            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
106    
107            * Thuban/UI/tree.py: Explicit imports.
108    
109            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
110            table view can call it.
111    
112            * test/test_classification.py: Explicit imports.
113            (TestClassification.test_ClassGroupRange): Fix test for new
114            Range class.
115    
116            * Doc/thuban.dtd: Add range parameter for clrange.
117    
118            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
119            object in ClassGroupRange, and also uesd for inputting ranges in
120            the classifer table and elsewhere.
121    
122            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
123            yet.
124    
125    2003-05-09  Frank Koormann <[email protected]>
126    
127            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
128    
129    2003-05-08  Frank Koormann <[email protected]>
130    
131            Coding style updates
132    
133            * test/test_scalebar.py: Replaced tab indentation by spaces.
134    
135            * Thuban/UI/scalebar.py: Explicit imports.
136    
137    2003-05-08  Frank Koormann <[email protected]>
138    
139            * Thuban/UI/scalebar.py
140            (ScaleBar.DrawScalebar): Format string bug fixed.
141    
142    2003-05-08  Frank Koormann <[email protected]>
143    
144            Reorganization of scalebar component (no wx in Thuban/Model)
145    
146            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
147            (deriveInterval):
148            Calculate scalebar interval and unit which fits in width for scale.
149            (roundInterval): Round float.
150    
151            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
152    
153            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
154    
155            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
156    
157    2003-05-08  Frank Koormann <[email protected]>
158    
159            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
160            Initialize ScaleBar with canvas.map
161    
162            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
163            round intervals to display smarter lengths
164            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
165            layer. If the maps has no projection applied grey the scalebar.
166    
167    2003-05-07  Frank Koormann <[email protected]>
168            
169            Basic Scalebar features added.
170    
171            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
172    
173            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
174            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
175            and the renderer.
176    
177            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
178    
179            * Thuban/UI/messages.py: SCALE_CHANGED added.
180    
181    2003-05-07  Bernhard Herzog  <[email protected]>
182    
183            * Thuban/Model/session.py (Session.__init__): New instance
184            variable shapestores to hold a list of all open shapestore objects
185            (Session.ShapeStores): New. Accessor method for the shapestores
186            list.
187            (Session._add_shapestore, Session._clean_weak_store_refs): New.
188            Internal methods to maintain the shapestores list.
189            (Session.Tables): New. Return all tables open in the session.
190            (Session.OpenShapefile): Insert the new ShapeStore into the
191            shapestores list.
192    
193            * test/test_session.py (TestSessionSimple.test_initial_state): Add
194            tests for ShapeStores and Tables
195            (TestSessionWithContent.test_shape_stores)
196            (TestSessionWithContent.test_tables): New. Test cases for
197            ShapeStores and Tables
198    
199    2003-05-07  Bernhard Herzog  <[email protected]>
200    
201            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
202            Add comments about the optimizations used.
203            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
204            Implement the ReadValue table interface method.
205    
206            * test/test_transientdb.py
207            (TestTransientTable.run_iceland_political_tests)
208            (TestTransientTable.test_transient_joined_table): Add tests for
209            ReadValue
210    
211    2003-05-07  Frank Koormann <[email protected]>
212    
213            * Resources/Bitmaps/fulllayerextent.xpm,
214            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
215            new icons.
216    
217    2003-05-06  Bernhard Herzog  <[email protected]>
218    
219            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
220            New. Simply delegate to the transient table's version.
221    
222            * test/test_transientdb.py
223            (TestTransientTable.test_auto_transient_table_query): New. Test
224            case for AutoTransientTable's SimpleQuery
225    
226    2003-05-06  Bernhard Herzog  <[email protected]>
227    
228            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
229            Implement a simple query method for the query dialog
230            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
231            the row index or shapeid.
232            (TransientTable.create): Insert the right value of the row index
233            (TransientJoinedTable.create): Copy the row index of the left
234            table to the joined result table
235    
236            * test/test_transientdb.py
237            (TestTransientTable.test_transient_table_read_twice): Fix
238            doc-string
239            (TestTransientTable.test_transient_table_query): New. Test for the
240            SimpleQuery method
241    
242    2003-05-06  Bernhard Herzog  <[email protected]>
243    
244            Convert all table users to use the new table interface. This only
245            covers Thuban itself, not GREAT-ER or other applications built on
246            Thuban yet, so the compatibility interface stays in place for the
247            time being but it now issues DeprecationWarnings.
248    
249            Finally, the new Table interface has a new method, HasColumn.
250    
251            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
252            issue deprecation warnings when they're. The warnings refer to the
253            caller of the method.
254            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
255            for the deprecation warnings
256    
257            * test/test_table.py: Ignore the deprecation warnings for the old
258            table in the tests in this module. The purpose of the tests is to
259            test the old interface, after all.
260    
261            * test/test_transientdb.py
262            (TestTransientTable.run_iceland_political_tests): Use the
263            constants for the types. Add a test for HasColumn
264            (TestTransientTable.test_transient_joined_table): Adapt to new
265            table interface. Add a test for HasColumn
266            (TestTransientTable.test_transient_table_read_twice): Adapt to new
267            table interface
268    
269            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
270            Adapt to new table interface
271    
272            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
273            new table interface
274    
275            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
276            (RecordTable.SetTable): Adapt to new table interface
277    
278            * Thuban/UI/classifier.py (Classifier.__init__)
279            (Classifier.__init__): Adapt to new table interface
280    
281            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
282            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
283            to new table interface
284    
285            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
286            (AutoTransientTable.HasColumn): Implement the new table interface
287            method
288            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
289            (AutoTransientTable.UniqueValues): Adapt to new table interface
290    
291            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
292            Adapt to new table interface
293    
294            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
295            simplify opening shapefiles a bit easier.
296            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
297            (TestLayer.test_point_layer): Use the new helper method
298            (TestLayer.test_get_field_type): New. Test for the GetFieldType
299            method
300    
301            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
302            the new table method
303    
304            * test/test_memory_table.py (TestMemoryTable.test_has_column):
305            Test for the new table method HasColumn
306    
307    2003-05-06  Jonathan Coles   <[email protected]>
308    
309            Addresses the "Selection Extent" wish of RTbug #1787.
310    
311            * Resources/Bitmaps/fulllayerextent.xpm,
312            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
313            extent. These are just place holders for the real bitmaps.
314    
315            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
316            calculate the bounding box once (the first time compute_bbox() is
317            called).
318            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
319            the bounding box for the shapes in lat/long coordinates.
320    
321            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
322            option.
323            (MainWindow.has_selected_shapes): New. Returns true if there are
324            any selected shapes.
325            (MainWindow.FullSelectionExtent): New. Calls
326            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
327            (_has_selected_shapes): New. Returns true if there are any
328            selected shapes.
329    
330            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
331            true if there are any selected shapes.
332    
333            * Thuban/UI/view.py (MapCanvas): Added delegated method
334            HasSelectedShapes.
335            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
336            shapes on the canvas using the map projection (if any).
337    
338            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
339            for Layer.ShapesBoundingBox().
340    
341    2003-05-06  Bernhard Herzog  <[email protected]>
342    
343            * Resources/Projections/defaults.proj: Fix spelling of Mercator
344    
345    2003-05-05  Jonathan Coles   <[email protected]>
346    
347            Addresses the "Full Layer Extent" wish of RTbug #1787.
348    
349            * Resources/Projections/defaults.proj: Added UK National Grid.
350    
351            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
352            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
353            when the user selects the menu option.
354    
355            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
356            scales the given layer on the canvas using the map projection.
357    
358    2003-05-05  Bernhard Herzog  <[email protected]>
359    
360            Convert the table implementations to a new table interface. All
361            tables use a common mixin class to provide backwards compatibility
362            until all table users have been updated.
363    
364            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
365            provide backwards compatibility for table classes implementing the
366            new interface
367            (DBFTable, MemoryTable): Implement the new table interface. Use
368            OldTableInterfaceMixin as base for compatibility
369            (DBFColumn, MemoryColumn): New. Column description for DBFTable
370            and MemoryTable resp.
371    
372            * test/test_dbf_table.py: New. Test cases for the DBFTable with
373            the new table interface.
374    
375            * test/test_memory_table.py: New. Test cases for the MemoryTable
376            with the new table interface.
377    
378            * test/test_table.py: Document the all tests in this file as only
379            for backwards compatibility. The equivalent tests for the new
380            interface are in test_memory_table.py and test_dbf_table.py
381            (MemoryTableTest.test_read): field_info should be returning tuples
382            with four items
383            (MemoryTableTest.test_write): Make doc-string a more precise.
384    
385            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
386            table interface. Derive from from OldTableInterfaceMixin for
387            compatibility.
388            (TransientTableBase.create): New intance variable column_map to
389            map from names and indices to column objects
390            (TransientTable.create): Use the new table interface of the input
391            table
392            (AutoTransientTable): Convert to new table interface. Derive from
393            from OldTableInterfaceMixin for compatibility.
394            (AutoTransientTable.write_record): Removed. It's not implemented
395            yet and we still have to decide how to handle writing with the new
396            table and data framework.
397    
398            * test/test_transientdb.py
399            (TestTransientTable.run_iceland_political_tests)
400            (TestTransientTable.test_transient_joined_table): Use the new
401            table interface
402    
403    2003-05-05  Jonathan Coles   <[email protected]>
404    
405            This is namely a collection of UI updates to improve user interactivity.
406            Tabbing between controls now exists and you can use ESC to close dialog
407            boxes; ENTER will active the default button.
408    
409            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
410            order that the controls are created so that tabbing works correctly.
411            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
412            wxDialog can handle the default button correctly.
413            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
414            same reasons as for OnOK.
415            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
416            when we ask the table for the maximum/minimum values of a field
417            which could take a very long time.
418    
419            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
420            order that the controls are created so that tabbing works correctly.
421            (SelectPropertiesDialog.__init__): Rearrange the order that the
422            controls are created so that tabbing works correctly.
423    
424            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
425            to derive from a wxDialog but behave like the original implementation
426            which was derived from a wxFrame. wxDialog provides useful key
427            handling functionality like ESC calling OnCancel and ENTER calling
428            OnOK which is lost with wxFrame.
429    
430            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
431            new dialogs.
432    
433            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
434            order that the controls are created so that tabbing works correctly.
435            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
436            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
437            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
438            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
439            can provide the "UK National Grid" as a default projection.
440            (UTMPanel.__init__): Rearrange the order that the controls are
441            created so that tabbing works correctly.
442    
443    2003-05-05  Bernhard Herzog  <[email protected]>
444    
445            * extensions/thuban/wxproj.cpp: Fix some of the comments.
446            (project_point): If a map projection but no layer projection is
447            given, convert degrees to radians before applying the map
448            projection.
449    
450            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
451            (TableGrid.allow_messages): New methods to make it possible to
452            inhibit message sending.
453            (TableGrid.issue): Only send the message if not inhibited.
454            (LayerTableGrid.select_shape): Use the new methods to make sure
455            that no ROW_SELECTED message is sent while we're updating the
456            selected rows to match the selected shapes.
457    
458    2003-05-02  Jan-Oliver Wagner <[email protected]>
459    
460            Implementation of MemoryTable.
461    
462            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
463            implementation that operates on a list of tuples. All of the data
464            are kept in the memory.
465    
466            * test/test_table.py (MemoryTableTest): New.
467    
468            * test/test_transientdb.py (SimpleTable): Removed.
469            (TestTransientTable.test_transient_joined_table,
470            (TestTransientTable.test_transient_table_read_twice): Replaced
471            SimpleTable by MemoryTable.
472    
473    2003-04-30  Jonathan Coles   <[email protected]>
474    
475            * Data/iceland_sample.thuban: Now contains correct projections
476            for each of the layers.
477    
478            * Resources/Projections/defaults.proj: Geographic projection
479            contains unit conversion parameter.
480    
481    2003-04-30  Jonathan Coles   <[email protected]>
482    
483            The most important part of this putback is the projection changes.
484            It should now be possible to specify the projection that a layer
485            is in and then specify a different projection for the map. The
486            projection dialog has an extra parameter for a geographic projection
487            which lets the user select if the input is in degrees or radians.
488    
489            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
490            to say that the parameter is a tuple of unprojected
491            points (which is what the callers to this method were assuming).
492            Also, since the points are unprojected we need to projected them.
493    
494            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
495            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
496            groups are selected, move the layer up/down. Fixes RTbug #1833.
497    
498            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
499    
500            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
501            parameter in call to SetClientData.
502            (GeoPanel): Add support for selecting the units that the
503            source data is in (Radians or Degrees).
504    
505            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
506            the rendering loop by reducing the number of if's, removing the
507            unnecessary try/except block, and checking if the old group
508            is the same as the new one (which happens a lot if there is
509            no classification, or lots of shapes are in the same group).
510    
511            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
512            around the redraw routine to try to catch problems that the user
513            may create by selecting invalid projections for the data set and
514            map. Clears the display if there are any problems and prints the
515            error.
516            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
517            rectangle.
518    
519            * extensions/thuban/wxproj.cpp (project_point): First invert the
520            supplied point (which should be in projected coordinates) using
521            the layer's projection and then project the point using the
522            map's projection.
523            (project_points): Use project_point() to project each point.
524    
525    2003-04-30  Jan-Oliver Wagner <[email protected]>
526    
527            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
528            don't set the Classification to None if the classfication field
529            is None (ie only a DEFAULT).
530    
531    2003-04-30  Bernhard Herzog  <[email protected]>
532    
533            * Thuban/UI/view.py: Fix some typos.
534    
535            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
536            not pop up the dialog if the selection becomes empty (this could
537            happen if e.g. a new selection is opened while the identify tool
538            is active and dialog had been closed)
539    
540    2003-04-30  Bernhard Herzog  <[email protected]>
541    
542            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
543            instance variable read_record_last_result
544            (TransientTableBase.read_record): Make sure reading the same
545            record twice works. The implementation uses the new instance
546            variable read_record_last_result
547    
548            * test/test_transientdb.py
549            (TestTransientTable.test_transient_table_read_twice): New test
550            case for the above bug-fix.
551    
552    2003-04-29  Jonathan Coles   <[email protected]>
553    
554            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
555    
556            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
557    
558            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
559            (ClassTable.SetValueAsCustom): Rename keyword argument in
560            ClassGroup* constructors to match argument name.
561    
562    2003-04-29  Bernhard Herzog  <[email protected]>
563    
564            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
565            transient DB if it exists to make sure it doesn't leave a journal
566            file in the temp directory.
567    
568            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
569            self.conn to None after closing the connection to make sure it's
570            not closed twice
571    
572    2003-04-29  Jonathan Coles   <[email protected]>
573    
574            Add a visible parameter in the layer XML tag. The default value is
575            "true". If anything other than "false" is specified we also assume
576            "true". Addresses RTbug #1025.
577    
578            * Doc/thuban.dtd: Add visible parameter to a layer.
579    
580            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
581            of visible from 1 to True.
582            (Layer.__init__): Change default value of visible from 1 to True.
583    
584            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
585            parameter.
586    
587            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
588            parameter.
589    
590            * test/test_load.py: Add new test data contents_test_visible.
591            (LoadSessionTest.setUp): save test data.
592            (LoadSessionTest.testLayerVisibility): Test if the visible flag
593            is loaded correctly.
594    
595            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
596            for saving an invisible layer.
597    
598    2003-04-29  Jonathan Coles   <[email protected]>
599    
600            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
601            legend dialog box and tell it to change its map to the one
602            supplied to SetMap(). Fixes RTbug #1770.
603    
604    2003-04-29  Bernhard Herzog  <[email protected]>
605    
606            Next step of table implementation. Introduce a transient database
607            using SQLite that some of the data is copied to on demand. This
608            allows us to do joins and other operations that require an index
609            for good performance with reasonable efficiency. Thuban now needs
610            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
611            haven't tested that.
612            
613            * Thuban/Model/transientdb.py: New. Transient database
614            implementation.
615    
616            * test/test_transientdb.py: New. Tests for the transient DB
617            classes.
618    
619            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
620            classes to help automatically remove temporary files and
621            directories.
622            (Session.__init__): New instance variables temp_dir for the
623            temporary directory and transient_db for the SQLite database
624            (Session.temp_directory): New. Create a temporary directory if not
625            yet done and return its name. Use AutoRemoveDir to have it
626            automatically deleted
627            (Session.TransientDB): Instantiate the transient database if not
628            done yet and return it.
629    
630            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
631            AutoTransientTable so that data is copied to the transient DB on
632            demand.
633            (SimpleStore): New class that simply combines a table and a
634            shapefile
635    
636            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
637            DBFTable and update its doc-string to reflect the fact that this
638            is only the table interface to a DBF file. Table is now an alias
639            for DBFTable for temporary backwards compatibility.
640    
641            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
642            the last reference to the session goes away so that the temporary
643            files are removed properly.
644    
645            * test/test_load.py (LoadSessionTest.tearDown): Remove the
646            reference to the session to make sure the temporary files are
647            removed.
648    
649    2003-04-29  Bernhard Herzog  <[email protected]>
650    
651            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
652            the __parser instance variable into a normal local variable in
653            read. It's only used there and read will never be called more than
654            once. Plus it introduces a reference cycle that keeps can keep the
655            session object alive for a long time.
656    
657    2003-04-29  Jonathan Coles   <[email protected]>
658    
659            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
660            Projection an immutable item. Fixes RTbug #1825.
661            (Projection.__init__): Initialize instance variables here.
662            (ProjFile.Replace): New. Replace the given projection object with
663            the new projection object. This solves the problem of needing the
664            mutator Projection.SetProjection() in the ProjFrame class and
665            allows a projection to change parameters without changing its
666            location in the file.
667    
668            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
669            be of type wxSAVE and should verify overwriting a file.
670    
671            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
672            ProjFile.Replace() method instead of the mutator
673            Projection.SetProjection(). Also requires that we reassign the
674            client data to the new projection.
675    
676            * test/test_proj.py (TestProjection.test): Test GetName() and
677            GetAllParameters()
678            (TestProjFile.test): Remove tests for Set*() methods. Add tests
679            for Replace().
680    
681    2003-04-25  Jonathan Coles   <[email protected]>
682    
683            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
684            to save the name of the projection.
685    
686            * test/test_save.py (SaveSessionTest.testLayerProjection): New
687            test to verify layer projections are saved correctly.
688    
689    2003-04-25  Jonathan Coles   <[email protected]>
690    
691            * Thuban/Model/proj.py (Projection.SetName): Set the name
692            to "Unknown" if name is None.
693            (Projection.SetAllParameters): New. Set the projection's
694            parameter list to the one supplied.
695            (Projection.SetProjection): New. Set the projection's
696            properties to those of the supplied Projection.
697    
698            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
699            the dialog title to include the map's title.
700            (MainWindow.LayerProjection): Set the dialog title to include
701            the layer's title.
702    
703            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
704            error dialogs into a single method call.
705            (ProjFrame.__VerifyButtons): Add more states to check.
706            (ProjFrame.__GetProjection): Return the current state of an
707            edited projection or None.
708            (ProjFrame.__FillAvailList): Remove checks for states that
709            shouldn't exist.
710            (ProjFrame._OnNew): Clear all selected items and supply
711            a projection panel if necessary.
712    
713            * test/test_proj.py (TestProjFile.test): Add tests for
714            ProjFile.SetAllParameters, ProjFile.SetProjection,
715            ProjFile.SetName.
716    
717    2003-04-25  Jonathan Coles   <[email protected]>
718    
719            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
720            takes an optional argument to select the current projection.
721            This does not guarantee that the item is visible due to
722            limited wxWindows functionality. Fixes RTBug #1821.
723    
724    2003-04-25  Jonathan Coles   <[email protected]>
725    
726            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
727            the projection name and use it when constructing the Projection
728            object.
729    
730            * Thuban/Model/proj.py (Projection.__init__): Change the default
731            value for 'name' to None and then test if name is equal to None
732            in the body of the constructor. This way the caller doesn't have to
733            know what the default value should be. Namely, useful in load.py
734            where we have to pick a default value if the 'name' parameter
735            doesn't exist in the XML file.
736    
737            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
738            Tests a file where a layer has a projection.
739    
740    2003-04-25  Jonathan Coles   <[email protected]>
741    
742            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
743            tree for projection information.
744    
745            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
746            XMLReader.GetFileName.
747            (SessionLoader): Added support for loading projection tags that
748            appear inside a layer.
749    
750            * Thuban/Model/proj.py (ProjFile): Document the class. Move
751            back to using a list because the order of the projections in
752            the file is important to maintain. Fixes RTbug #1817.
753    
754            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
755            to ProjFile.GetFilename.
756    
757            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
758            information.
759    
760            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
761            ProjFrame._OnSaveAs. Removed old dead code from previous
762            implementation.
763            (ProjFrame._OnExport): Add support for exporting more than one
764            projection to a single file.
765            (ProjFrame.__FillAvailList): use string formatting (% operator)
766            to build strings that are (partly) translated. Fixes RTbug #1818.
767    
768            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
769            class.
770    
771    2003-04-24  Bernhard Herzog  <[email protected]>
772    
773            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
774    
775            * po/fr.po: New. French translation by Daniel Calvelo Aros
776    
777            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
778            empty strings.
779    
780    2003-04-24  Jonathan Coles   <[email protected]>
781    
782            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
783            implement the interface that the ProjFrame dialog expects.
784    
785            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
786            name of the projection to be changed.
787            (ProjFile): Use a dictionary instead of a list so that removing
788            projections is easier and we are sure about uniqueness.
789            (ProjFile.Remove): Remove the given projection object.
790    
791            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
792            Return a list with only one projection file instead of searching for
793            any projection file. This simplifies many things if the user can
794            only have one system file and one user file.
795    
796            * Thuban/UI/classgen.py: Change all references to
797            genCombo to genChoice.
798    
799            * Thuban/UI/mainwindow.py: Add a Projection option under the
800            layer menu.
801            (MainWindow.LayerProjection): New. Open up a projection window
802            for a layer.
803    
804            * Thuban/UI/projdialog.py: Large changes to how the dialog is
805            laid out. Use three panels instead of one. One for the list of
806            projections, one for the edit controls, and one for the buttons.
807            Fixed resizing problems so that the dialog resizes correctly
808            when the projection panel changes. Added import/export, save, and
809            new buttons/functionality.
810    
811    2003-04-24  Bernhard Herzog  <[email protected]>
812    
813            First step towards table management. Introduce a simple data
814            abstraction so that we replace the data a layer uses more easily
815            in the next step.
816    
817            * Thuban/Model/data.py: New file with a simple data abstraction
818            that bundles shapefile and dbffile into one object.
819    
820            * Thuban/Model/session.py (Session.OpenShapefile): New method to
821            open shapefiles and return a shape store object
822    
823            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
824            object instead of a shapefile filename. This introduces a new
825            instance variable store holding the datastore. For intermediate
826            backwards compatibility keep the old instance variables.
827            (open_shapefile): Removed. No longer needed with the shape store.
828            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
829            get the shape store used by a layer.
830            (Layer.Destroy): No need to explicitly destroy the shapefile or
831            table anymore.
832    
833            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
834            (MainWindow.AddLayer): Use the session's OpenShapefile method to
835            open shapefiles
836    
837            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
838            session's OpenShapefile method to open shapefiles
839    
840            * test/test_classification.py
841            (TestClassification.test_classification): Use the session's
842            OpenShapefile method to open shapefiles and build the filename in
843            a more platform independed way
844    
845            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
846            Implement to have a session to use in the tests
847            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
848            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
849            session's OpenShapefile method to open shapefiles
850            (TestLayerLegend.setUp): Instantiate a session so that we can use
851            it to open shapefiles.
852            (TestLayerLegend.tearDown): Make sure that all references to
853            layers and session are removed otherwise we may get a resource
854            leak
855    
856            * test/test_map.py (TestMapAddLayer.test_add_layer)
857            (TestMapWithContents.setUp): Instantiate a session so that we can
858            use it to open shapefiles.
859            (TestMapWithContents.tearDown): Make sure that all references to
860            layers, maps and sessions are removed otherwise we may get a
861            resource leak
862            ("__main__"): use support.run_tests() so that more info about
863            uncollected garbage is printed
864    
865            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
866            session's OpenShapefile method to open shapefiles
867            ("__main__"): use support.run_tests() so that more info about
868            uncollected garbage is printed
869    
870            * test/test_selection.py (TestSelection.tearDown): Make sure that
871            all references to the session and the selection are removed
872            otherwise we may get a resource leak
873            (TestSelection.get_layer): Instantiate a session so that we can
874            use it to open shapefiles.
875            ("__main__"): use support.run_tests() so that more info about
876            uncollected garbage is printed
877    
878            * test/test_session.py (TestSessionBase.tearDown)
879            (TestSessionWithContent.tearDown): Make sure that all references
880            to the session and layers are removed otherwise we may get a
881            resource leak
882            (TestSessionWithContent.setUp): Use the session's OpenShapefile
883            method to open shapefiles
884    
885    2003-04-24  Jonathan Coles   <[email protected]>
886    
887            * Thuban/Model/load.py (XMLReader.read): Should have been checking
888            if the file_or_filename object had the 'read' attribute.
889    
890    2003-04-23  Jonathan Coles   <[email protected]>
891    
892            * Thuban/Model/resource.py: Fixes RTbug #1813.
893            (ReadProjFile): Add documentation about which exceptions are raised.
894            Always pass the exceptions up to the caller.
895            (GetProjFiles): If the directory can't be read return an empty list.
896            If any of the proj files can't be read skip that file and go
897            on to the next one.
898    
899            * test/test_proj.py: Added test cases to handle nonexistent files,
900            unreadable files, and files that don't parse correctly.
901    
902    2003-04-23  Jonathan Coles   <[email protected]>
903    
904            Projection dialog. Allows the user to select from a list
905            of projection templates and optionally edit them and save new ones.
906    
907            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
908            (ProjPanel): Base class for projection specific panels.
909            (TMPanel): Projection panel for Transverse Mercartor.
910            (UTMPanel): Projection panel for Universal Transverse Mercartor.
911            (LCCPanel): Projection panel for Lambert Conic Conformal.
912            (GeoPanel): Projetion panel for Geographic Projection.
913    
914    2003-04-23  Jonathan Coles   <[email protected]>
915    
916            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
917            promote symmetry. There now exists XMLReader and XMLWriter.
918            (XMLReader.read): New. Call to read the given file descriptor or
919            filename.
920            (XMLReader.close): New. Make sure the file is closed.
921            (XMLReader.GetFileName): New. Return just the file name that is being
922            read from.
923            (XMLReader.GetDirectory): New. Return just the directory of the file
924            that is being read.
925            (XMLReader.AddDispatchers): New. Take a dictionary which contains
926            the names of functions to call as the XML tree is parsed.
927            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
928            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
929            (SessionLoader): Removed class variables start_dispatcher and
930            end_dispatcher since this functionality is now part of a class
931            instance. Fixes RTbug #1808.
932            (SessionLoader.__init__): Add dispatcher functions.
933            (load_xmlfile): Code was moved into the XMLReader.read().
934            (load_session): Use modified SessionLoader.
935    
936            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
937            map's projection.
938    
939            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
940            GetAllParameters.
941            (Projection.GetParameter): Returns the value for the given parameter.
942    
943            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
944            (GetProjFiles): Renamed from GetProjections. Now returns a list
945            of ProjFile objects.
946            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
947            a list of ProjFile objects whose files are not user defined.
948            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
949            list of ProjFile objects whose files are user defined.
950            (ProjFileReader): Extend new XMLReader.
951    
952            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
953            promote symmetry.
954    
955            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
956            control instead of a wxComboBox. wxChoice controls do not generate
957            events as the uses highlights possible choices which fixes problems
958            with resizing the dialog when the use selects an option.
959    
960            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
961            control instead of a wxComboBox.
962    
963            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
964            dialog.
965    
966            * test/test_proj.py (TestProjection.test): New tests for GetParameter
967            method.
968    
969    2003-04-22  Bernhard Herzog  <[email protected]>
970    
971            * Thuban/UI/mainwindow.py: Remove some unused imports and global
972            constants
973    
974            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
975            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
976    
977    2003-04-17  Bernhard Herzog  <[email protected]>
978    
979            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
980            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
981            anymore.
982            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
983            (Layer.ShapeType, Layer.Shape): No need to call
984            self.open_shapefile since it's always called in __init__
985    
986            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
987            In wxPython 2.4 there's no need to extend MainLoop anymore since
988            wxPython itself makes sure OnExit is called.
989    
990    2003-04-16  Jonathan Coles   <[email protected]>
991    
992            Initial putback of projection management code. Includes new
993            classes to read and write projection files. The current load
994            and save classes were abstracted a bit so they could be reused.
995            The Projection class was extended to provide new methods and
996            have a name.
997    
998            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
999            general XML reading methods that were part of ProcessSession.
1000    
1001            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1002            name.
1003            (ProjFile): New. Represents a file that contains projection
1004            information.
1005    
1006            * Thuban/Model/resource.py: New. Contains general utilities
1007            for read and writing projection files.
1008    
1009            * Thuban/Model/save.py (XMLSaver): New. Contains all the
1010            general XML writing methods that were part of SessionSaver.
1011            (SessionSaver): Renamed from Saver.
1012    
1013            * test/test_proj.py: New test cases for the projection
1014            file read and write functions.
1015    
1016    2003-04-16  Jonathan Coles   <[email protected]>
1017    
1018            * Thuban/Model/classification.py: Use repr() around values
1019            in the ClassGroup*.__repr__() methods so it is clearer when
1020            a value is a string and when it is a number.
1021    
1022            * test/test_load.py: Rework the classification test to test
1023            that we can load old files.
1024            (testLabels): Test a file where the groups have labels.
1025    
1026    2003-04-16  Bernhard Herzog  <[email protected]>
1027    
1028            Safer implementation of the performance enhancements of the
1029            low-level renderer:
1030            
1031            * extensions/thuban/wxproj.cpp (extract_projection)
1032            (extract_pointer): Rename extract_projection to extract_pointer
1033            and redefine its purpose to return the pointer stored in a CObject
1034            returned by the object's cobject method. Update all callers.
1035            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1036            handling of these low-level parameters so that each s_draw_info
1037            instance is handled as a CObject at python level that also
1038            contains real references to the actual python objects which
1039            contain the values in the struct. Add free_draw_info as the
1040            destructor.
1041            (draw_polygon_shape): Add the py_draw_info parameter which must a
1042            cobject containing an s_draw_info pointer.
1043    
1044            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1045            method to instantiat the low-level render parameter
1046            (MapRenderer.draw_shape_layer): Use the new method. Remove some
1047            commented out code.
1048            (MapRenderer.draw_polygon_shape): Make the first parameter not the
1049            layer but the low-level render parameter
1050            (ScreenRenderer.draw_shape_layer): Use the low-level render
1051            parameter.
1052    
1053    2003-04-15  Jonathan Coles   <[email protected]>
1054    
1055            * Thuban/Model/classification.py: Implemented __repr__ for
1056            the ClassGroup* classes to make debugging a bit easier.
1057            (ClassGroup.SetLabel): Check that the string is an instance
1058            of StringTypes not StringType. Accounts for Unicode strings.
1059    
1060            * Thuban/Model/color.py: Implemented __repr__ to make
1061            debugging a bit easier.
1062    
1063            * Thuban/Model/save.py (Saver.write_classification): Need to
1064            save the group label.
1065    
1066            * test/test_load.py (testClassification): New. Loads the
1067            iceland_sample_test.thuban file and checks if it was loaded
1068            correctly.
1069    
1070    2003-04-15  Jonathan Coles   <[email protected]>
1071    
1072            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1073            to improve rendering performance by initializing the variables
1074            that are not change each time draw_polygon_shape() is called.
1075            The values are stored in a global struct draw_info.
1076            (draw_polygon_shape): Removed initialization code that is
1077            now in draw_polygon_init().
1078    
1079            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1080            drawing initialization call to draw_polygon_init()
1081            (MapRenderer.draw_polygon_shape): Use new signature of
1082            draw_polygon_shape.
1083    
1084            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1085            weirdness by setting the range to (1, maxint).
1086    
1087            * Thuban/Model/classification.py (ClassGroupProperties): Make
1088            instance variables private and optimize comparison operator
1089            by first checking if the color references are the same.
1090            (ClassGroupSingleton): Make instance variables private.
1091            (ClassGroupRange): Make instance variables private.
1092    
1093            * HOWTO-Release: Filled in missing steps for releasing packages.
1094    
1095    2003-04-15  Bernhard Herzog  <[email protected]>
1096    
1097            First stab at internationalized messages:
1098    
1099            * Thuban/__init__.py (_): Implement the translation function for
1100            real using the python gettext module.
1101    
1102            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1103            translate empty strings.
1104    
1105            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1106            Add a missing space to a warning message
1107    
1108            * po/README: New. Notes about the management of the translation
1109            files.
1110    
1111            * po/Makefile: New. Makefile to help manage the translation files.
1112    
1113            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1114    
1115            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1116            translations and support files in po/
1117    
1118            * setup.py (data_files): Add the *.mo files to the data_files too
1119    
1120            * README: Add note about the translations when building from CVS
1121    
1122    2003-04-14  Jonathan Coles   <[email protected]>
1123    
1124            * Thuban/UI/dock.py: Fixes some window resizing problems most
1125            noticable under windows. Always assume the button bitmaps will
1126            be there. Code clean up.
1127            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1128            images for the dock/undock button to the same images.
1129            Work around for RTbug #1801.
1130    
1131            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1132            be allowed to grow within the sizer. Fixes a bug under Windows
1133            where the toolbar wasn't being drawn.
1134    
1135    2003-04-14  Frank Koormann   <[email protected]>
1136    
1137            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1138            Updated design to try to make the button functionality more
1139            transparent.
1140    
1141    2003-04-14  Jonathan Coles   <[email protected]>
1142    
1143            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1144            finalize the intialization of the panel.
1145    
1146            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1147            creation of the panel. Should be the last thing called in the
1148            initializer of a subclass.
1149    
1150            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1151            set the current selections in the combo boxes. This is needed
1152            under Windows.
1153    
1154            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1155            level panel to the dialog so that the background colors are
1156            consistent under Windows.
1157    
1158    2003-04-11  Jonathan Coles   <[email protected]>
1159    
1160            * Thuban/UI/classgen.py: Change color ramps to start at white
1161            not black.
1162    
1163            * Thuban/UI/legend.py: Enable/disable the legend buttons when
1164            the legend changes. Fixes RTbug #1793.
1165    
1166            * test/test_classification.py: Added test for copying of
1167            classifications.
1168    
1169    2003-04-11  Jonathan Coles   <[email protected]>
1170    
1171            * Thuban/UI/resource.py: New. Centralize the loading of resources
1172            such as bitmaps.
1173    
1174            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1175            added images to the move buttons, added 'reverse' button.
1176            (CustomRampPanel.__init__): Added images to the move buttons.
1177            (GreyRamp): New. Generates a ramp from white to black.
1178            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1179    
1180            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1181            ID_PROPERTY_*.
1182            (Classifier.__init__): Minor changes to the layout.
1183            (Classifier._OnTitleChanged): Listen for when the user edits the
1184            title and update the dialog's title and the layer's title.
1185    
1186            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1187    
1188            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1189            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1190            if the layer's title changes.
1191    
1192            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1193            to open a dialog to rename the map.
1194            (MainWindow): Use new resource class to import bitmaps.
1195    
1196    2003-04-11  Jonathan Coles   <[email protected]>
1197    
1198            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1199            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1200            Resources/Bitmaps/group_use_none.xpm,
1201            Resources/Bitmaps/group_use_not.xpm,
1202            Resources/Bitmaps/hide_layer.xpm,
1203            Resources/Bitmaps/layer_properties.xpm,
1204            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1205            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1206            New.
1207    
1208    2003-04-10  Jonathan Coles   <[email protected]>
1209    
1210            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1211            Should pass group to ClassGroup constructor.
1212    
1213    2003-04-10  Jonathan Coles   <[email protected]>
1214    
1215            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1216            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1217            here. Implement SetVisible(), IsVisible().
1218            (ClassGroup.__init__): Add group parameter which acts as a copy
1219            constructor.
1220    
1221            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1222            "Visible" check boxes.
1223            (Classifier): Rename the buttons and refactor the code to match
1224            the new labels.
1225    
1226            * Thuban/UI/legend.py: Classify button is now called "Properties".
1227            Refactored the code to change variable names.
1228            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1229    
1230            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1231            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1232            renamed to MainWindow.LayerEditProperties.
1233            (MainWindow.ToggleLegend): Don't include map name in legend title.
1234            (MainWindow.SetMap): Added the map name to the window title.
1235            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1236            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1237            Functionality is found in the layer properties dialog.
1238    
1239            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1240            draw visible groups.
1241    
1242    2003-04-09  Jonathan Coles   <[email protected]>
1243    
1244            * Thuban/UI/classgen.py: Modifications to allow simple
1245            addition and selection of new color schemes.
1246            (MonochromaticRamp): New. Generates a ramp between two colors.
1247            (RedRamp): New. Generates a ramp of all red.
1248            (GreenRamp): New. Generates a ramp of all green.
1249            (BlueRamp): New. Generates a ramp of all blue.
1250    
1251    2003-04-09  Jonathan Coles   <[email protected]>
1252    
1253            * Thuban/Model/classification.py (Classification.__deepcopy__):
1254            Need to copy over field and fieldType attributes.
1255    
1256            * Thuban/Model/table.py (Table.field_range): New. Retrive the
1257            maximum and minimum values over the entire table for a given
1258            field.
1259            (Table.GetUniqueValues): New. Retrieve all the unique values
1260            in the table for a given field.
1261    
1262            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1263            (GenUniquePanel): New. Controls to allow the user to select
1264            which unique field values they would like in the classification.
1265            (CustomRampPanel): Code that was in ClassGenDialog that allows
1266            the user to select the properties for a custom ramp.
1267            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1268    
1269            * Thuban/UI/classifier.py: Removed a lot of debugging code.
1270            (Classifier._SetClassification): Callback method so that the
1271            class generator can set the classification in the grid.
1272            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1273            editing of a group properties class into a wxWindows control.
1274    
1275            * Thuban/UI/dock.py: It was decided that if the user closes
1276            a dockable window the window should simply hide itself. That
1277            way if the user wants to show the dock again it appears in the
1278            same place as it was when it was closed.
1279            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1280            (DockableWindow._OnButtonClose): Hide the window instead of
1281            destroying it.
1282            (DockableWindow._OnClose): Hide the window instead of
1283            destroying it.
1284    
1285            * Thuban/UI/legend.py (LegendTree): Use a private method to
1286            consistently set the font and style of the text. Fixes RTbug #1786.
1287    
1288            * Thuban/UI/mainwindow.py: Import just the Classifier class.
1289    
1290    2003-04-07  Bernhard Herzog  <[email protected]>
1291    
1292            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1293            to the map module
1294    
1295    2003-04-07  Bernhard Herzog  <[email protected]>
1296    
1297            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1298            favor of ToggleSessionTree
1299            (MainWindow.ToggleSessionTree): New method to toggle visibility of
1300            the session tree.
1301            (MainWindow.SessionTreeShown): New method to return whether the
1302            session tree is currently shown.
1303            (MainWindow.ToggleLegend): New method to toggle visibility of the
1304            legend
1305            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1306            LegendShown
1307            (MainWindow.LegendShown): New method to return whether the legend
1308            is currently shown.
1309            (_method_command): Add checked parameter so we can define check
1310            menu items
1311            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1312            mainwindow methods.
1313            (show_session_tree, show_legend commands): Removed.
1314            (toggle_session_tree, toggle_legend commands): New commands to
1315            toggle the visibility of the dialogs
1316    
1317    2003-04-07  Jonathan Coles   <[email protected]>
1318    
1319            * Thuban/UI/classgen.py: Fix Windows problem.
1320    
1321            * Thuban/UI/dock.py: Fix Windows problem.
1322    
1323            * Thuban/UI/mainwindow.py: Use False instead of false.
1324            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1325    
1326    2003-04-07  Jonathan Coles   <[email protected]>
1327    
1328            Since we now say that the order of the groups in a classification
1329            matters, it makes sense to be able to manipulate that order. Most
1330            of the changes to Thuban/Model/classification.py are to that end.
1331    
1332            * Thuban/Model/classification.py (Classification.AppendGroup,
1333            Classification.InsertGroup, Classification.ReplaceGroup,
1334            Classification.RemoveGroup, Classification.GetGroup): Do as the
1335            names imply.
1336            (Classification.FindGroup): This was called GetGroup, but GetGroup
1337            takes an index, while FindGroup takes a value.
1338            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1339            REFERENCE. Currently there is a cyclic reference between the layer
1340            and its classification. If the classification doesn't need to know
1341            its owning layer we can change this, since it may make sense to be
1342            able to use the same classification with different layers.
1343    
1344            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1345    
1346            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1347            not AddGroup()
1348    
1349            * Thuban/UI/classifier.py: Now that we can depend on the order in
1350            a Classification and have methods to manipulate that order we don't
1351            need to use our own data structures in the grid. We can simply make
1352            the grid/table access the information they need from a copy of
1353            the classification object.
1354            (Classifier._OnCloseBtn): Event handler for when the user clicks
1355            'Close'. This is needed so if the user applies changes and then
1356            continues to change the table the user has the option of discarding
1357            the most recent changes and keeping what they applied.
1358    
1359            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1360            into the same group.
1361    
1362            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1363            with a really old version of proj, PJ_VERSION won't even be defined.
1364            If it isn't defined then just compile so that the function always
1365            returns Py_False.
1366    
1367            * test/test_classification.py: Fix tests to use the renamed methods.
1368            Still need to write tests for the new methods.
1369    
1370    2003-04-04  Jonathan Coles   <[email protected]>
1371    
1372            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1373            call to SetSelection out of the method and before the call
1374            to __SelectField in __init__. This prevents a recursion of events
1375            when _OnFieldSelect is triggered by the user.
1376    
1377    2003-04-04  Jonathan Coles   <[email protected]>
1378    
1379            * Thuban/Model/classification.py: Rename Color.None to
1380            Color.Transparent.
1381            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1382            Don't bother copying the color, since Colors are immutable.
1383    
1384            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1385            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1386            Thuban/UI/renderer.py, Thuban/UI/view.py:
1387            Rename Color.None to Color.Transparent.
1388        
1389            * test/test_classification.py, test/test_load.py: Rename Color.None
1390            to Color.Transparent.
1391    
1392    2003-04-04  Jonathan Coles   <[email protected]>
1393    
1394            * Thuban/Model/classification.py: Fix assert calls.
1395            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1396            Copy the color parameter rather than hold onto a reference.
1397    
1398            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1399            the color object.
1400            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1401            are sure there exists only one refernce to Color.None in the system.
1402            This allows us to use 'is' rather than the comparision functions.
1403            
1404            * Thuban/Model/save.py: Fix assert calls.
1405            
1406            * Thuban/UI/classifier.py: Fix assert calls.
1407            (ClassGrid._OnCellDClick): Call up to the classifier to open the
1408            dialog to edit the groups properties.
1409            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1410            correctly if a cell is resized.
1411            (ClassTable.SetClassification): New. Changes the classification
1412            that is in the table.
1413            (ClassTable.__SetRow): Allow groups to be prepended.
1414            (Classifier): New code for opening the EditProperties and
1415            GenerateRanges dialogs.
1416            (SelectPropertiesDialog.__GetColor): Only set the color in the
1417            color dialog if the current color is not None.
1418            
1419            * Thuban/UI/dock.py: Fix assert calls.
1420            
1421            * Thuban/UI/legend.py: Fix assert calls.
1422            
1423            * Thuban/UI/renderer.py: Fix assert calls.
1424            
1425            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1426            classifications.
1427            (GenRangePanel): Panel specific to range generation.
1428            (GenSingletonPanel): Panel specific to singleton generation.
1429            (ClassGenerator): Class responsible for actually generating
1430            the classification from the data gathered in the dialog box.
1431            (PropertyRamp): Generates properties whose values range from
1432            a starting property to an ending property.
1433    
1434    2003-04-03  Bernhard Herzog  <[email protected]>
1435    
1436            * test/support.py (print_garbage_information): New function that
1437            prints information about still connected messages and memory
1438            leaks.
1439            (run_suite): Removed.
1440            (run_tests): New function for use as a replacement of
1441            unittest.main in the test_* files. This one calls
1442            print_garbage_information at the end.
1443    
1444            * test/runtests.py (main): Use support.print_garbage_information
1445    
1446            * test/test_layer.py: Use support.run_tests instead of
1447            unittest.main so we get memory leak information
1448            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1449            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1450            (TestLayerLegend.test_visibility): Call the layer's Destroy method
1451            to fix a memory leak.
1452    
1453            * test/test_classification.py: Use support.run_tests instead of
1454            unittest.main so we get memory leak information
1455            (TestClassification.test_classification): Call the layer's Destroy
1456            method to fix a memory leak.
1457    
1458  2003-04-02  Bernhard Herzog  <[email protected]>  2003-04-02  Bernhard Herzog  <[email protected]>
1459    
1460          * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):          * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):

Legend:
Removed from v.595  
changed lines
  Added in v.899

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26