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

Legend:
Removed from v.586  
changed lines
  Added in v.1024

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26