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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26