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

Legend:
Removed from v.608  
changed lines
  Added in v.992

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26