/[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 235 by bh, Tue Jul 23 10:56:29 2002 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]>
1784    
1785            * Thuban/Model/classification.py: Rename Color.None to
1786            Color.Transparent.
1787            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1788            Don't bother copying the color, since Colors are immutable.
1789    
1790            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1791            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1792            Thuban/UI/renderer.py, Thuban/UI/view.py:
1793            Rename Color.None to Color.Transparent.
1794        
1795            * test/test_classification.py, test/test_load.py: Rename Color.None
1796            to Color.Transparent.
1797    
1798    2003-04-04  Jonathan Coles   <[email protected]>
1799    
1800            * Thuban/Model/classification.py: Fix assert calls.
1801            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1802            Copy the color parameter rather than hold onto a reference.
1803    
1804            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1805            the color object.
1806            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1807            are sure there exists only one refernce to Color.None in the system.
1808            This allows us to use 'is' rather than the comparision functions.
1809            
1810            * Thuban/Model/save.py: Fix assert calls.
1811            
1812            * Thuban/UI/classifier.py: Fix assert calls.
1813            (ClassGrid._OnCellDClick): Call up to the classifier to open the
1814            dialog to edit the groups properties.
1815            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1816            correctly if a cell is resized.
1817            (ClassTable.SetClassification): New. Changes the classification
1818            that is in the table.
1819            (ClassTable.__SetRow): Allow groups to be prepended.
1820            (Classifier): New code for opening the EditProperties and
1821            GenerateRanges dialogs.
1822            (SelectPropertiesDialog.__GetColor): Only set the color in the
1823            color dialog if the current color is not None.
1824            
1825            * Thuban/UI/dock.py: Fix assert calls.
1826            
1827            * Thuban/UI/legend.py: Fix assert calls.
1828            
1829            * Thuban/UI/renderer.py: Fix assert calls.
1830            
1831            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1832            classifications.
1833            (GenRangePanel): Panel specific to range generation.
1834            (GenSingletonPanel): Panel specific to singleton generation.
1835            (ClassGenerator): Class responsible for actually generating
1836            the classification from the data gathered in the dialog box.
1837            (PropertyRamp): Generates properties whose values range from
1838            a starting property to an ending property.
1839    
1840    2003-04-03  Bernhard Herzog  <[email protected]>
1841    
1842            * test/support.py (print_garbage_information): New function that
1843            prints information about still connected messages and memory
1844            leaks.
1845            (run_suite): Removed.
1846            (run_tests): New function for use as a replacement of
1847            unittest.main in the test_* files. This one calls
1848            print_garbage_information at the end.
1849    
1850            * test/runtests.py (main): Use support.print_garbage_information
1851    
1852            * test/test_layer.py: Use support.run_tests instead of
1853            unittest.main so we get memory leak information
1854            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1855            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1856            (TestLayerLegend.test_visibility): Call the layer's Destroy method
1857            to fix a memory leak.
1858    
1859            * test/test_classification.py: Use support.run_tests instead of
1860            unittest.main so we get memory leak information
1861            (TestClassification.test_classification): Call the layer's Destroy
1862            method to fix a memory leak.
1863    
1864    2003-04-02  Bernhard Herzog  <[email protected]>
1865    
1866            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1867            Handle the reference counts of the return value and errors in
1868            PyArg_ParseTuple correctly.
1869    
1870            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1871            sure the filename is absolute to avoid problems when saving the
1872            session again
1873    
1874            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1875    
1876    2003-04-01  Jonathan Coles   <[email protected]>
1877    
1878            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1879            that there actually are points in the returned list of points
1880            before trying to index into the list. The list may be empty if
1881            the shape is a Null Shape.
1882    
1883    2003-04-01  Bernhard Herzog  <[email protected]>
1884    
1885            * test/test_map.py: Don't use from <module> import *
1886    
1887    2003-04-01  Jonathan Coles   <[email protected]>
1888    
1889            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1890            LAYER_LEGEND_CHANGED
1891    
1892            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1893            self.Destroy() to close the window after yesterday's changes.
1894    
1895            * test/test_map.py, test/test_session.py: Fix messages that
1896            are sent from maps and layers.
1897    
1898    2003-03-31  Jonathan Coles   <[email protected]>
1899    
1900            * Thuban/UI/classifier.py: Commented out some debugging statements.
1901            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
1902            RTbug #1769.
1903    
1904            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
1905            position (although position doesn't work yet under GTK).
1906            (DockableWindow.Destroy): New. Called when the window must be
1907            closed. Namely needed when the DockFrame closes and must close
1908            its children.
1909            (DockFrame): Listen for EVT_CLOSE and destroy all children.
1910    
1911            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
1912            when then window is told to close.
1913            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
1914            comment in source for more info.
1915    
1916            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
1917    
1918            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
1919            symmetry with other such methods.
1920            (MainWindow.ShowLegend): Show the legend docked by default.
1921    
1922    2003-03-28  Jonathan Coles   <[email protected]>
1923    
1924            * Thuban/UI/classifier.py: Support for highlighting a specific
1925            group within the grid when the classification dialog is opened.
1926            Also contains a lot of debugging printouts which will later
1927            be removed.
1928    
1929            * Thuban/UI/dock.py: Complete rework on the dock code so that
1930            that it is fairly removed from the rest of the Thuban application.
1931            It is easy to add new docks which the rest of the program having
1932            to be aware of them.
1933    
1934            * Thuban/UI/legend.py: Modifications to support selecting a
1935            specific group in the classification dialog. Changed how layers
1936            are drawn when the layer is visible/invisible.
1937    
1938            * Thuban/UI/mainwindow.py: Removed legend specific code and
1939            replaced it with calls to the new dock code.
1940    
1941            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
1942            to check if scale > 0. Trying to track down a divide by zero.
1943    
1944    2003-03-26  Jonathan Coles   <[email protected]>
1945    
1946            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
1947            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
1948            now part of DockableWindow.
1949            (LegendPanel.DoOnSelChanged): Select the current layer in the
1950            map.
1951            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
1952            with the selected layer and/or group.
1953    
1954    2003-03-26  Jonathan Coles   <[email protected]>
1955    
1956            This putback contains the code for dockable windows. There is
1957            no support in wxWindows as of this date for windows that can
1958            attach themselves to other windows.
1959    
1960            The current model contains a DockableWindow which has a parent
1961            window for when it is detached and a dock window that it puts
1962            its contents in when it is docked. The contents of a DockableWindow
1963            must be a DockPanel. DockPanel itself derives from wxPanel.
1964    
1965            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
1966            message, not a LAYER_LEGEND_CHANGED message.
1967    
1968            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
1969    
1970            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
1971            as one of the style properties for the fieldTypeText item to
1972            be sure that its size is correct when the text changes.
1973    
1974            * Thuban/UI/dock.py: New. Classes for the DockPanel and
1975            DockableWindow.
1976    
1977            * Thuban/UI/legend.py: Added some more buttons and made the
1978            LegendPanel a DockPanel.
1979    
1980            * Thuban/UI/mainwindow.py: Added sash windows to the main window
1981            and supporting functions for manipulating the sashes.
1982            (MainWindow.ShowLegend): Create a DockableWindow with the
1983            LegendPanel as the contents.
1984    
1985            * Thuban/UI/messages.py: Added DOCKABLE_* messages
1986    
1987            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
1988            not LAYER_LEGEND_CHANGED, messages.
1989    
1990    2003-03-25  Jonathan Coles   <[email protected]>
1991    
1992            * setup.py: Added custom script bdist_rpm_build_script so that
1993            when the rpm is built the path to wx-config is correct.
1994    
1995            * setup.cfg: Added line saying to use the custom build script
1996    
1997    2003-03-20  Jonathan Coles   <[email protected]>
1998    
1999            Initial implementation of the Legend.
2000    
2001            * Thuban/UI/legend.py: New. Creates a window that shows the map's
2002            Legend information and allows the user to add/modify classifications
2003            and how the layers are drawn on the map.
2004    
2005            * setup.py: New command 'build_docs' which currently uses
2006            happydoc to generate html documentation for Thuban.
2007    
2008            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
2009            Returns a string which is appropriately describes the group.
2010    
2011            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
2012            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
2013    
2014            * Thuban/Model/map.py (Map): Rename messages and use new, more
2015            specific, messages.
2016    
2017            * Thuban/Model/messages.py: New message to indicate that a layer's
2018            data has changed (LAYER_CHANGED). New map messages to indicate
2019            when layers have been added/removed/changed or if the stacking order
2020            of the layers has changed.
2021    
2022            * Thuban/Model/session.py: Rename and use new messages.
2023    
2024            * Thuban/UI/classifier.py: Remember if any changes have actually
2025            been applied so that if the dialog is cancelled without an application
2026            of changes we don't have to set a new classification.
2027            (ClassDataPreviewer): Pulled out the window specific code and put it
2028            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
2029            symbols on any DC.
2030            
2031            * Thuban/UI/mainwindow.py: New code to open the legend.
2032    
2033            * Thuban/UI/view.py: Use new message names.
2034    
2035    2003-03-19  Jonathan Coles   <[email protected]>
2036    
2037            * Thuban/UI/main.py (verify_versions): New. Checks the versions
2038            of Python, wxPython, and some other libraries.
2039    
2040            * extensions/thuban/wxproj.cpp (check_version): Checks the given
2041            version against what wxproj was compiled with.
2042            (check_version_gtk): If wxproj was compiled with gtk then check
2043            the given version against the version of the gtk library
2044            currently being used.
2045    
2046    2003-03-14  Bernhard Herzog  <[email protected]>
2047    
2048            * test/test_command.py: Run the tests when the module is run as a
2049            script
2050    
2051    2003-03-14  Bernhard Herzog  <[email protected]>
2052    
2053            Implement selection of multiple selected shapes in the same layer:
2054    
2055            - Introduce a new class to hold the selection. This basically
2056              replaces the interactor which was nothing more than the
2057              selection anyway. A major difference is of course that the new
2058              selection class supports multiple selected shapes in one layer
2059            
2060            - Move the object that represents the selection from the
2061              application to the canvas. The canvas is a better place than the
2062              application because the selection represents which shapes and
2063              layer of the map displayed by the canvas are selected and
2064              affects how the map is drawn.
2065    
2066            - Make the selection and its messages publicly available through
2067              the mainwindow.
2068    
2069            - The non-modal dialogs do not get a reference to the interactor
2070              anymore as they can simply refer to their parent, the
2071              mainwindow, for the what the interactor had to offer.
2072    
2073            * Thuban/UI/selection.py: New module with a class to represent the
2074            selection.
2075    
2076            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
2077            these unused messages
2078    
2079            * Thuban/UI/application.py (ThubanApplication.OnInit)
2080            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
2081            interactor is gone now.
2082            (ThubanApplication.CreateMainWindow): There is no interactor
2083            anymore so we pass None as the interactor argument for now for
2084            compatibility.
2085    
2086            * Thuban/UI/view.py (MapCanvas.delegated_messages)
2087            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
2088            Unsubscribe, delegate messages according to the delegated_messages
2089            class variable.
2090            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
2091            attributes from instance variables as described with the
2092            delegated_methods class variable.
2093            (MapCanvas.__init__): New instance variable selection holding the
2094            current selection
2095            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
2096            pass them on to the renderer
2097            (MapCanvas.SetMap): Clear the selection when a different map is
2098            selected.
2099            (MapCanvas.shape_selected): Simple force a complete redraw. The
2100            selection class now takes care of only issueing SHAPES_SELECTED
2101            messages when the set of selected shapes actually does change.
2102            (MapCanvas.SelectShapeAt): The selection is now managed in
2103            self.selection
2104    
2105            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
2106            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
2107            Unsubscribe, delegate messages according to the delegated_messages
2108            class variable.
2109            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
2110            attributes from instance variables as described with the
2111            delegated_methods class variable.
2112            (MainWindow.__init__): The interactor as ivar is gone. The
2113            parameter is still there for compatibility. The selection messages
2114            now come from the canvas.
2115            (MainWindow.current_layer, MainWindow.has_selected_layer):
2116            Delegate to the the canvas.
2117            (MainWindow.LayerShowTable, MainWindow.Classify)
2118            (MainWindow.identify_view_on_demand): The dialogs don't need the
2119            interactor parameter anymore.
2120    
2121            * Thuban/UI/tableview.py (TableFrame.__init__)
2122            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
2123            (LayerTableFrame.row_selected): The interactor is gone. It's job
2124            from the dialog's point of view is now done by the mainwindow,
2125            i.e. the parent. Subscribe to SHAPES_SELECTED instead
2126            of SELECTED_SHAPE
2127            
2128            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
2129            is gone. It's job from the dialog's point of view is now done by
2130            the mainwindow, i.e. the parent.
2131            
2132            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
2133            gone. It's job from the dialog's point of view is now done by the
2134            mainwindow, i.e. the parent.
2135    
2136            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
2137            gone. It's job from the dialog's point of view is now done by the
2138            mainwindow, i.e. the parent.
2139            (SessionTreeCtrl.__init__): New parameter mainwindow which is
2140            stored as self.mainwindow. The mainwindow is need so that the tree
2141            can still subscribe to the selection messages.
2142            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
2143            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
2144            selection is now accessible through the mainwindow. Subscribe to
2145            SHAPES_SELECTED instead of SELECTED_SHAPE
2146    
2147            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
2148            SHAPES_SELECTED message now.
2149            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
2150            so deal with multiple shapes
2151            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
2152            gone. It's job from the dialog's point of view is now done by the
2153            mainwindow, i.e. the parent.
2154    
2155            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
2156            parameter is now a list of shape ids.
2157            (RecordTable.SetTable): The second parameter is now a list of
2158            indices.
2159    
2160            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
2161            selected_shape parameter and ivar to selected_shapes. It's now a
2162            list of shape ids.
2163            (MapRenderer.draw_label_layer): Deal with multiple selected
2164            shapes. Rearrange the code a bit so that the setup and shape type
2165            distinctions are only executed once.
2166    
2167            * test/test_selection.py: Test cases for the selection class
2168    
2169    2003-03-11  Jonathan Coles   <[email protected]>
2170    
2171            * Thuban/Model/load.py: Temporary fix so that the xml reader
2172            doesn't cause Thuban to crash.
2173    
2174            * Thuban/Model/layer.py: Handle the cyclic references between
2175            a layer and its classification better, and be sure to disconnect
2176            the classification from the layer when the layer is destroyed
2177            so that we don't maintain a cyclic reference that may not be
2178            garbage collected.
2179    
2180            * Thuban/Model/classification.py: See comment for layer.py.
2181    
2182    2003-03-12  Jan-Oliver Wagner <[email protected]>
2183    
2184            * HOWTO-Release: New. Information on the steps for releasing
2185            a new version of Thuban.
2186    
2187    2003-03-11  Jonathan Coles   <[email protected]>
2188    
2189            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
2190            Use True instead of true.
2191            (Classifier): Should have a single panel in which all the controls lie.
2192    
2193            * Thuban/UI/proj4dialog.py: Add normal border.
2194    
2195            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
2196    
2197            * Thuban/UI/mainwindow.py: Use True instead of true.
2198    
2199            * setup.py: Update some definitions to use wxWindows2.4 files
2200    
2201            * Data/iceland_sample_class.thuban: Fixed file so that the
2202            field_type information is present.
2203    
2204    2003-03-10  Jonathan Coles   <[email protected]>
2205    
2206            * Thuban/UI/classifier.py (Classifier.__init__): Make the
2207            field type label grow so that when the text changes the
2208            size is updated correctly. This may be a wxWindows bug.
2209    
2210    2003-03-10  Jonathan Coles   <[email protected]>
2211    
2212            * Thuban/UI/application.py: Changed SESSION_CHANGED to
2213            SESSION_REPLACED.
2214    
2215            * Thuban/UI/classifier.py: Wrap text with _().
2216            (ClassGrid.CreateTable): Set dimensions and size hints here,
2217            instead of in Reset, so we only set the size once.
2218    
2219            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
2220    
2221            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2222            Call Close() instead of Shutdown().
2223    
2224            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2225    
2226            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2227            Go back to using OnClose() instead of Shutdown().
2228    
2229    2003-03-10  Jonathan Coles   <[email protected]>
2230    
2231            * Thuban/UI/classifier.py (Classifier): SelectField() needed
2232            to know the old field index as well as the new one.
2233    
2234    2003-03-10  Jonathan Coles   <[email protected]>
2235    
2236            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
2237            to correctly set the table information and call this from
2238            __init__ and from _OnFieldSelect so that all the information
2239            is up to date when the dialog opens and when a field is changed.
2240    
2241    2003-03-10  Jonathan Coles   <[email protected]>
2242    
2243            * Thuban/Model/classification.py (Classification): Don't use
2244            layer's message function directly, use the ClassChanged() method
2245            when then classification changes. SetField/SetFieldType/SetLayer
2246            must keep the information about field name and field type in
2247            sync when an owning layer is set or removed.
2248    
2249            * Thuban/Model/layer.py: Added ClassChanged() so that the
2250            classification can tell the layer when its data has changed.
2251            (Layer.SetClassification): Accepts None as an arguement to
2252            remove the current classification and correctly handles
2253            adding a new classification.
2254    
2255            * Thuban/Model/load.py: Comment out print statement
2256    
2257            * test/test_classification.py, test/test_save.py: New and
2258            improved tests.
2259    
2260    2003-03-07  Jonathan Coles   <[email protected]>
2261    
2262            * Thuban/Model/classification.py: Implemented __copy__ and
2263            __deepcopy__ for ClassGroup* and ClassGroupProperites so
2264            they can easily be copied by the classifier dialog.
2265            (ClassGroupProperites.__init__): The default line color should
2266            have been Color.Black.
2267    
2268            * Thuban/UI/classifier.py: Setting and Getting table values now
2269            uses a consistent set of functions.
2270            (Classifier): Now non-modal. Has field type label which changes
2271            as the field changes. Keep track of buttons in a list so that
2272            we can enable/disable the buttons when the None field is selected.
2273            (SelectPropertiesDialog): Add buttons to make the colors transparent.
2274    
2275            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
2276            does what OnClose did, but can be called by the application to
2277            close a window. Needed when a session changes, and we have to
2278            close the classifier windows.
2279    
2280            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2281            Shuts down open dialogs. Used when a new session is created
2282            or a session is opened.
2283            (MainWindow.SaveSession): Should only call application.SaveSession()
2284            if we don't call SaveSessionAs first.
2285            (MainWindow.Classify): Allow different classifier dialogs for
2286            different layers.
2287    
2288            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
2289            the parent class handle it. Add Shutdown() to unsubscibe from
2290            event notification and call the parent Shutdown(). This was
2291            necessary so the application can close the tree window.
2292    
2293    2003-03-06  Jonathan Coles   <[email protected]>
2294    
2295            * Thuban/Model/classification.py: Minor documentation changes,
2296            Addition of __eq__ and __ne__ methods.
2297            (Classification.SetLayer): prevent recursion between this method
2298            and Layer.SetClassification().
2299    
2300            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
2301    
2302            * Thuban/Model/layer.py (SetClassification): prevent recursion
2303            between this method and Classification.SetLayer().
2304    
2305            * test/test_classification.py, test/test_load.py,
2306            test/test_session.py: Fixed and added tests for the classification
2307            classes.
2308    
2309    2003-03-06  Bernhard Herzog  <[email protected]>
2310    
2311            * Thuban/UI/classifier.py (ClassGrid.__init__)
2312            (ClassGrid.CreateTable): Move the SetSelectionMode call to
2313            CreateTable because otherwise it triggers an assertion in
2314            wxPython/wxGTK 2.4.
2315    
2316    2003-03-05  Jonathan Coles   <[email protected]>
2317    
2318            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
2319    
2320            * Thuban/Model/load.py: import FIELDTYPE constants from table.
2321    
2322            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
2323    
2324            * Thuban/Model/table.py: Put FIELDTYPE constants back.
2325    
2326    2003-03-05  Jonathan Coles   <[email protected]>
2327    
2328            * Thuban/UI/classifier.py: Added class documentation.
2329            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
2330            Store just the groups in the table and generate the other
2331            column information when it is requested. Add "None" field
2332            to pull-down to select no classification.
2333    
2334            * Thuban/common.py: Moved FIELDTYPE constants from table.py
2335            (Str2Num): Only catch ValueError exceptions.
2336    
2337            * Thuban/Model/classification.py: Class documentation. Renaming
2338            of methods with Stroke to Line. Groups are stored in a single
2339            list with the default as the first element. Groups are searched
2340            in the order they appear in the list.
2341    
2342            * Thuban/Model/color.py: Documentation.
2343    
2344            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
2345            the kind of data represented by a field.
2346    
2347            * Thuban/Model/load.py (ProcessSession): Use proper string
2348            conversion function; fixes RTbug #1713.
2349    
2350            * Thuban/Model/save.py (Saver): Store field type information.
2351    
2352            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
2353            (Table): Add field_info_by_name() to retrieve field information
2354            by specifying the field name, not the number.
2355    
2356            * Thuban/UI/mainwindow.py: Function name changes.
2357    
2358            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2359            get the layer classification once. Don't try to classify
2360            values when the field is None: just use the default properties.
2361    
2362            * Thuban/UI/view.py: Function name changes.
2363    
2364            * Doc/thuban.dtd: Add field_type attribute to a classification.
2365    
2366    2003-03-04  Bernhard Herzog  <[email protected]>
2367    
2368            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
2369            the fill and stroke layer attributes optional with suitable
2370            default values. Add the stroke_width layer attribute. Use correct
2371            syntax for empty elements. Make the attribute list for labels
2372            refer to the label element.
2373    
2374    2003-03-04  Bernhard Herzog  <[email protected]>
2375    
2376            * setup.py (thuban_build_py.build): Add a comment about distutils in
2377            Python 2.3 containing some of the functionality we implement in
2378            setup.py ourselves.
2379    
2380            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
2381            before the selection mode. Doing it the other way round triggers
2382            an assertion in wxWindows.
2383    
2384            * Thuban/Model/save.py (escape): Fix typo in doc-string
2385    
2386            * Thuban/Model/classification.py: Remove unnecessary wxPython
2387            import
2388    
2389    2003-03-04  Jonathan Coles   <[email protected]>
2390    
2391            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
2392            Parameter 'value' should default to None.
2393    
2394            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
2395            the class attribute __classification is now private.
2396    
2397            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
2398            Classifier to ClassGrid. Added support for removing selected rows,
2399            which including code for keeping track of when cells are selected,
2400            and deselected.
2401            (ClassTable): Support for added/removing rows. Fixed a problem
2402            with __ParseInput whereby it would not allow strings (only numbers)
2403            to be entered.
2404            (Classifier): Added button and supporting code for removing
2405            selected rows.
2406    
2407    2003-02-27  Jonathan Coles   <[email protected]>
2408    
2409            * Thuban/common.py: Moved color conversion functions into
2410            Thuban/UI/common.py.
2411            (Str2Num): Now converts the float (not the string) to a long/int
2412            so that an exception isn't thrown.
2413    
2414            * Thuban/UI/common.py: Common functions used in several UI modules
2415    
2416            * Thuban/Model/classification.py: Changed the class hierarchy
2417            so that a Classification consists of Groups which return
2418            Properties when a value matches a Group.
2419    
2420            * Thuban/Model/layer.py: Fixed name resolution problem.
2421    
2422            * Thuban/Model/load.py: Use new Classification and Group functions.
2423    
2424            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
2425            failure.
2426            (Saver.write_classification): Use new Classification and Group
2427            functions.
2428    
2429            * Thuban/UI/classifier.py: Changes to use new Classification and Group
2430            functions. Fix to create a tuple with a single value instead of
2431            simply returning the value.
2432    
2433            * Thuban/UI/renderer.py: Use new Classification and Group functions.
2434            Use common.py functions.
2435    
2436            * Thuban/UI/tree.py: Use common.py functions.
2437            
2438            * test/test_classification.py: Use new Classification and Group
2439            classes.
2440    
2441    2003-02-24  Jonathan Coles   <[email protected]>
2442    
2443            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
2444            functions from Thuban color objects to wxWindow colour objects.
2445    
2446            * Thuban/Model/classification.py (Classification): Renamed
2447            GetProperties() to GetClassData(). Used the new iterator
2448            in TreeInfo().
2449            (ClassIterator): Iterator implementation to iterate over the
2450            ClassData objects in a classification object.
2451    
2452            * Thuban/Model/save.py (Saver.write_classificaton): Uses
2453            the new iterator to save the classification information.
2454    
2455            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
2456            for changing the stroke and fill colors and previewing the
2457            changes.
2458    
2459            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
2460            MainWindow.SaveSessionAs): Text string changes so the dialogs
2461            have more meaningful titles.
2462    
2463            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
2464            Classification method name from GetProperties to GetClassData.
2465    
2466            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
2467            instead of accessing now non-existent class variables.
2468    
2469    2003-02-24  Bernhard Herzog  <[email protected]>
2470    
2471            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
2472            unneeded Shape() call. Rendering is substantially faster without
2473            it and it avoids some problems with broken shape files.
2474    
2475    2003-02-20  Frank Koormann   <[email protected]>
2476    
2477            Force minimal size of identify and label dialogs. The autosizing
2478            looked too ugly.
2479    
2480            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
2481            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
2482            Set size of listctrl.
2483            * Thuban/UI/identifyview.py (IdentifyView.__init__):
2484            Set size of dialog.
2485    
2486    2003-02-19  Jonathan Coles   <[email protected]>
2487    
2488            * test/test_classification.py, test/test_layer.py,
2489            test/test_load.py, test/test_map.py, test/test_session.py:
2490            Updated the tests to use the new functions that are in the
2491            respective classes.
2492    
2493            * Thuban/Model/classification.py (Classification):
2494            Uses the new ClassData* classes. Modification messages are
2495            passed up to the parent layer (if it exists).
2496            (ClassData): New class to encapsulate the common data in each
2497            classification property.
2498            (ClassDataDefault): Represents the Default class. data.
2499            (ClassDataPoint): Represents a single class. data point
2500            (ClassDataRange): Represents a class. range
2501            (ClassDataMap): Represents a class. map (unused).
2502    
2503            * Thuban/Model/color.py: Added Color.None to represent something
2504            with no color. Color.Black represents the color black.
2505            (NoColor): Helper class derived from Color to represent something
2506            with no color.
2507    
2508            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
2509            stroke_width attributes. Made the 'classification' attribute private.
2510            New methods for setting/getting the classification.
2511    
2512            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
2513            to get the classifcation and use the new ClassData* classes to
2514            hold the classification data. Use Str2Num to convert numbers
2515            properly.
2516    
2517            * Thuban/Model/save.py (Saver): Use new Color and Classification
2518            methods
2519    
2520            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
2521            custom grid.
2522            (ClassTable): Support for editing Values and Labels and for
2523            changing what type (point or range) of data is stored in each
2524            property based on how the user enters the data.
2525            (Classifier): Support for saving the new classifications and
2526            launching the dialog to edit a property.
2527            (SelectPropertiesDialog): New class for editing the visual
2528            properties of a classification (stroke color, width, and fill color)
2529            (ClassPreviewer): Took the Draw method from ClassRenderer and
2530            made most of it into this new class. Intend to use this class in
2531            the SelectPropertiesDialog for previewing changes.
2532    
2533            * Thuban/UI/renderer.py: Use new Color and Classification methods.
2534    
2535            * Thuban/UI/tree.py: Formatting changes.
2536    
2537            * Doc/thuban.dtd: Add 'label' element
2538    
2539            * Thuban/common.py: New. Contains common routines used throughout
2540            the code.
2541            (Str2Num): Takes a string and converts it to the "best" type of
2542            number.
2543    
2544    2003-02-14  Bernhard Herzog  <[email protected]>
2545    
2546            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
2547            dragging flag is always set to 0 even when the tool implementation
2548            raises an exception
2549    
2550    2003-02-11  Bernhard Herzog  <[email protected]>
2551    
2552            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
2553            method to create a splash screen.
2554            (ThubanApplication.ShowMainWindow): New. Show the main window.
2555            Needed so the splash screen can display the mainwindow
2556            (ThubanApplication.OnInit): Call the
2557            new splash_screen method to determine whether the application
2558            should display a splash screen. If it displays a splash screen do
2559            not immediately show the main window.
2560    
2561    2003-02-11  Jonathan Coles  <[email protected]>
2562    
2563            * Thuban/Model/classification.py: Added import line to fix
2564            feature conflicts between running on python2.2 and python2.1.
2565    
2566            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2567            onto the clinfo parameter, so removed the deepcopy().
2568    
2569    2003-02-10  Jonathan Coles  <[email protected]>
2570    
2571            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2572            Added element_open variable to track opening and closing of tags
2573            so that tags that don't span more than one line are closed with
2574            /> instead of </tag_name>. Use the GetDefault*() methods of
2575            the Classification class.
2576    
2577            * Thuban/Model/classification.py (Classificaton): Added set and
2578            get methods for the default data. The class also takes a layer
2579            reference so that modification messages can be sent. Fixed the
2580            methods to use the new ClassData class.
2581            (ClassData): New class to encapsulate the classification data
2582    
2583            * Thuban/Model/layer.py (Layer): Remove the
2584            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2585            SetDefault*() methods on the layer's classification object.
2586            (Layer.__init__): Use the new SetDefault*() methods in the
2587            Classification class.
2588    
2589            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2590            object instead of a dictionary.
2591    
2592            * Thuban/UI/classifier.py (ClassRenderer): New class to
2593            draw the classifications in the dialog box's table.
2594            (Classifier): Modified to use the ClassRenderer class.
2595    
2596            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2597            methods of the Classification class.
2598    
2599            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2600            of the ClassData class.
2601    
2602            * test/test_classification.py, test/test_layer.py,
2603            test/test_map.py, test/test_session.py: Fix the tests to work
2604            with the above code changes.
2605    
2606    2003-02-03  Jonathan Coles  <[email protected]>
2607    
2608            * Thuban/Model/classification.py (Classification): Added getNull()
2609            to return the NullData reference
2610    
2611            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2612            Layer.SetStrokeWidth): Modified these functions to change the
2613            null data in the classification rather than keep these values
2614            directly in the Layer class. Menu options to change these values
2615            work again.
2616    
2617    2003-01-28  Jonathan Coles  <[email protected]>
2618    
2619            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2620            Fixed crashing problem on some systems. Dialog box shows
2621            classification data.
2622    
2623            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2624            Colors in the tree view.
2625    
2626            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2627            the tree info for classifications. Commented out unnecessary lines.
2628    
2629            * Thuban/Model/classification.py (Classification.TreeInfo): New
2630            function to add information about the classification into the
2631            tree view.
2632    
2633    2003-01-27  Jan-Oliver Wagner <[email protected]>
2634    
2635            * Thuban/__init__.py (_): New.
2636    
2637            * Thuban/Model/classification.py, Thuban/Model/extension.py,
2638            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
2639            Thuban/Model/session.py, Thuban/UI/application.py,
2640            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
2641            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
2642            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
2643            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
2644            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
2645    
2646    2003-01-27  Jonathan Coles  <[email protected]>
2647    
2648            * Thuban/Model/layer.py: Classification initialization calls.
2649    
2650            * Thuban/Model/classification.py: Created class to encapsulate
2651            a layer classification. Supports specific data points and
2652            ranges.
2653    
2654            * Thuban/Model/load.py: Added support for loading classification
2655            information.
2656    
2657            * Thuban/Model/save.py: Added support for saving classification
2658            information.
2659    
2660            * Thuban/UI/classifier.py: Initial class for a dialog box for
2661            specifying classification information.
2662    
2663            * Thuban/UI/mainwindows.py: Support for opening the classifier
2664            dialog.
2665    
2666            * Thuban/UI/renderer.py: Support for drawing a layer with the
2667            classification information.
2668    
2669            * Data/iceland_sample_class.thuban: iceland_sample with
2670            classification data.
2671    
2672            * test/test_classification: Tests for the Classification class.
2673    
2674    2002-12-09  Bernhard Herzog  <[email protected]>
2675    
2676            * test/test_command.py: New. Tests for the command classes.
2677    
2678            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
2679            (Command.IsTool): New method to distinguish between command
2680            switching tools and other commands.
2681    
2682            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
2683            the tool to avoid direct assignments to instance variables
2684            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
2685            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
2686            change the tool
2687    
2688            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
2689            active tool's command turns insensitive, disable the tool.
2690            (_tool_command): Use the new ToolCommand class
2691    
2692            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
2693            SelectTool method to change the tool
2694            (iconfile): Use the ToolCommand class
2695    
2696    2002-12-03  Bernhard Herzog  <[email protected]>
2697    
2698            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
2699            the case of selected items that are not children of Layers or Maps
2700            properly. Previously this bug would trigger an assertion in
2701            wxWindows.
2702    
2703    2002-11-06  Frank Koormann  <[email protected]>
2704    
2705            * Thuban/UI/mainwindow.py: Altered the order of tools in the
2706            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
2707            Full Extent).
2708    
2709    2002-10-23  Bernhard Herzog  <[email protected]>
2710    
2711            * setup.py (setup call): version now 0.1.3
2712    
2713            * MANIFEST.in: Add the files in test/
2714    
2715            * test/README: Add note about tests requiring the iceland data
2716    
2717            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
2718            copyright notice.
2719    
2720    2002-10-18  Bernhard Herzog  <[email protected]>
2721    
2722            * test/test_map.py
2723            (TestMapWithContents.test_projected_bounding_box): Use an explicit
2724            epsilon.
2725    
2726            * test/support.py (FloatComparisonMixin.assertFloatEqual)
2727            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
2728            message if the assertion fails and don't return the return value
2729            of self.assert_. In assertFloatSeqEqual the return meant that not
2730            all items of the sequence were compared.
2731    
2732    2002-09-20  Bernhard Herzog  <[email protected]>
2733    
2734            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
2735    
2736            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
2737    
2738            * test/test_map.py (TestMapWithContents.test_tree_info): Create
2739            the string with the bounding box on the fly because of platform
2740            differences in the way %g is handled.
2741    
2742            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
2743            DBFfile too because Thuban layers can't yet cope missing DBF
2744            files.
2745    
2746    2002-09-20  Bernhard Herzog  <[email protected]>
2747    
2748            * test/test_menu.py: Use initthuban instead of
2749            add_thuban_dir_to_path to initialize Thuban.
2750    
2751            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
2752            Mixin class for float comparisons
2753            (SubscriberMixin): New. Mixin class to test messages sent through
2754            the Connector class
2755    
2756            * test/README: Fix a typo and add the -v flag to the command for
2757            individual tests
2758    
2759            * test/test_session.py: New. Test cases for Thuban.Model.session
2760    
2761            * test/test_proj.py: New. Test cases for Thuban.Model.proj
2762    
2763            * test/test_map.py: New. Test cases for Thuban.Model.map
2764    
2765            * test/test_layer.py: New. Test cases for Thuban.Model.layer
2766    
2767            * test/test_label.py: New. Test cases for Thuban.Model.label
2768    
2769            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
2770    
2771            * test/test_color.py: New. Test cases for Thuban.Model.color
2772    
2773            * test/test_base.py: New. Test cases for Thuban.Model.base
2774    
2775    2002-09-13  Bernhard Herzog  <[email protected]>
2776    
2777            * Thuban/Model/session.py (Session.forwarded_channels): Forward
2778            the CHANGED channel too.
2779    
2780            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
2781            CHANGED channel too.
2782            (Map.__init__): Call the Modifiable constructor as well.
2783    
2784            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
2785            event if the modified flag changes.
2786            (Modifiable.changed): Tweak the doc-string.
2787    
2788            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
2789            (MainWindow.set_position_text): Put the code that puts the text
2790            with the mouse position into the status bar into the new method
2791            set_position_text so that it can overwritten in derived classes.
2792    
2793    2002-09-12  Bernhard Herzog  <[email protected]>
2794    
2795            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
2796            message box on the main window.
2797    
2798    2002-09-11  Bernhard Herzog  <[email protected]>
2799    
2800            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
2801            the 'E' because it's less likely to interfere with other menu
2802            entries.
2803            (MainWindow.build_menu): remove an incorrect comment.
2804    
2805    2002-09-10  Bernhard Herzog  <[email protected]>
2806    
2807            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
2808            (_tool_command): Add sensitive parameter
2809            (_has_visible_map): Sensitivity callback to tools and other
2810            commands that require a visible map. Use it in map_zoom_in_tool,
2811            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
2812            and map_full_extent
2813    
2814    2002-09-06  Bernhard Herzog  <[email protected]>
2815    
2816            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
2817            VIEW_POSITION
2818    
2819    2002-09-04  Frank Koormann  <[email protected]>
2820    
2821            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
2822    
2823    2002-09-02  Bernhard Herzog  <[email protected]>
2824    
2825            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
2826            wxWindows already and our implementation doesn't work correctly
2827            with wxGTK 2.3:
2828            (MapCanvas.__init__): Remove the instance variable
2829            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
2830            be drawin
2831            (MapCanvas.OnIdle): Removed.
2832    
2833            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
2834            a parameter to determine the size of the rectangle.
2835            (MapCanvas.find_shape_at): Create the box around the point on a
2836            layer by layer basis and make the size depend on the shape type.
2837            This solves a problem with the selection of point shapes at the
2838            border of the layer's bounding box
2839    
2840    2002-08-30  Bernhard Herzog  <[email protected]>
2841    
2842            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
2843            for the sensitivity  of remove layer.
2844            (_can_remove_layer): New. Sensitivity callback for remove layer
2845            (Command layer_remove): Use _can_remove_layer
2846    
2847            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
2848            determine whether a given layer can be deleted.
2849    
2850            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
2851            (MapCanvas.do_redraw): Get rid of the unused update_region
2852            instance variable
2853    
2854            * Thuban/UI/view.py: Add/update some doc-strings.
2855    
2856            * test/: new subdirectory with a bunch of unit tests.
2857    
2858            * test/README, test/test_table.py, test/test_save.py,
2859            test/test_menu.py, test/test_load.py: Initial set of tests and
2860            brief instructions on how to run them
2861    
2862    2002-08-29  Bernhard Herzog  <[email protected]>
2863    
2864            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
2865            arcs with multiple parts.
2866    
2867            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
2868            Handle degenrate rectangles.
2869    
2870            * Thuban/Model/table.py: Make writing records work correctly:
2871            (Table.__init__): Keep track of whether the DBF is open for
2872            writing
2873            (Table.write_record): Open the DBF file for writing when necessary
2874    
2875    2002-08-27  Bernhard Herzog  <[email protected]>
2876    
2877            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
2878            dbf files only for reading by default. Use a new writable dbf
2879            object for writing.
2880    
2881    2002-08-26  Bernhard Herzog  <[email protected]>
2882    
2883            * Thuban/UI/mainwindow.py: Refactor the context creation:
2884            (MainWindow.Context): New method to return a context
2885            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
2886            new method
2887    
2888            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
2889            layer table specific code from TableGrid into LayerTableGrid
2890            (TableFrame, LayerTableFrame): Split the layer table specific code
2891            from TableFrame into LayerTableFrame
2892            (LayerTableGrid.select_shape): Remove a debug print
2893    
2894            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
2895            LayerTableFrame
2896    
2897    2002-08-23  Bernhard Herzog  <[email protected]>
2898    
2899            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
2900            absolute filename.
2901    
2902    2002-08-22  Bernhard Herzog  <[email protected]>
2903    
2904            * Thuban/Model/table.py (Table.write_record): New method to write
2905            records.
2906            (Table.__init__): Open the DBF file for writing too.
2907    
2908            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
2909            into the underlying table.
2910    
2911            * extensions/shapelib/shapefil.h (DBFCommit),
2912            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
2913            commit any changes made to the DBF file.
2914    
2915            * Thuban/UI/mainwindow.py (make_check_current_tool)
2916            (_tool_command): Put the code that generates the "checked"
2917            callback into a separate function so that we can reuse it
2918            elsewhere
2919    
2920            * Thuban/Model/save.py (Saver): New class to handle serializing a
2921            session into an XML file. The main reason to introduce a class is
2922            that applications built on Thuban can derive from it so that they
2923            can save additional information in a session file.
2924            (save_session): Delegate almost all the work to the Saver class.
2925            Rename the filename argument to file because it may be a file like
2926            object now.
2927    
2928            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
2929            code. Remove the little test code which would be executed when the
2930            module is run as a script which didn't work anymore since it can't
2931            import the other Thuban modules.
2932            (ProcessSession, load_session): Refactor the ProcessSession to
2933            have one method for each element start and end tag so that derived
2934            classes can easily override the processing of individual tags.
2935            Also, always parse with namespaces enabled because applications
2936            built on top of Thuban will likely use namespaces if they extend
2937            the session file format.
2938    
2939    2002-08-21  Bernhard Herzog  <[email protected]>
2940    
2941            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
2942            because thubaninit_contents will do it for us.
2943    
2944    2002-08-16  Jan-Oliver Wagner <[email protected]>
2945    
2946            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
2947            tree window already open
2948    
2949    2002-08-15  Bernhard Herzog  <[email protected]>
2950    
2951            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
2952            with self.
2953    
2954            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
2955            when we have actually captured it.
2956    
2957            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
2958            shapefile and destroy the table.
2959    
2960            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
2961    
2962    2002-08-14  Bernhard Herzog  <[email protected]>
2963    
2964            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
2965            instance variable columns
2966            (RecordTable.GetTypeName): row and col may be negative in some
2967            cases.
2968    
2969            * setup.py (InstallLocal.initialize_options)
2970            (InstallLocal.finalize_options, InstallLocal.user_options): New
2971            option create-init-file to build a thubaninit.py when running
2972            install_local
2973            (InstallLocal.run): Create the thubaninit.py module when requested
2974            (thubaninit_contents): Split the template into several parts and
2975            create a new function thubaninit_contents that creates the
2976            contents of a thubaninit module.
2977            (ThubanInstall.run): Use the new function to create the thubaninit
2978            module.
2979    
2980    2002-07-30  Bernhard Herzog  <[email protected]>
2981    
2982            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
2983            cleanup.
2984            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
2985    
2986            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
2987            direct base class' Destroy method.
2988    
2989            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
2990            layers.
2991            (Map.Destroy): Destroy the label_layer as well and call the
2992            inherited Desatroymethod first so that no more messages are
2993            issued.
2994            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
2995            message if the stacking order actually has changed. Add
2996            doc-strings.
2997            (Map.BoundingBox): Correct the doc-string.
2998            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
2999            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
3000    
3001            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
3002            all labels.
3003    
3004    2002-07-29  Bernhard Herzog  <[email protected]>
3005    
3006            * Thuban/Model/map.py (Map.subscribe_layer_channels)
3007            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
3008            to a layer's channels into separate methods.
3009            (Map.RemoveLayer, Map.AddLayer): Call the new methods
3010            (Map.Destroy): Unsubscribe from a layer's channels before
3011            destroying it.
3012    
3013            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
3014            selected_layer parameter to searched_layer which is the layer to
3015            search in.
3016            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
3017            search to that layer. Return the selected layer and shape.
3018    
3019            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
3020            typo
3021    
3022    2002-07-24  Bernhard Herzog  <[email protected]>
3023    
3024            * Thuban/UI/application.py (ThubanApplication.create_session):
3025            Extend the doc string.
3026            (ThubanApplication.subscribe_session)
3027            (ThubanApplication.unsubscribe_session): New methods to
3028            subscribe/unsubscribe to/from session channels.
3029            (ThubanApplication.SetSession): Call the new methods here.
3030            (ThubanApplication.maps_changed, ThubanApplication.set_map):
3031            Renamed set_map to maps_changed. Its now a subscriber for
3032            MAPS_CHANGED.
3033    
3034            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
3035            x-coordinate in case of simple clicks
3036    
3037            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
3038            don't pass it as a parameter
3039    
3040            * Thuban/Model/session.py (Session.RemoveMap): New
3041    
3042            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
3043            window size into a parameter.
3044    
3045  2002-07-23  Bernhard Herzog  <[email protected]>  2002-07-23  Bernhard Herzog  <[email protected]>
3046    
3047            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
3048            just commands.
3049    
3050          * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the          * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
3051          parameter list a bit to allow setting the window title and the          parameter list a bit to allow setting the window title and the
3052          initial message in the status bar. Update the callers.          initial message in the status bar. Update the callers.
# Line 22  Line 3069 
3069          * Thuban/UI/tree.py: We can now simply subscribe to the session's          * Thuban/UI/tree.py: We can now simply subscribe to the session's
3070          CHANGED channel to be informed of changes.          CHANGED channel to be informed of changes.
3071          (SessionTreeCtrl.session_channels): Not needed any longer.          (SessionTreeCtrl.session_channels): Not needed any longer.
3072          (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):          (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
3073          Only have to (un)subscribe CHANGED          Only have to (un)subscribe CHANGED
3074    
3075          * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.          * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
# Line 83  Line 3130 
3130          * Thuban/Model/layer.py (Layer.TreeInfo),          * Thuban/Model/layer.py (Layer.TreeInfo),
3131          Thuban/Model/extension.py (Extension.TreeInfo),          Thuban/Model/extension.py (Extension.TreeInfo),
3132          Thuban/Model/map.py (Map.TreeInfo),          Thuban/Model/map.py (Map.TreeInfo),
3133          Thuban/Model/session.py (Session.TreeInfo):          Thuban/Model/session.py (Session.TreeInfo):
3134          Add TreeInfo methods to implement the new tree view update scheme          Add TreeInfo methods to implement the new tree view update scheme
3135    
3136  2002-07-16  Bernhard Herzog  <[email protected]>  2002-07-16  Bernhard Herzog  <[email protected]>
# Line 164  Line 3211 
3211          * setup.py: In the setup call, make sure that the library          * setup.py: In the setup call, make sure that the library
3212          directories are under $prefix/lib not directly under $prefix.          directories are under $prefix/lib not directly under $prefix.
3213    
3214  2002-06-20      Jan-Oliver Wagner <[email protected]>  2002-06-20  Jan-Oliver Wagner <[email protected]>
3215    
3216          * Thuban/Model/extension.py: new module to handle extension objects.          * Thuban/Model/extension.py: new module to handle extension objects.
3217          * Thuban/Model/messages.py: new messages for extensions.          * Thuban/Model/messages.py: new messages for extensions.
# Line 393  Line 3440 
3440          * Thuban/UI/messages.py (VIEW_POSITION): New message for the          * Thuban/UI/messages.py (VIEW_POSITION): New message for the
3441          position in the statusbar          position in the statusbar
3442    
3443  2002-04-26      Frank Koormann <[email protected]>  2002-04-26  Frank Koormann <[email protected]>
3444    
3445          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
3446    
3447  2002-04-24      Frank Koormann <[email protected]>  2002-04-24  Frank Koormann <[email protected]>
3448            
3449          * Resources/Bitmaps/identify.xpm: shadow added          * Resources/Bitmaps/identify.xpm: shadow added
3450    
3451          * Resources/Bitmaps/fullextent.xpm: new          * Resources/Bitmaps/fullextent.xpm: new
           
 2002-04-22      Jan-Oliver Wagner <[email protected]>  
3452    
3453          * Thuban/UI/tree.py (update_tree): added test for None on map bounding box  2002-04-22  Jan-Oliver Wagner <[email protected]>
3454    
3455  2002-04-21      Jan-Oliver Wagner <[email protected]>          * Thuban/UI/tree.py (update_tree): added test for None on map bounding
3456            box
3457    
3458    2002-04-21  Jan-Oliver Wagner <[email protected]>
3459    
3460          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
3461    
3462          * Thuban/UI/tree.py (update_tree): added added map extent          * Thuban/UI/tree.py (update_tree): added added map extent
3463    
3464          * Thuban/UI/mainwindow.py (_method_command): extended by parameter          * Thuban/UI/mainwindow.py (_method_command): extended by parameter
3465          icon; added map_full_extend as tool          icon; added map_full_extend as tool
3466    
3467  2002-04-19      Jan-Oliver Wagner <[email protected]>  2002-04-19  Jan-Oliver Wagner <[email protected]>
3468    
3469          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
3470          saving _new_ sessions          saving _new_ sessions
# Line 518  Line 3566 
3566    
3567          * setup.py: increase version number to 0.1          * setup.py: increase version number to 0.1
3568          (data_dist): New command class for data distribution          (data_dist): New command class for data distribution
           
3569    
3570  2001-09-14  Bernhard Herzog  <[email protected]>  2001-09-14  Bernhard Herzog  <[email protected]>
3571    
3572          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3573          Handle the case of no layer (i.e. layer is None) properly.          Handle the case of no layer (i.e. layer is None) properly.
3574    
3575          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3576          Set the initial selection of the combo boxes to reflect the          Set the initial selection of the combo boxes to reflect the
3577          projection we're starting with in a way that works on windows,          projection we're starting with in a way that works on windows,
3578          too.          too.
# Line 635  Line 3682 
3682          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
3683          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
3684    
3685          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
3686          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
3687          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
3688          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
3689          the application's OnInit method          the application's OnInit method
# Line 652  Line 3699 
3699          layer to the tableview dialog.          layer to the tableview dialog.
3700    
3701          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
3702          (TableGrid):          (TableGrid):
3703          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
3704          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
3705          (TableFrame.__init__):          (TableFrame.__init__):
# Line 719  Line 3766 
3766  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
3767    
3768          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
3769            
3770          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
3771          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
3772            
3773          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
3774          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
3775          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 769  Line 3816 
3816          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
3817          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
3818          link_file method          link_file method
3819            
3820          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
3821          the window when the first layer is added to the map.          the window when the first layer is added to the map.
3822    
# Line 806  Line 3853 
3853          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
3854          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
3855          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
3856            
3857          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
3858          installer          installer
3859    

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26