/[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 199 by jan, Thu Jun 20 15:25:36 2002 UTC revision 972 by jonathan, Wed May 21 17:32:05 2003 UTC
# Line 1  Line 1 
1  2002-06-20      Jan-Oliver Wagner <[email protected]>  2003-05-21  Jonathan Coles   <[email protected]>
2    
3            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
4            references to 'inf' and use new Range __init__ to pass floats
5            directly rather than converting them to strings first.
6            Fixes RTBug #1876.
7    
8            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
9            Use new Range ___init__ to pass floats.
10    
11            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
12            filename is a valid image file. Throw IOError otherwise.
13    
14            * Thuban/Model/range.py: Brought over new Range from SciParam that
15            is immutable and has an __init__ which can accept floats.
16    
17            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
18            into try block. AddLayer doesn't throw any exceptions anymore.
19            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
20            try block.
21    
22            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
23            the first item in choices. Fixes RTBug #1882.
24    
25            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
26            has gone to 0 which is a serious problem. abort.
27            (MapRenderer.draw_raster_layer): Catch IOError seperately and
28            print the error from GDAL.
29    
30            * Thuban/UI/tableview.py (TableGrid.__init__): Call
31            ToggleEventListeners to turn on listening.
32            (TableGrid.ToggleEventListeners): New. Turns event listening on
33            and off so as to prevent excessive messages.
34            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
35            to suppress excessive messages when selecting many rows.
36            Fixes RTBug #1880.
37    
38            * Thuban/UI/view.py: Added checks against if scale == 0. This
39            is a serious problem that can occur when an image without
40            geo data is loading and causes the map projection bounds to
41            go to infinity. Right now, the solution is to simply try
42            to recover.
43    
44            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
45            to set the MFILEReceiver attributes even if the data is NULL.
46    
47            * extensions/thuban/gdalwarp.cpp: Improved the error handling
48            and passed GDAL messages back up to the Python layer. Also
49            tried to fix some memory leaks that were present in the original
50            utility but didn't matter because the program aborted.
51    
52            * test/test_range.py: Copied over tests from SciParam. Removed
53            tests against importing. Fixes RTBug #1867.
54    
55    2003-05-21  Bernhard Herzog  <[email protected]>
56    
57            * test/test_load.py: Remove unused imports and restructure the
58            test code
59            (LoadSessionTest): Split into one class for each test and turn
60            LoadSessionTest itself into the base class for all such session
61            tests.
62            (ClassificationTest): New base class for load tests that test
63            classifications
64            (TestSingleLayer, TestLayerVisibility, TestClassification)
65            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
66            for the individual tests
67    
68            * test/support.py (FileLoadTestCase.filename): New base class for
69            file loading tests
70    
71    2003-05-21  Jan-Oliver Wagner <[email protected]>
72    
73            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
74            Mercator' to 'UTM Zone 32' as a more convenient example.
75            Added 'Gauss Krueger Zone 6'.
76    
77            * Data/iceland_sample_raster.thuban: political polygon now
78            filled transparent to have the raster image visible at once.
79    
80    2003-05-21  Frank Koormann  <[email protected]>
81    
82            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
83            OnClose() to keep in sync with extensions. Internally Thuban
84            still uses "underscored" names.
85    
86    2003-05-20  Jonathan Coles   <[email protected]>
87    
88            This puts back Raster layer support. These layers support projections
89            through the GDAL library. Currently, the CVS version is being used.
90            There are no Debian packages available although this may change soon.
91            A GDAL driver was extended to support writing to memory rather to
92            files.
93    
94            There is still some work that needs to be done, such as some error
95            handling when loading invalid images or when there is a problem
96            projecting the image. This putback simply checks in the majority
97            of the work.
98    
99            * setup.py: Add gdalwarp library extension.
100    
101            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
102            Defaults to False, but can be overridden by subclasses if they
103            support classification.
104            (RasterLayer): New. Defines a new layer that represents an
105            image.
106    
107            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
108            tag handler.
109            (SessionLoader.start_layer): Encode the filename.
110            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
111            New. Supports reading a rasterlayer tag.
112    
113            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
114    
115            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
116            get a string in Latin1. If we get such as string convert it to
117            unicode first, otherwise leave if alone before encoding.
118            (SessionSaver.write_layer): Add support for writing both Layers
119            and RasterLayers.
120    
121            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
122            The right argument may not be a string, it could also be a Column.
123    
124            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
125            Make initial window size 600x400. Fixes RTBug #1872.
126    
127            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
128            the dialog is constructed so that we can support layers that
129            do not have classifications.
130            (Classifier._OnTry): Only build a classification if the layer
131            supports one.
132    
133            * Thuban/UI/legend.py: Change all checks that a layer is an
134            instance of Layer into checks against BaseLayer.
135            (LegendTree.__FillTreeLayer): Only add children to a branch if
136            the layer supports classification.
137    
138            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
139            MainWindow.OpenSession): Don't proceed with an action if the
140            user chooses Cancel when they are asked to save changes.
141            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
142            user to select an image file. Create a new RasterLayer and add
143            it to the map.
144    
145            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
146            for rendering RasterLayer layers.
147            (MapRenderer.draw_raster_layer): Actually method that calls
148            the GDALWarp python wrapper and constructs an image from the
149            data returned.
150    
151            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
152            Choices symbols to match those used in the table query method.
153            Replace deprecated method calls on table with new method names.
154    
155            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
156            how small the scale can get. This still needs more testing.
157    
158            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
159            Provides a driver to output in .bmp format.
160    
161            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
162            New. Provides IO routines which write to memory, rather than a file.
163    
164            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
165            of the gdalwarp utility provided in GDAL. Added function calls
166            that can be accessed from python.
167    
168            * Data/iceland_sample_raster.thuban: New. Sample file that uses
169            a raster layer.
170    
171            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
172            layer image data.
173    
174            * Doc/thuban.dtd: Added rasterlayer attribute definition.
175    
176            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
177            tests associated with the raster layer code.
178    
179            * test/test_transientdb.py
180            (TestTransientTable.test_auto_transient_table_query): Added a test
181            for using a Column object as the "right" parameter to a query.
182    
183    2003-05-19  Frank Koormann  <[email protected]>
184    
185            * Thuban/version.py (get_changelog_date):
186            Catch exceptions if ChangeLog does not exist.
187    
188            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
189    
190    2003-05-19  Frank Koormann  <[email protected]>
191    
192            Extended version information for Thuban
193    
194            * Thuban/version.py: New, version information for Thuban: Last
195            modification date and last ChangeLog entry date.
196    
197            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
198            information: Display Thuban, wxPython and Python version.
199    
200    2003-05-16  Bernhard Herzog  <[email protected]>
201    
202            * Thuban/Model/save.py: Remove some unused imports including the
203            __future__ import for nested_scopes as Thuban relies on Python 2.2
204            now.
205            (XMLWriter.encode): Remove the special case for a None argument.
206            In the saver encode is always called with a string argument.
207    
208    2003-05-16  Bernhard Herzog  <[email protected]>
209    
210            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
211            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
212            of the bug was that e.g. float("1.2") would fail. Thuban now
213            requires 2.4.x.
214            
215    2003-05-16  Frank Koormann   <[email protected]>
216    
217            Printing enhancement and WMF export (under Win32)
218    
219            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
220            ScreenRenderer. Renders Map, Legend and Scalebar for export.
221            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
222            PrintRender.
223    
224            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
225            to fullfil information needed for PrinterRenderer.
226            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
227            (MapCanvas.Print): Adapted to new MapPrintout.
228            (OutputTransform): General calculations to transform from canvas
229            coordinates to export/printing devices.
230    
231            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
232            new method_command to call ExportMap, with platform dependency (only
233            __WXMSW__)
234      
235            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
236            of scalebar drawing area as new parameters.
237            
238            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
239    
240            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
241            Update to extended scalebar.DrawScalebar header.
242    
243            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
244    
245            * test/test_scalebar.py: Made test executable as standalone.
246    
247    2003-05-16  Bernhard Herzog  <[email protected]>
248    
249            * Thuban/Model/table.py (Table): Remove this compatibility alias
250            for DBFTable.
251    
252            * test/test_table.py: Import DBFTable as Table because that alias
253            doesn't exist anymore.
254    
255            * Thuban/UI/classgen.py: Remove some unused imports
256    
257    2003-05-14  Jonathan Coles   <[email protected]>
258    
259            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
260            Fix docstring.
261            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
262            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
263            values of the supplied range to determine the beginning and end
264            bounds of the generated classes.
265    
266            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
267            do not have a leading 0 (.5 is now accepted as well as 0.5).
268    
269            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
270            call to ClassGenerator.GenUniformDistribution.
271    
272            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
273            layout bug with the 'Projection' label.
274    
275            * test/support.py (FloatTestCase): New. Needed for the Range tests.
276    
277            * test/test_range.py: New. Imported from SciParam.
278    
279    2003-05-12  Jonathan Coles   <[email protected]>
280    
281            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
282            to table.UniqueValues() with calls that retrieve all the values
283            from the table. This will need to be replaced by a method on table
284            which can simply return the list (perhaps more efficiently).
285    
286    2003-05-12  Jonathan Coles   <[email protected]>
287    
288            The return value of ClassGenerator.CalculateQuantiles has changed.
289            Refer to the documentation for details.
290    
291            * test/test_classgen.py: Modified Quantile tests to use the
292            new return values.
293    
294            * Thuban/Model/classgen.py
295            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
296            use new return values from CalculateQuantiles to produce the correct
297            range bounds in the Classification.
298            (ClassGenerator.CalculateQuantiles): Add more comments describing
299            the return values and parameters. Make minor adjustments to improve
300            the legibility of the code. Fix problem with adjusted not being set
301            in most cases.
302    
303    2003-05-12  Frank Koormann <[email protected]>
304            
305            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
306            and latin1. Fixes #1851 finally.
307    
308    2003-05-09  Jonathan Coles   <[email protected]>
309    
310            * test/test_classgen.py: New. Tests the Quantile algorithm.
311    
312            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
313            Clean up debugging statement, add comments, fix a small bug in the
314            returned adjusted percentiles.
315            
316    2003-05-09  Jonathan Coles   <[email protected]>
317    
318            Introduces Range class from SciParam into the ClassGroupRange class,
319            and such ranges can now be saved and loaded from disk.
320    
321            Quantiles are now available in the Classification Generator.
322    
323            Initial support for building Queries on a table. Doesn't do anything
324            but run some tests.
325    
326            * Thuban/Model/classification.py: Explicit imports.
327            (ClassGroupRange): Use the Range class to store the underlying
328            range information. The interface remains the same, except for
329            GetRange(), and you can also supply a Range object as the min
330            parameter to SetRange or __init__.
331    
332            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
333            string appropriately for use in Thuban. Fixes RTbug #1851.
334            (SessionLoader.end_projection): Handle the context of the
335            projection tag a bit better by looking at what objects are not
336            None. There was an assumption that a projection tag for a map
337            could occur before any layers.
338            (SessionLoader.start_clrange): Provide backward compatibility for
339            reading min/max values as well as the new range parameter.
340    
341            * Thuban/Model/map.py: Explicit imports.
342    
343            * Thuban/Model/resource.py: Import _.
344            (ProjFileSaver.write): write header using projfile.dtd.
345    
346            * Thuban/Model/save.py: Explicit imports.
347            (XMLWriter.encode): New. Encode the given string from a format
348            used by Thuban into UTF-8. Fixes RTbug #1851.
349    
350            * Thuban/UI/classgen.py: Explicit imports.
351            (ClassGenDialog.__init__): Clean up the code and add support
352            for Quantiles.
353            (ClassGenDialog.OnOK): Add support for Quantiles.
354            (GenQuantilesPanel): New. Input panel for Quantiles.
355            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
356            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
357    
358            * Thuban/Model/classgen.py: New. Contains all the classes named above.
359    
360            * Thuban/UI/classifier.py: Explicit imports.
361            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
362            ClassTable.SetValueAsCustom): Reworked to use new Range class.
363    
364            * Thuban/UI/legend.py: Explicit imports.
365    
366            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
367            a Table menu and associated method calls.
368            (MainWindow.choose_color): Removed. No longer needed.
369    
370            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
371            should be disabled if no projection is selected in the available
372            list.
373    
374            * Thuban/UI/renderer.py: Explicit imports.
375    
376            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
377            with correctly selecting the rows and issuing the right events.
378            Be sure to call Skip() to allow the grid to do some of its own
379            handling which allows the rows to actually be selected.
380            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
381            selecting multiple shapes.
382            (LayerTableFrame): Support for building Queries.
383            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
384    
385            * Thuban/UI/tree.py: Explicit imports.
386    
387            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
388            table view can call it.
389    
390            * test/test_classification.py: Explicit imports.
391            (TestClassification.test_ClassGroupRange): Fix test for new
392            Range class.
393    
394            * Doc/thuban.dtd: Add range parameter for clrange.
395    
396            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
397            object in ClassGroupRange, and also uesd for inputting ranges in
398            the classifer table and elsewhere.
399    
400            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
401            yet.
402    
403    2003-05-09  Frank Koormann <[email protected]>
404    
405            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
406    
407    2003-05-08  Frank Koormann <[email protected]>
408    
409            Coding style updates
410    
411            * test/test_scalebar.py: Replaced tab indentation by spaces.
412    
413            * Thuban/UI/scalebar.py: Explicit imports.
414    
415    2003-05-08  Frank Koormann <[email protected]>
416    
417            * Thuban/UI/scalebar.py
418            (ScaleBar.DrawScalebar): Format string bug fixed.
419    
420    2003-05-08  Frank Koormann <[email protected]>
421    
422            Reorganization of scalebar component (no wx in Thuban/Model)
423    
424            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
425            (deriveInterval):
426            Calculate scalebar interval and unit which fits in width for scale.
427            (roundInterval): Round float.
428    
429            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
430    
431            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
432    
433            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
434    
435    2003-05-08  Frank Koormann <[email protected]>
436    
437            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
438            Initialize ScaleBar with canvas.map
439    
440            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
441            round intervals to display smarter lengths
442            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
443            layer. If the maps has no projection applied grey the scalebar.
444    
445    2003-05-07  Frank Koormann <[email protected]>
446            
447            Basic Scalebar features added.
448    
449            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
450    
451            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
452            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
453            and the renderer.
454    
455            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
456    
457            * Thuban/UI/messages.py: SCALE_CHANGED added.
458    
459    2003-05-07  Bernhard Herzog  <[email protected]>
460    
461            * Thuban/Model/session.py (Session.__init__): New instance
462            variable shapestores to hold a list of all open shapestore objects
463            (Session.ShapeStores): New. Accessor method for the shapestores
464            list.
465            (Session._add_shapestore, Session._clean_weak_store_refs): New.
466            Internal methods to maintain the shapestores list.
467            (Session.Tables): New. Return all tables open in the session.
468            (Session.OpenShapefile): Insert the new ShapeStore into the
469            shapestores list.
470    
471            * test/test_session.py (TestSessionSimple.test_initial_state): Add
472            tests for ShapeStores and Tables
473            (TestSessionWithContent.test_shape_stores)
474            (TestSessionWithContent.test_tables): New. Test cases for
475            ShapeStores and Tables
476    
477    2003-05-07  Bernhard Herzog  <[email protected]>
478    
479            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
480            Add comments about the optimizations used.
481            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
482            Implement the ReadValue table interface method.
483    
484            * test/test_transientdb.py
485            (TestTransientTable.run_iceland_political_tests)
486            (TestTransientTable.test_transient_joined_table): Add tests for
487            ReadValue
488    
489    2003-05-07  Frank Koormann <[email protected]>
490    
491            * Resources/Bitmaps/fulllayerextent.xpm,
492            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
493            new icons.
494    
495    2003-05-06  Bernhard Herzog  <[email protected]>
496    
497            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
498            New. Simply delegate to the transient table's version.
499    
500            * test/test_transientdb.py
501            (TestTransientTable.test_auto_transient_table_query): New. Test
502            case for AutoTransientTable's SimpleQuery
503    
504    2003-05-06  Bernhard Herzog  <[email protected]>
505    
506            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
507            Implement a simple query method for the query dialog
508            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
509            the row index or shapeid.
510            (TransientTable.create): Insert the right value of the row index
511            (TransientJoinedTable.create): Copy the row index of the left
512            table to the joined result table
513    
514            * test/test_transientdb.py
515            (TestTransientTable.test_transient_table_read_twice): Fix
516            doc-string
517            (TestTransientTable.test_transient_table_query): New. Test for the
518            SimpleQuery method
519    
520    2003-05-06  Bernhard Herzog  <[email protected]>
521    
522            Convert all table users to use the new table interface. This only
523            covers Thuban itself, not GREAT-ER or other applications built on
524            Thuban yet, so the compatibility interface stays in place for the
525            time being but it now issues DeprecationWarnings.
526    
527            Finally, the new Table interface has a new method, HasColumn.
528    
529            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
530            issue deprecation warnings when they're. The warnings refer to the
531            caller of the method.
532            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
533            for the deprecation warnings
534    
535            * test/test_table.py: Ignore the deprecation warnings for the old
536            table in the tests in this module. The purpose of the tests is to
537            test the old interface, after all.
538    
539            * test/test_transientdb.py
540            (TestTransientTable.run_iceland_political_tests): Use the
541            constants for the types. Add a test for HasColumn
542            (TestTransientTable.test_transient_joined_table): Adapt to new
543            table interface. Add a test for HasColumn
544            (TestTransientTable.test_transient_table_read_twice): Adapt to new
545            table interface
546    
547            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
548            Adapt to new table interface
549    
550            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
551            new table interface
552    
553            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
554            (RecordTable.SetTable): Adapt to new table interface
555    
556            * Thuban/UI/classifier.py (Classifier.__init__)
557            (Classifier.__init__): Adapt to new table interface
558    
559            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
560            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
561            to new table interface
562    
563            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
564            (AutoTransientTable.HasColumn): Implement the new table interface
565            method
566            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
567            (AutoTransientTable.UniqueValues): Adapt to new table interface
568    
569            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
570            Adapt to new table interface
571    
572            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
573            simplify opening shapefiles a bit easier.
574            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
575            (TestLayer.test_point_layer): Use the new helper method
576            (TestLayer.test_get_field_type): New. Test for the GetFieldType
577            method
578    
579            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
580            the new table method
581    
582            * test/test_memory_table.py (TestMemoryTable.test_has_column):
583            Test for the new table method HasColumn
584    
585    2003-05-06  Jonathan Coles   <[email protected]>
586    
587            Addresses the "Selection Extent" wish of RTbug #1787.
588    
589            * Resources/Bitmaps/fulllayerextent.xpm,
590            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
591            extent. These are just place holders for the real bitmaps.
592    
593            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
594            calculate the bounding box once (the first time compute_bbox() is
595            called).
596            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
597            the bounding box for the shapes in lat/long coordinates.
598    
599            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
600            option.
601            (MainWindow.has_selected_shapes): New. Returns true if there are
602            any selected shapes.
603            (MainWindow.FullSelectionExtent): New. Calls
604            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
605            (_has_selected_shapes): New. Returns true if there are any
606            selected shapes.
607    
608            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
609            true if there are any selected shapes.
610    
611            * Thuban/UI/view.py (MapCanvas): Added delegated method
612            HasSelectedShapes.
613            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
614            shapes on the canvas using the map projection (if any).
615    
616            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
617            for Layer.ShapesBoundingBox().
618    
619    2003-05-06  Bernhard Herzog  <[email protected]>
620    
621            * Resources/Projections/defaults.proj: Fix spelling of Mercator
622    
623    2003-05-05  Jonathan Coles   <[email protected]>
624    
625            Addresses the "Full Layer Extent" wish of RTbug #1787.
626    
627            * Resources/Projections/defaults.proj: Added UK National Grid.
628    
629            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
630            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
631            when the user selects the menu option.
632    
633            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
634            scales the given layer on the canvas using the map projection.
635    
636    2003-05-05  Bernhard Herzog  <[email protected]>
637    
638            Convert the table implementations to a new table interface. All
639            tables use a common mixin class to provide backwards compatibility
640            until all table users have been updated.
641    
642            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
643            provide backwards compatibility for table classes implementing the
644            new interface
645            (DBFTable, MemoryTable): Implement the new table interface. Use
646            OldTableInterfaceMixin as base for compatibility
647            (DBFColumn, MemoryColumn): New. Column description for DBFTable
648            and MemoryTable resp.
649    
650            * test/test_dbf_table.py: New. Test cases for the DBFTable with
651            the new table interface.
652    
653            * test/test_memory_table.py: New. Test cases for the MemoryTable
654            with the new table interface.
655    
656            * test/test_table.py: Document the all tests in this file as only
657            for backwards compatibility. The equivalent tests for the new
658            interface are in test_memory_table.py and test_dbf_table.py
659            (MemoryTableTest.test_read): field_info should be returning tuples
660            with four items
661            (MemoryTableTest.test_write): Make doc-string a more precise.
662    
663            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
664            table interface. Derive from from OldTableInterfaceMixin for
665            compatibility.
666            (TransientTableBase.create): New intance variable column_map to
667            map from names and indices to column objects
668            (TransientTable.create): Use the new table interface of the input
669            table
670            (AutoTransientTable): Convert to new table interface. Derive from
671            from OldTableInterfaceMixin for compatibility.
672            (AutoTransientTable.write_record): Removed. It's not implemented
673            yet and we still have to decide how to handle writing with the new
674            table and data framework.
675    
676            * test/test_transientdb.py
677            (TestTransientTable.run_iceland_political_tests)
678            (TestTransientTable.test_transient_joined_table): Use the new
679            table interface
680    
681    2003-05-05  Jonathan Coles   <[email protected]>
682    
683            This is namely a collection of UI updates to improve user interactivity.
684            Tabbing between controls now exists and you can use ESC to close dialog
685            boxes; ENTER will active the default button.
686    
687            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
688            order that the controls are created so that tabbing works correctly.
689            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
690            wxDialog can handle the default button correctly.
691            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
692            same reasons as for OnOK.
693            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
694            when we ask the table for the maximum/minimum values of a field
695            which could take a very long time.
696    
697            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
698            order that the controls are created so that tabbing works correctly.
699            (SelectPropertiesDialog.__init__): Rearrange the order that the
700            controls are created so that tabbing works correctly.
701    
702            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
703            to derive from a wxDialog but behave like the original implementation
704            which was derived from a wxFrame. wxDialog provides useful key
705            handling functionality like ESC calling OnCancel and ENTER calling
706            OnOK which is lost with wxFrame.
707    
708            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
709            new dialogs.
710    
711            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
712            order that the controls are created so that tabbing works correctly.
713            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
714            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
715            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
716            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
717            can provide the "UK National Grid" as a default projection.
718            (UTMPanel.__init__): Rearrange the order that the controls are
719            created so that tabbing works correctly.
720    
721    2003-05-05  Bernhard Herzog  <[email protected]>
722    
723            * extensions/thuban/wxproj.cpp: Fix some of the comments.
724            (project_point): If a map projection but no layer projection is
725            given, convert degrees to radians before applying the map
726            projection.
727    
728            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
729            (TableGrid.allow_messages): New methods to make it possible to
730            inhibit message sending.
731            (TableGrid.issue): Only send the message if not inhibited.
732            (LayerTableGrid.select_shape): Use the new methods to make sure
733            that no ROW_SELECTED message is sent while we're updating the
734            selected rows to match the selected shapes.
735    
736    2003-05-02  Jan-Oliver Wagner <[email protected]>
737    
738            Implementation of MemoryTable.
739    
740            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
741            implementation that operates on a list of tuples. All of the data
742            are kept in the memory.
743    
744            * test/test_table.py (MemoryTableTest): New.
745    
746            * test/test_transientdb.py (SimpleTable): Removed.
747            (TestTransientTable.test_transient_joined_table,
748            (TestTransientTable.test_transient_table_read_twice): Replaced
749            SimpleTable by MemoryTable.
750    
751    2003-04-30  Jonathan Coles   <[email protected]>
752    
753            * Data/iceland_sample.thuban: Now contains correct projections
754            for each of the layers.
755    
756            * Resources/Projections/defaults.proj: Geographic projection
757            contains unit conversion parameter.
758    
759    2003-04-30  Jonathan Coles   <[email protected]>
760    
761            The most important part of this putback is the projection changes.
762            It should now be possible to specify the projection that a layer
763            is in and then specify a different projection for the map. The
764            projection dialog has an extra parameter for a geographic projection
765            which lets the user select if the input is in degrees or radians.
766    
767            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
768            to say that the parameter is a tuple of unprojected
769            points (which is what the callers to this method were assuming).
770            Also, since the points are unprojected we need to projected them.
771    
772            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
773            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
774            groups are selected, move the layer up/down. Fixes RTbug #1833.
775    
776            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
777    
778            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
779            parameter in call to SetClientData.
780            (GeoPanel): Add support for selecting the units that the
781            source data is in (Radians or Degrees).
782    
783            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
784            the rendering loop by reducing the number of if's, removing the
785            unnecessary try/except block, and checking if the old group
786            is the same as the new one (which happens a lot if there is
787            no classification, or lots of shapes are in the same group).
788    
789            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
790            around the redraw routine to try to catch problems that the user
791            may create by selecting invalid projections for the data set and
792            map. Clears the display if there are any problems and prints the
793            error.
794            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
795            rectangle.
796    
797            * extensions/thuban/wxproj.cpp (project_point): First invert the
798            supplied point (which should be in projected coordinates) using
799            the layer's projection and then project the point using the
800            map's projection.
801            (project_points): Use project_point() to project each point.
802    
803    2003-04-30  Jan-Oliver Wagner <[email protected]>
804    
805            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
806            don't set the Classification to None if the classfication field
807            is None (ie only a DEFAULT).
808    
809    2003-04-30  Bernhard Herzog  <[email protected]>
810    
811            * Thuban/UI/view.py: Fix some typos.
812    
813            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
814            not pop up the dialog if the selection becomes empty (this could
815            happen if e.g. a new selection is opened while the identify tool
816            is active and dialog had been closed)
817    
818    2003-04-30  Bernhard Herzog  <[email protected]>
819    
820            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
821            instance variable read_record_last_result
822            (TransientTableBase.read_record): Make sure reading the same
823            record twice works. The implementation uses the new instance
824            variable read_record_last_result
825    
826            * test/test_transientdb.py
827            (TestTransientTable.test_transient_table_read_twice): New test
828            case for the above bug-fix.
829    
830    2003-04-29  Jonathan Coles   <[email protected]>
831    
832            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
833    
834            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
835    
836            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
837            (ClassTable.SetValueAsCustom): Rename keyword argument in
838            ClassGroup* constructors to match argument name.
839    
840    2003-04-29  Bernhard Herzog  <[email protected]>
841    
842            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
843            transient DB if it exists to make sure it doesn't leave a journal
844            file in the temp directory.
845    
846            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
847            self.conn to None after closing the connection to make sure it's
848            not closed twice
849    
850    2003-04-29  Jonathan Coles   <[email protected]>
851    
852            Add a visible parameter in the layer XML tag. The default value is
853            "true". If anything other than "false" is specified we also assume
854            "true". Addresses RTbug #1025.
855    
856            * Doc/thuban.dtd: Add visible parameter to a layer.
857    
858            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
859            of visible from 1 to True.
860            (Layer.__init__): Change default value of visible from 1 to True.
861    
862            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
863            parameter.
864    
865            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
866            parameter.
867    
868            * test/test_load.py: Add new test data contents_test_visible.
869            (LoadSessionTest.setUp): save test data.
870            (LoadSessionTest.testLayerVisibility): Test if the visible flag
871            is loaded correctly.
872    
873            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
874            for saving an invisible layer.
875    
876    2003-04-29  Jonathan Coles   <[email protected]>
877    
878            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
879            legend dialog box and tell it to change its map to the one
880            supplied to SetMap(). Fixes RTbug #1770.
881    
882    2003-04-29  Bernhard Herzog  <[email protected]>
883    
884            Next step of table implementation. Introduce a transient database
885            using SQLite that some of the data is copied to on demand. This
886            allows us to do joins and other operations that require an index
887            for good performance with reasonable efficiency. Thuban now needs
888            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
889            haven't tested that.
890            
891            * Thuban/Model/transientdb.py: New. Transient database
892            implementation.
893    
894            * test/test_transientdb.py: New. Tests for the transient DB
895            classes.
896    
897            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
898            classes to help automatically remove temporary files and
899            directories.
900            (Session.__init__): New instance variables temp_dir for the
901            temporary directory and transient_db for the SQLite database
902            (Session.temp_directory): New. Create a temporary directory if not
903            yet done and return its name. Use AutoRemoveDir to have it
904            automatically deleted
905            (Session.TransientDB): Instantiate the transient database if not
906            done yet and return it.
907    
908            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
909            AutoTransientTable so that data is copied to the transient DB on
910            demand.
911            (SimpleStore): New class that simply combines a table and a
912            shapefile
913    
914            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
915            DBFTable and update its doc-string to reflect the fact that this
916            is only the table interface to a DBF file. Table is now an alias
917            for DBFTable for temporary backwards compatibility.
918    
919            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
920            the last reference to the session goes away so that the temporary
921            files are removed properly.
922    
923            * test/test_load.py (LoadSessionTest.tearDown): Remove the
924            reference to the session to make sure the temporary files are
925            removed.
926    
927    2003-04-29  Bernhard Herzog  <[email protected]>
928    
929            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
930            the __parser instance variable into a normal local variable in
931            read. It's only used there and read will never be called more than
932            once. Plus it introduces a reference cycle that keeps can keep the
933            session object alive for a long time.
934    
935    2003-04-29  Jonathan Coles   <[email protected]>
936    
937            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
938            Projection an immutable item. Fixes RTbug #1825.
939            (Projection.__init__): Initialize instance variables here.
940            (ProjFile.Replace): New. Replace the given projection object with
941            the new projection object. This solves the problem of needing the
942            mutator Projection.SetProjection() in the ProjFrame class and
943            allows a projection to change parameters without changing its
944            location in the file.
945    
946            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
947            be of type wxSAVE and should verify overwriting a file.
948    
949            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
950            ProjFile.Replace() method instead of the mutator
951            Projection.SetProjection(). Also requires that we reassign the
952            client data to the new projection.
953    
954            * test/test_proj.py (TestProjection.test): Test GetName() and
955            GetAllParameters()
956            (TestProjFile.test): Remove tests for Set*() methods. Add tests
957            for Replace().
958    
959    2003-04-25  Jonathan Coles   <[email protected]>
960    
961            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
962            to save the name of the projection.
963    
964            * test/test_save.py (SaveSessionTest.testLayerProjection): New
965            test to verify layer projections are saved correctly.
966    
967    2003-04-25  Jonathan Coles   <[email protected]>
968    
969            * Thuban/Model/proj.py (Projection.SetName): Set the name
970            to "Unknown" if name is None.
971            (Projection.SetAllParameters): New. Set the projection's
972            parameter list to the one supplied.
973            (Projection.SetProjection): New. Set the projection's
974            properties to those of the supplied Projection.
975    
976            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
977            the dialog title to include the map's title.
978            (MainWindow.LayerProjection): Set the dialog title to include
979            the layer's title.
980    
981            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
982            error dialogs into a single method call.
983            (ProjFrame.__VerifyButtons): Add more states to check.
984            (ProjFrame.__GetProjection): Return the current state of an
985            edited projection or None.
986            (ProjFrame.__FillAvailList): Remove checks for states that
987            shouldn't exist.
988            (ProjFrame._OnNew): Clear all selected items and supply
989            a projection panel if necessary.
990    
991            * test/test_proj.py (TestProjFile.test): Add tests for
992            ProjFile.SetAllParameters, ProjFile.SetProjection,
993            ProjFile.SetName.
994    
995    2003-04-25  Jonathan Coles   <[email protected]>
996    
997            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
998            takes an optional argument to select the current projection.
999            This does not guarantee that the item is visible due to
1000            limited wxWindows functionality. Fixes RTBug #1821.
1001    
1002    2003-04-25  Jonathan Coles   <[email protected]>
1003    
1004            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1005            the projection name and use it when constructing the Projection
1006            object.
1007    
1008            * Thuban/Model/proj.py (Projection.__init__): Change the default
1009            value for 'name' to None and then test if name is equal to None
1010            in the body of the constructor. This way the caller doesn't have to
1011            know what the default value should be. Namely, useful in load.py
1012            where we have to pick a default value if the 'name' parameter
1013            doesn't exist in the XML file.
1014    
1015            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1016            Tests a file where a layer has a projection.
1017    
1018    2003-04-25  Jonathan Coles   <[email protected]>
1019    
1020            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1021            tree for projection information.
1022    
1023            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1024            XMLReader.GetFileName.
1025            (SessionLoader): Added support for loading projection tags that
1026            appear inside a layer.
1027    
1028            * Thuban/Model/proj.py (ProjFile): Document the class. Move
1029            back to using a list because the order of the projections in
1030            the file is important to maintain. Fixes RTbug #1817.
1031    
1032            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1033            to ProjFile.GetFilename.
1034    
1035            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1036            information.
1037    
1038            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1039            ProjFrame._OnSaveAs. Removed old dead code from previous
1040            implementation.
1041            (ProjFrame._OnExport): Add support for exporting more than one
1042            projection to a single file.
1043            (ProjFrame.__FillAvailList): use string formatting (% operator)
1044            to build strings that are (partly) translated. Fixes RTbug #1818.
1045    
1046            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1047            class.
1048    
1049    2003-04-24  Bernhard Herzog  <[email protected]>
1050    
1051            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1052    
1053            * po/fr.po: New. French translation by Daniel Calvelo Aros
1054    
1055            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1056            empty strings.
1057    
1058    2003-04-24  Jonathan Coles   <[email protected]>
1059    
1060            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1061            implement the interface that the ProjFrame dialog expects.
1062    
1063            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1064            name of the projection to be changed.
1065            (ProjFile): Use a dictionary instead of a list so that removing
1066            projections is easier and we are sure about uniqueness.
1067            (ProjFile.Remove): Remove the given projection object.
1068    
1069            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1070            Return a list with only one projection file instead of searching for
1071            any projection file. This simplifies many things if the user can
1072            only have one system file and one user file.
1073    
1074            * Thuban/UI/classgen.py: Change all references to
1075            genCombo to genChoice.
1076    
1077            * Thuban/UI/mainwindow.py: Add a Projection option under the
1078            layer menu.
1079            (MainWindow.LayerProjection): New. Open up a projection window
1080            for a layer.
1081    
1082            * Thuban/UI/projdialog.py: Large changes to how the dialog is
1083            laid out. Use three panels instead of one. One for the list of
1084            projections, one for the edit controls, and one for the buttons.
1085            Fixed resizing problems so that the dialog resizes correctly
1086            when the projection panel changes. Added import/export, save, and
1087            new buttons/functionality.
1088    
1089    2003-04-24  Bernhard Herzog  <[email protected]>
1090    
1091            First step towards table management. Introduce a simple data
1092            abstraction so that we replace the data a layer uses more easily
1093            in the next step.
1094    
1095            * Thuban/Model/data.py: New file with a simple data abstraction
1096            that bundles shapefile and dbffile into one object.
1097    
1098            * Thuban/Model/session.py (Session.OpenShapefile): New method to
1099            open shapefiles and return a shape store object
1100    
1101            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1102            object instead of a shapefile filename. This introduces a new
1103            instance variable store holding the datastore. For intermediate
1104            backwards compatibility keep the old instance variables.
1105            (open_shapefile): Removed. No longer needed with the shape store.
1106            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1107            get the shape store used by a layer.
1108            (Layer.Destroy): No need to explicitly destroy the shapefile or
1109            table anymore.
1110    
1111            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1112            (MainWindow.AddLayer): Use the session's OpenShapefile method to
1113            open shapefiles
1114    
1115            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1116            session's OpenShapefile method to open shapefiles
1117    
1118            * test/test_classification.py
1119            (TestClassification.test_classification): Use the session's
1120            OpenShapefile method to open shapefiles and build the filename in
1121            a more platform independed way
1122    
1123            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1124            Implement to have a session to use in the tests
1125            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1126            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1127            session's OpenShapefile method to open shapefiles
1128            (TestLayerLegend.setUp): Instantiate a session so that we can use
1129            it to open shapefiles.
1130            (TestLayerLegend.tearDown): Make sure that all references to
1131            layers and session are removed otherwise we may get a resource
1132            leak
1133    
1134            * test/test_map.py (TestMapAddLayer.test_add_layer)
1135            (TestMapWithContents.setUp): Instantiate a session so that we can
1136            use it to open shapefiles.
1137            (TestMapWithContents.tearDown): Make sure that all references to
1138            layers, maps and sessions are removed otherwise we may get a
1139            resource leak
1140            ("__main__"): use support.run_tests() so that more info about
1141            uncollected garbage is printed
1142    
1143            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1144            session's OpenShapefile method to open shapefiles
1145            ("__main__"): use support.run_tests() so that more info about
1146            uncollected garbage is printed
1147    
1148            * test/test_selection.py (TestSelection.tearDown): Make sure that
1149            all references to the session and the selection are removed
1150            otherwise we may get a resource leak
1151            (TestSelection.get_layer): Instantiate a session so that we can
1152            use it to open shapefiles.
1153            ("__main__"): use support.run_tests() so that more info about
1154            uncollected garbage is printed
1155    
1156            * test/test_session.py (TestSessionBase.tearDown)
1157            (TestSessionWithContent.tearDown): Make sure that all references
1158            to the session and layers are removed otherwise we may get a
1159            resource leak
1160            (TestSessionWithContent.setUp): Use the session's OpenShapefile
1161            method to open shapefiles
1162    
1163    2003-04-24  Jonathan Coles   <[email protected]>
1164    
1165            * Thuban/Model/load.py (XMLReader.read): Should have been checking
1166            if the file_or_filename object had the 'read' attribute.
1167    
1168    2003-04-23  Jonathan Coles   <[email protected]>
1169    
1170            * Thuban/Model/resource.py: Fixes RTbug #1813.
1171            (ReadProjFile): Add documentation about which exceptions are raised.
1172            Always pass the exceptions up to the caller.
1173            (GetProjFiles): If the directory can't be read return an empty list.
1174            If any of the proj files can't be read skip that file and go
1175            on to the next one.
1176    
1177            * test/test_proj.py: Added test cases to handle nonexistent files,
1178            unreadable files, and files that don't parse correctly.
1179    
1180    2003-04-23  Jonathan Coles   <[email protected]>
1181    
1182            Projection dialog. Allows the user to select from a list
1183            of projection templates and optionally edit them and save new ones.
1184    
1185            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1186            (ProjPanel): Base class for projection specific panels.
1187            (TMPanel): Projection panel for Transverse Mercartor.
1188            (UTMPanel): Projection panel for Universal Transverse Mercartor.
1189            (LCCPanel): Projection panel for Lambert Conic Conformal.
1190            (GeoPanel): Projetion panel for Geographic Projection.
1191    
1192    2003-04-23  Jonathan Coles   <[email protected]>
1193    
1194            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1195            promote symmetry. There now exists XMLReader and XMLWriter.
1196            (XMLReader.read): New. Call to read the given file descriptor or
1197            filename.
1198            (XMLReader.close): New. Make sure the file is closed.
1199            (XMLReader.GetFileName): New. Return just the file name that is being
1200            read from.
1201            (XMLReader.GetDirectory): New. Return just the directory of the file
1202            that is being read.
1203            (XMLReader.AddDispatchers): New. Take a dictionary which contains
1204            the names of functions to call as the XML tree is parsed.
1205            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1206            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1207            (SessionLoader): Removed class variables start_dispatcher and
1208            end_dispatcher since this functionality is now part of a class
1209            instance. Fixes RTbug #1808.
1210            (SessionLoader.__init__): Add dispatcher functions.
1211            (load_xmlfile): Code was moved into the XMLReader.read().
1212            (load_session): Use modified SessionLoader.
1213    
1214            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1215            map's projection.
1216    
1217            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1218            GetAllParameters.
1219            (Projection.GetParameter): Returns the value for the given parameter.
1220    
1221            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1222            (GetProjFiles): Renamed from GetProjections. Now returns a list
1223            of ProjFile objects.
1224            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1225            a list of ProjFile objects whose files are not user defined.
1226            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1227            list of ProjFile objects whose files are user defined.
1228            (ProjFileReader): Extend new XMLReader.
1229    
1230            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1231            promote symmetry.
1232    
1233            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1234            control instead of a wxComboBox. wxChoice controls do not generate
1235            events as the uses highlights possible choices which fixes problems
1236            with resizing the dialog when the use selects an option.
1237    
1238            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1239            control instead of a wxComboBox.
1240    
1241            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1242            dialog.
1243    
1244            * test/test_proj.py (TestProjection.test): New tests for GetParameter
1245            method.
1246    
1247    2003-04-22  Bernhard Herzog  <[email protected]>
1248    
1249            * Thuban/UI/mainwindow.py: Remove some unused imports and global
1250            constants
1251    
1252            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1253            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1254    
1255    2003-04-17  Bernhard Herzog  <[email protected]>
1256    
1257            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1258            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1259            anymore.
1260            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1261            (Layer.ShapeType, Layer.Shape): No need to call
1262            self.open_shapefile since it's always called in __init__
1263    
1264            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1265            In wxPython 2.4 there's no need to extend MainLoop anymore since
1266            wxPython itself makes sure OnExit is called.
1267    
1268    2003-04-16  Jonathan Coles   <[email protected]>
1269    
1270            Initial putback of projection management code. Includes new
1271            classes to read and write projection files. The current load
1272            and save classes were abstracted a bit so they could be reused.
1273            The Projection class was extended to provide new methods and
1274            have a name.
1275    
1276            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1277            general XML reading methods that were part of ProcessSession.
1278    
1279            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1280            name.
1281            (ProjFile): New. Represents a file that contains projection
1282            information.
1283    
1284            * Thuban/Model/resource.py: New. Contains general utilities
1285            for read and writing projection files.
1286    
1287            * Thuban/Model/save.py (XMLSaver): New. Contains all the
1288            general XML writing methods that were part of SessionSaver.
1289            (SessionSaver): Renamed from Saver.
1290    
1291            * test/test_proj.py: New test cases for the projection
1292            file read and write functions.
1293    
1294    2003-04-16  Jonathan Coles   <[email protected]>
1295    
1296            * Thuban/Model/classification.py: Use repr() around values
1297            in the ClassGroup*.__repr__() methods so it is clearer when
1298            a value is a string and when it is a number.
1299    
1300            * test/test_load.py: Rework the classification test to test
1301            that we can load old files.
1302            (testLabels): Test a file where the groups have labels.
1303    
1304    2003-04-16  Bernhard Herzog  <[email protected]>
1305    
1306            Safer implementation of the performance enhancements of the
1307            low-level renderer:
1308            
1309            * extensions/thuban/wxproj.cpp (extract_projection)
1310            (extract_pointer): Rename extract_projection to extract_pointer
1311            and redefine its purpose to return the pointer stored in a CObject
1312            returned by the object's cobject method. Update all callers.
1313            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1314            handling of these low-level parameters so that each s_draw_info
1315            instance is handled as a CObject at python level that also
1316            contains real references to the actual python objects which
1317            contain the values in the struct. Add free_draw_info as the
1318            destructor.
1319            (draw_polygon_shape): Add the py_draw_info parameter which must a
1320            cobject containing an s_draw_info pointer.
1321    
1322            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1323            method to instantiat the low-level render parameter
1324            (MapRenderer.draw_shape_layer): Use the new method. Remove some
1325            commented out code.
1326            (MapRenderer.draw_polygon_shape): Make the first parameter not the
1327            layer but the low-level render parameter
1328            (ScreenRenderer.draw_shape_layer): Use the low-level render
1329            parameter.
1330    
1331    2003-04-15  Jonathan Coles   <[email protected]>
1332    
1333            * Thuban/Model/classification.py: Implemented __repr__ for
1334            the ClassGroup* classes to make debugging a bit easier.
1335            (ClassGroup.SetLabel): Check that the string is an instance
1336            of StringTypes not StringType. Accounts for Unicode strings.
1337    
1338            * Thuban/Model/color.py: Implemented __repr__ to make
1339            debugging a bit easier.
1340    
1341            * Thuban/Model/save.py (Saver.write_classification): Need to
1342            save the group label.
1343    
1344            * test/test_load.py (testClassification): New. Loads the
1345            iceland_sample_test.thuban file and checks if it was loaded
1346            correctly.
1347    
1348    2003-04-15  Jonathan Coles   <[email protected]>
1349    
1350            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1351            to improve rendering performance by initializing the variables
1352            that are not change each time draw_polygon_shape() is called.
1353            The values are stored in a global struct draw_info.
1354            (draw_polygon_shape): Removed initialization code that is
1355            now in draw_polygon_init().
1356    
1357            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1358            drawing initialization call to draw_polygon_init()
1359            (MapRenderer.draw_polygon_shape): Use new signature of
1360            draw_polygon_shape.
1361    
1362            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1363            weirdness by setting the range to (1, maxint).
1364    
1365            * Thuban/Model/classification.py (ClassGroupProperties): Make
1366            instance variables private and optimize comparison operator
1367            by first checking if the color references are the same.
1368            (ClassGroupSingleton): Make instance variables private.
1369            (ClassGroupRange): Make instance variables private.
1370    
1371            * HOWTO-Release: Filled in missing steps for releasing packages.
1372    
1373    2003-04-15  Bernhard Herzog  <[email protected]>
1374    
1375            First stab at internationalized messages:
1376    
1377            * Thuban/__init__.py (_): Implement the translation function for
1378            real using the python gettext module.
1379    
1380            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1381            translate empty strings.
1382    
1383            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1384            Add a missing space to a warning message
1385    
1386            * po/README: New. Notes about the management of the translation
1387            files.
1388    
1389            * po/Makefile: New. Makefile to help manage the translation files.
1390    
1391            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1392    
1393            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1394            translations and support files in po/
1395    
1396            * setup.py (data_files): Add the *.mo files to the data_files too
1397    
1398            * README: Add note about the translations when building from CVS
1399    
1400    2003-04-14  Jonathan Coles   <[email protected]>
1401    
1402            * Thuban/UI/dock.py: Fixes some window resizing problems most
1403            noticable under windows. Always assume the button bitmaps will
1404            be there. Code clean up.
1405            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1406            images for the dock/undock button to the same images.
1407            Work around for RTbug #1801.
1408    
1409            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1410            be allowed to grow within the sizer. Fixes a bug under Windows
1411            where the toolbar wasn't being drawn.
1412    
1413    2003-04-14  Frank Koormann   <[email protected]>
1414    
1415            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1416            Updated design to try to make the button functionality more
1417            transparent.
1418    
1419    2003-04-14  Jonathan Coles   <[email protected]>
1420    
1421            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1422            finalize the intialization of the panel.
1423    
1424            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1425            creation of the panel. Should be the last thing called in the
1426            initializer of a subclass.
1427    
1428            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1429            set the current selections in the combo boxes. This is needed
1430            under Windows.
1431    
1432            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1433            level panel to the dialog so that the background colors are
1434            consistent under Windows.
1435    
1436    2003-04-11  Jonathan Coles   <[email protected]>
1437    
1438            * Thuban/UI/classgen.py: Change color ramps to start at white
1439            not black.
1440    
1441            * Thuban/UI/legend.py: Enable/disable the legend buttons when
1442            the legend changes. Fixes RTbug #1793.
1443    
1444            * test/test_classification.py: Added test for copying of
1445            classifications.
1446    
1447    2003-04-11  Jonathan Coles   <[email protected]>
1448    
1449            * Thuban/UI/resource.py: New. Centralize the loading of resources
1450            such as bitmaps.
1451    
1452            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1453            added images to the move buttons, added 'reverse' button.
1454            (CustomRampPanel.__init__): Added images to the move buttons.
1455            (GreyRamp): New. Generates a ramp from white to black.
1456            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1457    
1458            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1459            ID_PROPERTY_*.
1460            (Classifier.__init__): Minor changes to the layout.
1461            (Classifier._OnTitleChanged): Listen for when the user edits the
1462            title and update the dialog's title and the layer's title.
1463    
1464            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1465    
1466            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1467            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1468            if the layer's title changes.
1469    
1470            * Thuban/UI/mainwindow.py: Added new menu item and associated code
1471            to open a dialog to rename the map.
1472            (MainWindow): Use new resource class to import bitmaps.
1473    
1474    2003-04-11  Jonathan Coles   <[email protected]>
1475    
1476            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1477            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1478            Resources/Bitmaps/group_use_none.xpm,
1479            Resources/Bitmaps/group_use_not.xpm,
1480            Resources/Bitmaps/hide_layer.xpm,
1481            Resources/Bitmaps/layer_properties.xpm,
1482            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1483            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1484            New.
1485    
1486    2003-04-10  Jonathan Coles   <[email protected]>
1487    
1488            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1489            Should pass group to ClassGroup constructor.
1490    
1491    2003-04-10  Jonathan Coles   <[email protected]>
1492    
1493            * Thuban/Model/classification.py: (ClassGroup): Move all the common
1494            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1495            here. Implement SetVisible(), IsVisible().
1496            (ClassGroup.__init__): Add group parameter which acts as a copy
1497            constructor.
1498    
1499            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1500            "Visible" check boxes.
1501            (Classifier): Rename the buttons and refactor the code to match
1502            the new labels.
1503    
1504            * Thuban/UI/legend.py: Classify button is now called "Properties".
1505            Refactored the code to change variable names.
1506            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1507    
1508            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1509            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1510            renamed to MainWindow.LayerEditProperties.
1511            (MainWindow.ToggleLegend): Don't include map name in legend title.
1512            (MainWindow.SetMap): Added the map name to the window title.
1513            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1514            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1515            Functionality is found in the layer properties dialog.
1516    
1517            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1518            draw visible groups.
1519    
1520    2003-04-09  Jonathan Coles   <[email protected]>
1521    
1522            * Thuban/UI/classgen.py: Modifications to allow simple
1523            addition and selection of new color schemes.
1524            (MonochromaticRamp): New. Generates a ramp between two colors.
1525            (RedRamp): New. Generates a ramp of all red.
1526            (GreenRamp): New. Generates a ramp of all green.
1527            (BlueRamp): New. Generates a ramp of all blue.
1528    
1529    2003-04-09  Jonathan Coles   <[email protected]>
1530    
1531            * Thuban/Model/classification.py (Classification.__deepcopy__):
1532            Need to copy over field and fieldType attributes.
1533    
1534            * Thuban/Model/table.py (Table.field_range): New. Retrive the
1535            maximum and minimum values over the entire table for a given
1536            field.
1537            (Table.GetUniqueValues): New. Retrieve all the unique values
1538            in the table for a given field.
1539    
1540            * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1541            (GenUniquePanel): New. Controls to allow the user to select
1542            which unique field values they would like in the classification.
1543            (CustomRampPanel): Code that was in ClassGenDialog that allows
1544            the user to select the properties for a custom ramp.
1545            (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1546    
1547            * Thuban/UI/classifier.py: Removed a lot of debugging code.
1548            (Classifier._SetClassification): Callback method so that the
1549            class generator can set the classification in the grid.
1550            (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1551            editing of a group properties class into a wxWindows control.
1552    
1553            * Thuban/UI/dock.py: It was decided that if the user closes
1554            a dockable window the window should simply hide itself. That
1555            way if the user wants to show the dock again it appears in the
1556            same place as it was when it was closed.
1557            (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1558            (DockableWindow._OnButtonClose): Hide the window instead of
1559            destroying it.
1560            (DockableWindow._OnClose): Hide the window instead of
1561            destroying it.
1562    
1563            * Thuban/UI/legend.py (LegendTree): Use a private method to
1564            consistently set the font and style of the text. Fixes RTbug #1786.
1565    
1566            * Thuban/UI/mainwindow.py: Import just the Classifier class.
1567    
1568    2003-04-07  Bernhard Herzog  <[email protected]>
1569    
1570            * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1571            to the map module
1572    
1573    2003-04-07  Bernhard Herzog  <[email protected]>
1574    
1575            * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1576            favor of ToggleSessionTree
1577            (MainWindow.ToggleSessionTree): New method to toggle visibility of
1578            the session tree.
1579            (MainWindow.SessionTreeShown): New method to return whether the
1580            session tree is currently shown.
1581            (MainWindow.ToggleLegend): New method to toggle visibility of the
1582            legend
1583            (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1584            LegendShown
1585            (MainWindow.LegendShown): New method to return whether the legend
1586            is currently shown.
1587            (_method_command): Add checked parameter so we can define check
1588            menu items
1589            (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1590            mainwindow methods.
1591            (show_session_tree, show_legend commands): Removed.
1592            (toggle_session_tree, toggle_legend commands): New commands to
1593            toggle the visibility of the dialogs
1594    
1595    2003-04-07  Jonathan Coles   <[email protected]>
1596    
1597            * Thuban/UI/classgen.py: Fix Windows problem.
1598    
1599            * Thuban/UI/dock.py: Fix Windows problem.
1600    
1601            * Thuban/UI/mainwindow.py: Use False instead of false.
1602            (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1603    
1604    2003-04-07  Jonathan Coles   <[email protected]>
1605    
1606            Since we now say that the order of the groups in a classification
1607            matters, it makes sense to be able to manipulate that order. Most
1608            of the changes to Thuban/Model/classification.py are to that end.
1609    
1610            * Thuban/Model/classification.py (Classification.AppendGroup,
1611            Classification.InsertGroup, Classification.ReplaceGroup,
1612            Classification.RemoveGroup, Classification.GetGroup): Do as the
1613            names imply.
1614            (Classification.FindGroup): This was called GetGroup, but GetGroup
1615            takes an index, while FindGroup takes a value.
1616            (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1617            REFERENCE. Currently there is a cyclic reference between the layer
1618            and its classification. If the classification doesn't need to know
1619            its owning layer we can change this, since it may make sense to be
1620            able to use the same classification with different layers.
1621    
1622            * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1623    
1624            * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1625            not AddGroup()
1626    
1627            * Thuban/UI/classifier.py: Now that we can depend on the order in
1628            a Classification and have methods to manipulate that order we don't
1629            need to use our own data structures in the grid. We can simply make
1630            the grid/table access the information they need from a copy of
1631            the classification object.
1632            (Classifier._OnCloseBtn): Event handler for when the user clicks
1633            'Close'. This is needed so if the user applies changes and then
1634            continues to change the table the user has the option of discarding
1635            the most recent changes and keeping what they applied.
1636    
1637            * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1638            into the same group.
1639    
1640            * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1641            with a really old version of proj, PJ_VERSION won't even be defined.
1642            If it isn't defined then just compile so that the function always
1643            returns Py_False.
1644    
1645            * test/test_classification.py: Fix tests to use the renamed methods.
1646            Still need to write tests for the new methods.
1647    
1648    2003-04-04  Jonathan Coles   <[email protected]>
1649    
1650            * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1651            call to SetSelection out of the method and before the call
1652            to __SelectField in __init__. This prevents a recursion of events
1653            when _OnFieldSelect is triggered by the user.
1654    
1655    2003-04-04  Jonathan Coles   <[email protected]>
1656    
1657            * Thuban/Model/classification.py: Rename Color.None to
1658            Color.Transparent.
1659            (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1660            Don't bother copying the color, since Colors are immutable.
1661    
1662            * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1663            Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1664            Thuban/UI/renderer.py, Thuban/UI/view.py:
1665            Rename Color.None to Color.Transparent.
1666        
1667            * test/test_classification.py, test/test_load.py: Rename Color.None
1668            to Color.Transparent.
1669    
1670    2003-04-04  Jonathan Coles   <[email protected]>
1671    
1672            * Thuban/Model/classification.py: Fix assert calls.
1673            (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1674            Copy the color parameter rather than hold onto a reference.
1675    
1676            * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1677            the color object.
1678            (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1679            are sure there exists only one refernce to Color.None in the system.
1680            This allows us to use 'is' rather than the comparision functions.
1681            
1682            * Thuban/Model/save.py: Fix assert calls.
1683            
1684            * Thuban/UI/classifier.py: Fix assert calls.
1685            (ClassGrid._OnCellDClick): Call up to the classifier to open the
1686            dialog to edit the groups properties.
1687            (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1688            correctly if a cell is resized.
1689            (ClassTable.SetClassification): New. Changes the classification
1690            that is in the table.
1691            (ClassTable.__SetRow): Allow groups to be prepended.
1692            (Classifier): New code for opening the EditProperties and
1693            GenerateRanges dialogs.
1694            (SelectPropertiesDialog.__GetColor): Only set the color in the
1695            color dialog if the current color is not None.
1696            
1697            * Thuban/UI/dock.py: Fix assert calls.
1698            
1699            * Thuban/UI/legend.py: Fix assert calls.
1700            
1701            * Thuban/UI/renderer.py: Fix assert calls.
1702            
1703            * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1704            classifications.
1705            (GenRangePanel): Panel specific to range generation.
1706            (GenSingletonPanel): Panel specific to singleton generation.
1707            (ClassGenerator): Class responsible for actually generating
1708            the classification from the data gathered in the dialog box.
1709            (PropertyRamp): Generates properties whose values range from
1710            a starting property to an ending property.
1711    
1712    2003-04-03  Bernhard Herzog  <[email protected]>
1713    
1714            * test/support.py (print_garbage_information): New function that
1715            prints information about still connected messages and memory
1716            leaks.
1717            (run_suite): Removed.
1718            (run_tests): New function for use as a replacement of
1719            unittest.main in the test_* files. This one calls
1720            print_garbage_information at the end.
1721    
1722            * test/runtests.py (main): Use support.print_garbage_information
1723    
1724            * test/test_layer.py: Use support.run_tests instead of
1725            unittest.main so we get memory leak information
1726            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1727            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1728            (TestLayerLegend.test_visibility): Call the layer's Destroy method
1729            to fix a memory leak.
1730    
1731            * test/test_classification.py: Use support.run_tests instead of
1732            unittest.main so we get memory leak information
1733            (TestClassification.test_classification): Call the layer's Destroy
1734            method to fix a memory leak.
1735    
1736    2003-04-02  Bernhard Herzog  <[email protected]>
1737    
1738            * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1739            Handle the reference counts of the return value and errors in
1740            PyArg_ParseTuple correctly.
1741    
1742            * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1743            sure the filename is absolute to avoid problems when saving the
1744            session again
1745    
1746            * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1747    
1748    2003-04-01  Jonathan Coles   <[email protected]>
1749    
1750            *  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1751            that there actually are points in the returned list of points
1752            before trying to index into the list. The list may be empty if
1753            the shape is a Null Shape.
1754    
1755    2003-04-01  Bernhard Herzog  <[email protected]>
1756    
1757            * test/test_map.py: Don't use from <module> import *
1758    
1759    2003-04-01  Jonathan Coles   <[email protected]>
1760    
1761            * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1762            LAYER_LEGEND_CHANGED
1763    
1764            * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1765            self.Destroy() to close the window after yesterday's changes.
1766    
1767            * test/test_map.py, test/test_session.py: Fix messages that
1768            are sent from maps and layers.
1769    
1770    2003-03-31  Jonathan Coles   <[email protected]>
1771    
1772            * Thuban/UI/classifier.py: Commented out some debugging statements.
1773            (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
1774            RTbug #1769.
1775    
1776            * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
1777            position (although position doesn't work yet under GTK).
1778            (DockableWindow.Destroy): New. Called when the window must be
1779            closed. Namely needed when the DockFrame closes and must close
1780            its children.
1781            (DockFrame): Listen for EVT_CLOSE and destroy all children.
1782    
1783            * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
1784            when then window is told to close.
1785            (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
1786            comment in source for more info.
1787    
1788            * Thuban/UI/main.py: Show the legend by default when Thuban starts.
1789    
1790            * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
1791            symmetry with other such methods.
1792            (MainWindow.ShowLegend): Show the legend docked by default.
1793    
1794    2003-03-28  Jonathan Coles   <[email protected]>
1795    
1796            * Thuban/UI/classifier.py: Support for highlighting a specific
1797            group within the grid when the classification dialog is opened.
1798            Also contains a lot of debugging printouts which will later
1799            be removed.
1800    
1801            * Thuban/UI/dock.py: Complete rework on the dock code so that
1802            that it is fairly removed from the rest of the Thuban application.
1803            It is easy to add new docks which the rest of the program having
1804            to be aware of them.
1805    
1806            * Thuban/UI/legend.py: Modifications to support selecting a
1807            specific group in the classification dialog. Changed how layers
1808            are drawn when the layer is visible/invisible.
1809    
1810            * Thuban/UI/mainwindow.py: Removed legend specific code and
1811            replaced it with calls to the new dock code.
1812    
1813            * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
1814            to check if scale > 0. Trying to track down a divide by zero.
1815    
1816    2003-03-26  Jonathan Coles   <[email protected]>
1817    
1818            * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
1819            (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
1820            now part of DockableWindow.
1821            (LegendPanel.DoOnSelChanged): Select the current layer in the
1822            map.
1823            (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
1824            with the selected layer and/or group.
1825    
1826    2003-03-26  Jonathan Coles   <[email protected]>
1827    
1828            This putback contains the code for dockable windows. There is
1829            no support in wxWindows as of this date for windows that can
1830            attach themselves to other windows.
1831    
1832            The current model contains a DockableWindow which has a parent
1833            window for when it is detached and a dock window that it puts
1834            its contents in when it is docked. The contents of a DockableWindow
1835            must be a DockPanel. DockPanel itself derives from wxPanel.
1836    
1837            * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
1838            message, not a LAYER_LEGEND_CHANGED message.
1839    
1840            * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
1841    
1842            * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
1843            as one of the style properties for the fieldTypeText item to
1844            be sure that its size is correct when the text changes.
1845    
1846            * Thuban/UI/dock.py: New. Classes for the DockPanel and
1847            DockableWindow.
1848    
1849            * Thuban/UI/legend.py: Added some more buttons and made the
1850            LegendPanel a DockPanel.
1851    
1852            * Thuban/UI/mainwindow.py: Added sash windows to the main window
1853            and supporting functions for manipulating the sashes.
1854            (MainWindow.ShowLegend): Create a DockableWindow with the
1855            LegendPanel as the contents.
1856    
1857            * Thuban/UI/messages.py: Added DOCKABLE_* messages
1858    
1859            * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
1860            not LAYER_LEGEND_CHANGED, messages.
1861    
1862    2003-03-25  Jonathan Coles   <[email protected]>
1863    
1864            * setup.py: Added custom script bdist_rpm_build_script so that
1865            when the rpm is built the path to wx-config is correct.
1866    
1867            * setup.cfg: Added line saying to use the custom build script
1868    
1869    2003-03-20  Jonathan Coles   <[email protected]>
1870    
1871            Initial implementation of the Legend.
1872    
1873            * Thuban/UI/legend.py: New. Creates a window that shows the map's
1874            Legend information and allows the user to add/modify classifications
1875            and how the layers are drawn on the map.
1876    
1877            * setup.py: New command 'build_docs' which currently uses
1878            happydoc to generate html documentation for Thuban.
1879    
1880            * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
1881            Returns a string which is appropriately describes the group.
1882    
1883            * Thuban/Model/layer.py (Layer.SetClassification): Generate a
1884            LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
1885    
1886            * Thuban/Model/map.py (Map): Rename messages and use new, more
1887            specific, messages.
1888    
1889            * Thuban/Model/messages.py: New message to indicate that a layer's
1890            data has changed (LAYER_CHANGED). New map messages to indicate
1891            when layers have been added/removed/changed or if the stacking order
1892            of the layers has changed.
1893    
1894            * Thuban/Model/session.py: Rename and use new messages.
1895    
1896            * Thuban/UI/classifier.py: Remember if any changes have actually
1897            been applied so that if the dialog is cancelled without an application
1898            of changes we don't have to set a new classification.
1899            (ClassDataPreviewer): Pulled out the window specific code and put it
1900            ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
1901            symbols on any DC.
1902            
1903            * Thuban/UI/mainwindow.py: New code to open the legend.
1904    
1905            * Thuban/UI/view.py: Use new message names.
1906    
1907    2003-03-19  Jonathan Coles   <[email protected]>
1908    
1909            * Thuban/UI/main.py (verify_versions): New. Checks the versions
1910            of Python, wxPython, and some other libraries.
1911    
1912            * extensions/thuban/wxproj.cpp (check_version): Checks the given
1913            version against what wxproj was compiled with.
1914            (check_version_gtk): If wxproj was compiled with gtk then check
1915            the given version against the version of the gtk library
1916            currently being used.
1917    
1918    2003-03-14  Bernhard Herzog  <[email protected]>
1919    
1920            * test/test_command.py: Run the tests when the module is run as a
1921            script
1922    
1923    2003-03-14  Bernhard Herzog  <[email protected]>
1924    
1925            Implement selection of multiple selected shapes in the same layer:
1926    
1927            - Introduce a new class to hold the selection. This basically
1928              replaces the interactor which was nothing more than the
1929              selection anyway. A major difference is of course that the new
1930              selection class supports multiple selected shapes in one layer
1931            
1932            - Move the object that represents the selection from the
1933              application to the canvas. The canvas is a better place than the
1934              application because the selection represents which shapes and
1935              layer of the map displayed by the canvas are selected and
1936              affects how the map is drawn.
1937    
1938            - Make the selection and its messages publicly available through
1939              the mainwindow.
1940    
1941            - The non-modal dialogs do not get a reference to the interactor
1942              anymore as they can simply refer to their parent, the
1943              mainwindow, for the what the interactor had to offer.
1944    
1945            * Thuban/UI/selection.py: New module with a class to represent the
1946            selection.
1947    
1948            * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
1949            these unused messages
1950    
1951            * Thuban/UI/application.py (ThubanApplication.OnInit)
1952            (ThubanApplication.OnExit, ThubanApplication.SetSession): The
1953            interactor is gone now.
1954            (ThubanApplication.CreateMainWindow): There is no interactor
1955            anymore so we pass None as the interactor argument for now for
1956            compatibility.
1957    
1958            * Thuban/UI/view.py (MapCanvas.delegated_messages)
1959            (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
1960            Unsubscribe, delegate messages according to the delegated_messages
1961            class variable.
1962            (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
1963            attributes from instance variables as described with the
1964            delegated_methods class variable.
1965            (MapCanvas.__init__): New instance variable selection holding the
1966            current selection
1967            (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
1968            pass them on to the renderer
1969            (MapCanvas.SetMap): Clear the selection when a different map is
1970            selected.
1971            (MapCanvas.shape_selected): Simple force a complete redraw. The
1972            selection class now takes care of only issueing SHAPES_SELECTED
1973            messages when the set of selected shapes actually does change.
1974            (MapCanvas.SelectShapeAt): The selection is now managed in
1975            self.selection
1976    
1977            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
1978            (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
1979            Unsubscribe, delegate messages according to the delegated_messages
1980            class variable.
1981            (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
1982            attributes from instance variables as described with the
1983            delegated_methods class variable.
1984            (MainWindow.__init__): The interactor as ivar is gone. The
1985            parameter is still there for compatibility. The selection messages
1986            now come from the canvas.
1987            (MainWindow.current_layer, MainWindow.has_selected_layer):
1988            Delegate to the the canvas.
1989            (MainWindow.LayerShowTable, MainWindow.Classify)
1990            (MainWindow.identify_view_on_demand): The dialogs don't need the
1991            interactor parameter anymore.
1992    
1993            * Thuban/UI/tableview.py (TableFrame.__init__)
1994            (LayerTableFrame.__init__, LayerTableFrame.OnClose)
1995            (LayerTableFrame.row_selected): The interactor is gone. It's job
1996            from the dialog's point of view is now done by the mainwindow,
1997            i.e. the parent. Subscribe to SHAPES_SELECTED instead
1998            of SELECTED_SHAPE
1999            
2000            * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
2001            is gone. It's job from the dialog's point of view is now done by
2002            the mainwindow, i.e. the parent.
2003            
2004            * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
2005            gone. It's job from the dialog's point of view is now done by the
2006            mainwindow, i.e. the parent.
2007    
2008            * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
2009            gone. It's job from the dialog's point of view is now done by the
2010            mainwindow, i.e. the parent.
2011            (SessionTreeCtrl.__init__): New parameter mainwindow which is
2012            stored as self.mainwindow. The mainwindow is need so that the tree
2013            can still subscribe to the selection messages.
2014            (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
2015            (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
2016            selection is now accessible through the mainwindow. Subscribe to
2017            SHAPES_SELECTED instead of SELECTED_SHAPE
2018    
2019            * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
2020            SHAPES_SELECTED message now.
2021            (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
2022            so deal with multiple shapes
2023            (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
2024            gone. It's job from the dialog's point of view is now done by the
2025            mainwindow, i.e. the parent.
2026    
2027            * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
2028            parameter is now a list of shape ids.
2029            (RecordTable.SetTable): The second parameter is now a list of
2030            indices.
2031    
2032            * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
2033            selected_shape parameter and ivar to selected_shapes. It's now a
2034            list of shape ids.
2035            (MapRenderer.draw_label_layer): Deal with multiple selected
2036            shapes. Rearrange the code a bit so that the setup and shape type
2037            distinctions are only executed once.
2038    
2039            * test/test_selection.py: Test cases for the selection class
2040    
2041    2003-03-11  Jonathan Coles   <[email protected]>
2042    
2043            * Thuban/Model/load.py: Temporary fix so that the xml reader
2044            doesn't cause Thuban to crash.
2045    
2046            * Thuban/Model/layer.py: Handle the cyclic references between
2047            a layer and its classification better, and be sure to disconnect
2048            the classification from the layer when the layer is destroyed
2049            so that we don't maintain a cyclic reference that may not be
2050            garbage collected.
2051    
2052            * Thuban/Model/classification.py: See comment for layer.py.
2053    
2054    2003-03-12  Jan-Oliver Wagner <[email protected]>
2055    
2056            * HOWTO-Release: New. Information on the steps for releasing
2057            a new version of Thuban.
2058    
2059    2003-03-11  Jonathan Coles   <[email protected]>
2060    
2061            * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
2062            Use True instead of true.
2063            (Classifier): Should have a single panel in which all the controls lie.
2064    
2065            * Thuban/UI/proj4dialog.py: Add normal border.
2066    
2067            * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
2068    
2069            * Thuban/UI/mainwindow.py: Use True instead of true.
2070    
2071            * setup.py: Update some definitions to use wxWindows2.4 files
2072    
2073            * Data/iceland_sample_class.thuban: Fixed file so that the
2074            field_type information is present.
2075    
2076    2003-03-10  Jonathan Coles   <[email protected]>
2077    
2078            * Thuban/UI/classifier.py (Classifier.__init__): Make the
2079            field type label grow so that when the text changes the
2080            size is updated correctly. This may be a wxWindows bug.
2081    
2082    2003-03-10  Jonathan Coles   <[email protected]>
2083    
2084            * Thuban/UI/application.py: Changed SESSION_CHANGED to
2085            SESSION_REPLACED.
2086    
2087            * Thuban/UI/classifier.py: Wrap text with _().
2088            (ClassGrid.CreateTable): Set dimensions and size hints here,
2089            instead of in Reset, so we only set the size once.
2090    
2091            * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
2092    
2093            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2094            Call Close() instead of Shutdown().
2095    
2096            * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2097    
2098            * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2099            Go back to using OnClose() instead of Shutdown().
2100    
2101    2003-03-10  Jonathan Coles   <[email protected]>
2102    
2103            * Thuban/UI/classifier.py (Classifier): SelectField() needed
2104            to know the old field index as well as the new one.
2105    
2106    2003-03-10  Jonathan Coles   <[email protected]>
2107    
2108            * Thuban/UI/classifier.py (Classifier): Use __SelectField()
2109            to correctly set the table information and call this from
2110            __init__ and from _OnFieldSelect so that all the information
2111            is up to date when the dialog opens and when a field is changed.
2112    
2113    2003-03-10  Jonathan Coles   <[email protected]>
2114    
2115            * Thuban/Model/classification.py (Classification): Don't use
2116            layer's message function directly, use the ClassChanged() method
2117            when then classification changes. SetField/SetFieldType/SetLayer
2118            must keep the information about field name and field type in
2119            sync when an owning layer is set or removed.
2120    
2121            * Thuban/Model/layer.py: Added ClassChanged() so that the
2122            classification can tell the layer when its data has changed.
2123            (Layer.SetClassification): Accepts None as an arguement to
2124            remove the current classification and correctly handles
2125            adding a new classification.
2126    
2127            * Thuban/Model/load.py: Comment out print statement
2128    
2129            * test/test_classification.py, test/test_save.py: New and
2130            improved tests.
2131    
2132    2003-03-07  Jonathan Coles   <[email protected]>
2133    
2134            * Thuban/Model/classification.py: Implemented __copy__ and
2135            __deepcopy__ for ClassGroup* and ClassGroupProperites so
2136            they can easily be copied by the classifier dialog.
2137            (ClassGroupProperites.__init__): The default line color should
2138            have been Color.Black.
2139    
2140            * Thuban/UI/classifier.py: Setting and Getting table values now
2141            uses a consistent set of functions.
2142            (Classifier): Now non-modal. Has field type label which changes
2143            as the field changes. Keep track of buttons in a list so that
2144            we can enable/disable the buttons when the None field is selected.
2145            (SelectPropertiesDialog): Add buttons to make the colors transparent.
2146    
2147            * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
2148            does what OnClose did, but can be called by the application to
2149            close a window. Needed when a session changes, and we have to
2150            close the classifier windows.
2151    
2152            * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2153            Shuts down open dialogs. Used when a new session is created
2154            or a session is opened.
2155            (MainWindow.SaveSession): Should only call application.SaveSession()
2156            if we don't call SaveSessionAs first.
2157            (MainWindow.Classify): Allow different classifier dialogs for
2158            different layers.
2159    
2160            * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
2161            the parent class handle it. Add Shutdown() to unsubscibe from
2162            event notification and call the parent Shutdown(). This was
2163            necessary so the application can close the tree window.
2164    
2165    2003-03-06  Jonathan Coles   <[email protected]>
2166    
2167            * Thuban/Model/classification.py: Minor documentation changes,
2168            Addition of __eq__ and __ne__ methods.
2169            (Classification.SetLayer): prevent recursion between this method
2170            and Layer.SetClassification().
2171    
2172            * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
2173    
2174            * Thuban/Model/layer.py (SetClassification): prevent recursion
2175            between this method and Classification.SetLayer().
2176    
2177            * test/test_classification.py, test/test_load.py,
2178            test/test_session.py: Fixed and added tests for the classification
2179            classes.
2180    
2181    2003-03-06  Bernhard Herzog  <[email protected]>
2182    
2183            * Thuban/UI/classifier.py (ClassGrid.__init__)
2184            (ClassGrid.CreateTable): Move the SetSelectionMode call to
2185            CreateTable because otherwise it triggers an assertion in
2186            wxPython/wxGTK 2.4.
2187    
2188    2003-03-05  Jonathan Coles   <[email protected]>
2189    
2190            * Thuban/common.py: Move FIELDTYPE constants back to table.py.
2191    
2192            * Thuban/Model/load.py: import FIELDTYPE constants from table.
2193    
2194            * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
2195    
2196            * Thuban/Model/table.py: Put FIELDTYPE constants back.
2197    
2198    2003-03-05  Jonathan Coles   <[email protected]>
2199    
2200            * Thuban/UI/classifier.py: Added class documentation.
2201            Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
2202            Store just the groups in the table and generate the other
2203            column information when it is requested. Add "None" field
2204            to pull-down to select no classification.
2205    
2206            * Thuban/common.py: Moved FIELDTYPE constants from table.py
2207            (Str2Num): Only catch ValueError exceptions.
2208    
2209            * Thuban/Model/classification.py: Class documentation. Renaming
2210            of methods with Stroke to Line. Groups are stored in a single
2211            list with the default as the first element. Groups are searched
2212            in the order they appear in the list.
2213    
2214            * Thuban/Model/color.py: Documentation.
2215    
2216            * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
2217            the kind of data represented by a field.
2218    
2219            * Thuban/Model/load.py (ProcessSession): Use proper string
2220            conversion function; fixes RTbug #1713.
2221    
2222            * Thuban/Model/save.py (Saver): Store field type information.
2223    
2224            * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
2225            (Table): Add field_info_by_name() to retrieve field information
2226            by specifying the field name, not the number.
2227    
2228            * Thuban/UI/mainwindow.py: Function name changes.
2229    
2230            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2231            get the layer classification once. Don't try to classify
2232            values when the field is None: just use the default properties.
2233    
2234            * Thuban/UI/view.py: Function name changes.
2235    
2236            * Doc/thuban.dtd: Add field_type attribute to a classification.
2237    
2238    2003-03-04  Bernhard Herzog  <[email protected]>
2239    
2240            * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
2241            the fill and stroke layer attributes optional with suitable
2242            default values. Add the stroke_width layer attribute. Use correct
2243            syntax for empty elements. Make the attribute list for labels
2244            refer to the label element.
2245    
2246    2003-03-04  Bernhard Herzog  <[email protected]>
2247    
2248            * setup.py (thuban_build_py.build): Add a comment about distutils in
2249            Python 2.3 containing some of the functionality we implement in
2250            setup.py ourselves.
2251    
2252            * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
2253            before the selection mode. Doing it the other way round triggers
2254            an assertion in wxWindows.
2255    
2256            * Thuban/Model/save.py (escape): Fix typo in doc-string
2257    
2258            * Thuban/Model/classification.py: Remove unnecessary wxPython
2259            import
2260    
2261    2003-03-04  Jonathan Coles   <[email protected]>
2262    
2263            * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
2264            Parameter 'value' should default to None.
2265    
2266            * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
2267            the class attribute __classification is now private.
2268    
2269            * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
2270            Classifier to ClassGrid. Added support for removing selected rows,
2271            which including code for keeping track of when cells are selected,
2272            and deselected.
2273            (ClassTable): Support for added/removing rows. Fixed a problem
2274            with __ParseInput whereby it would not allow strings (only numbers)
2275            to be entered.
2276            (Classifier): Added button and supporting code for removing
2277            selected rows.
2278    
2279    2003-02-27  Jonathan Coles   <[email protected]>
2280    
2281            * Thuban/common.py: Moved color conversion functions into
2282            Thuban/UI/common.py.
2283            (Str2Num): Now converts the float (not the string) to a long/int
2284            so that an exception isn't thrown.
2285    
2286            * Thuban/UI/common.py: Common functions used in several UI modules
2287    
2288            * Thuban/Model/classification.py: Changed the class hierarchy
2289            so that a Classification consists of Groups which return
2290            Properties when a value matches a Group.
2291    
2292            * Thuban/Model/layer.py: Fixed name resolution problem.
2293    
2294            * Thuban/Model/load.py: Use new Classification and Group functions.
2295    
2296            * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
2297            failure.
2298            (Saver.write_classification): Use new Classification and Group
2299            functions.
2300    
2301            * Thuban/UI/classifier.py: Changes to use new Classification and Group
2302            functions. Fix to create a tuple with a single value instead of
2303            simply returning the value.
2304    
2305            * Thuban/UI/renderer.py: Use new Classification and Group functions.
2306            Use common.py functions.
2307    
2308            * Thuban/UI/tree.py: Use common.py functions.
2309            
2310            * test/test_classification.py: Use new Classification and Group
2311            classes.
2312    
2313    2003-02-24  Jonathan Coles   <[email protected]>
2314    
2315            * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
2316            functions from Thuban color objects to wxWindow colour objects.
2317    
2318            * Thuban/Model/classification.py (Classification): Renamed
2319            GetProperties() to GetClassData(). Used the new iterator
2320            in TreeInfo().
2321            (ClassIterator): Iterator implementation to iterate over the
2322            ClassData objects in a classification object.
2323    
2324            * Thuban/Model/save.py (Saver.write_classificaton): Uses
2325            the new iterator to save the classification information.
2326    
2327            * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
2328            for changing the stroke and fill colors and previewing the
2329            changes.
2330    
2331            * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
2332            MainWindow.SaveSessionAs): Text string changes so the dialogs
2333            have more meaningful titles.
2334    
2335            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
2336            Classification method name from GetProperties to GetClassData.
2337    
2338            * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
2339            instead of accessing now non-existent class variables.
2340    
2341    2003-02-24  Bernhard Herzog  <[email protected]>
2342    
2343            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
2344            unneeded Shape() call. Rendering is substantially faster without
2345            it and it avoids some problems with broken shape files.
2346    
2347    2003-02-20  Frank Koormann   <[email protected]>
2348    
2349            Force minimal size of identify and label dialogs. The autosizing
2350            looked too ugly.
2351    
2352            * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
2353            * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
2354            Set size of listctrl.
2355            * Thuban/UI/identifyview.py (IdentifyView.__init__):
2356            Set size of dialog.
2357    
2358    2003-02-19  Jonathan Coles   <[email protected]>
2359    
2360            * test/test_classification.py, test/test_layer.py,
2361            test/test_load.py, test/test_map.py, test/test_session.py:
2362            Updated the tests to use the new functions that are in the
2363            respective classes.
2364    
2365            * Thuban/Model/classification.py (Classification):
2366            Uses the new ClassData* classes. Modification messages are
2367            passed up to the parent layer (if it exists).
2368            (ClassData): New class to encapsulate the common data in each
2369            classification property.
2370            (ClassDataDefault): Represents the Default class. data.
2371            (ClassDataPoint): Represents a single class. data point
2372            (ClassDataRange): Represents a class. range
2373            (ClassDataMap): Represents a class. map (unused).
2374    
2375            * Thuban/Model/color.py: Added Color.None to represent something
2376            with no color. Color.Black represents the color black.
2377            (NoColor): Helper class derived from Color to represent something
2378            with no color.
2379    
2380            * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
2381            stroke_width attributes. Made the 'classification' attribute private.
2382            New methods for setting/getting the classification.
2383    
2384            * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
2385            to get the classifcation and use the new ClassData* classes to
2386            hold the classification data. Use Str2Num to convert numbers
2387            properly.
2388    
2389            * Thuban/Model/save.py (Saver): Use new Color and Classification
2390            methods
2391    
2392            * Thuban/UI/classifier.py (ClassGrid): New class to represent a
2393            custom grid.
2394            (ClassTable): Support for editing Values and Labels and for
2395            changing what type (point or range) of data is stored in each
2396            property based on how the user enters the data.
2397            (Classifier): Support for saving the new classifications and
2398            launching the dialog to edit a property.
2399            (SelectPropertiesDialog): New class for editing the visual
2400            properties of a classification (stroke color, width, and fill color)
2401            (ClassPreviewer): Took the Draw method from ClassRenderer and
2402            made most of it into this new class. Intend to use this class in
2403            the SelectPropertiesDialog for previewing changes.
2404    
2405            * Thuban/UI/renderer.py: Use new Color and Classification methods.
2406    
2407            * Thuban/UI/tree.py: Formatting changes.
2408    
2409            * Doc/thuban.dtd: Add 'label' element
2410    
2411            * Thuban/common.py: New. Contains common routines used throughout
2412            the code.
2413            (Str2Num): Takes a string and converts it to the "best" type of
2414            number.
2415    
2416    2003-02-14  Bernhard Herzog  <[email protected]>
2417    
2418            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
2419            dragging flag is always set to 0 even when the tool implementation
2420            raises an exception
2421    
2422    2003-02-11  Bernhard Herzog  <[email protected]>
2423    
2424            * Thuban/UI/application.py (ThubanApplication.splash_screen): New
2425            method to create a splash screen.
2426            (ThubanApplication.ShowMainWindow): New. Show the main window.
2427            Needed so the splash screen can display the mainwindow
2428            (ThubanApplication.OnInit): Call the
2429            new splash_screen method to determine whether the application
2430            should display a splash screen. If it displays a splash screen do
2431            not immediately show the main window.
2432    
2433    2003-02-11  Jonathan Coles  <[email protected]>
2434    
2435            * Thuban/Model/classification.py: Added import line to fix
2436            feature conflicts between running on python2.2 and python2.1.
2437    
2438            * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2439            onto the clinfo parameter, so removed the deepcopy().
2440    
2441    2003-02-10  Jonathan Coles  <[email protected]>
2442    
2443            * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2444            Added element_open variable to track opening and closing of tags
2445            so that tags that don't span more than one line are closed with
2446            /> instead of </tag_name>. Use the GetDefault*() methods of
2447            the Classification class.
2448    
2449            * Thuban/Model/classification.py (Classificaton): Added set and
2450            get methods for the default data. The class also takes a layer
2451            reference so that modification messages can be sent. Fixed the
2452            methods to use the new ClassData class.
2453            (ClassData): New class to encapsulate the classification data
2454    
2455            * Thuban/Model/layer.py (Layer): Remove the
2456            Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2457            SetDefault*() methods on the layer's classification object.
2458            (Layer.__init__): Use the new SetDefault*() methods in the
2459            Classification class.
2460    
2461            * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2462            object instead of a dictionary.
2463    
2464            * Thuban/UI/classifier.py (ClassRenderer): New class to
2465            draw the classifications in the dialog box's table.
2466            (Classifier): Modified to use the ClassRenderer class.
2467    
2468            * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2469            methods of the Classification class.
2470    
2471            * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2472            of the ClassData class.
2473    
2474            * test/test_classification.py, test/test_layer.py,
2475            test/test_map.py, test/test_session.py: Fix the tests to work
2476            with the above code changes.
2477    
2478    2003-02-03  Jonathan Coles  <[email protected]>
2479    
2480            * Thuban/Model/classification.py (Classification): Added getNull()
2481            to return the NullData reference
2482    
2483            * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2484            Layer.SetStrokeWidth): Modified these functions to change the
2485            null data in the classification rather than keep these values
2486            directly in the Layer class. Menu options to change these values
2487            work again.
2488    
2489    2003-01-28  Jonathan Coles  <[email protected]>
2490    
2491            * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2492            Fixed crashing problem on some systems. Dialog box shows
2493            classification data.
2494    
2495            * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2496            Colors in the tree view.
2497    
2498            * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2499            the tree info for classifications. Commented out unnecessary lines.
2500    
2501            * Thuban/Model/classification.py (Classification.TreeInfo): New
2502            function to add information about the classification into the
2503            tree view.
2504    
2505    2003-01-27  Jan-Oliver Wagner <[email protected]>
2506    
2507            * Thuban/__init__.py (_): New.
2508    
2509            * Thuban/Model/classification.py, Thuban/Model/extension.py,
2510            Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
2511            Thuban/Model/session.py, Thuban/UI/application.py,
2512            Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
2513            Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
2514            Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
2515            Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
2516            Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
2517    
2518    2003-01-27  Jonathan Coles  <[email protected]>
2519    
2520            * Thuban/Model/layer.py: Classification initialization calls.
2521    
2522            * Thuban/Model/classification.py: Created class to encapsulate
2523            a layer classification. Supports specific data points and
2524            ranges.
2525    
2526            * Thuban/Model/load.py: Added support for loading classification
2527            information.
2528    
2529            * Thuban/Model/save.py: Added support for saving classification
2530            information.
2531    
2532            * Thuban/UI/classifier.py: Initial class for a dialog box for
2533            specifying classification information.
2534    
2535            * Thuban/UI/mainwindows.py: Support for opening the classifier
2536            dialog.
2537    
2538            * Thuban/UI/renderer.py: Support for drawing a layer with the
2539            classification information.
2540    
2541            * Data/iceland_sample_class.thuban: iceland_sample with
2542            classification data.
2543    
2544            * test/test_classification: Tests for the Classification class.
2545    
2546    2002-12-09  Bernhard Herzog  <[email protected]>
2547    
2548            * test/test_command.py: New. Tests for the command classes.
2549    
2550            * Thuban/UI/command.py (ToolCommand): New class for tool commands.
2551            (Command.IsTool): New method to distinguish between command
2552            switching tools and other commands.
2553    
2554            * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
2555            the tool to avoid direct assignments to instance variables
2556            (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
2557            (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
2558            change the tool
2559    
2560            * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
2561            active tool's command turns insensitive, disable the tool.
2562            (_tool_command): Use the new ToolCommand class
2563    
2564            * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
2565            SelectTool method to change the tool
2566            (iconfile): Use the ToolCommand class
2567    
2568    2002-12-03  Bernhard Herzog  <[email protected]>
2569    
2570            * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
2571            the case of selected items that are not children of Layers or Maps
2572            properly. Previously this bug would trigger an assertion in
2573            wxWindows.
2574    
2575    2002-11-06  Frank Koormann  <[email protected]>
2576    
2577            * Thuban/UI/mainwindow.py: Altered the order of tools in the
2578            toolbar: First now are all navigation tools (Zoom In/Out, Pan,
2579            Full Extent).
2580    
2581    2002-10-23  Bernhard Herzog  <[email protected]>
2582    
2583            * setup.py (setup call): version now 0.1.3
2584    
2585            * MANIFEST.in: Add the files in test/
2586    
2587            * test/README: Add note about tests requiring the iceland data
2588    
2589            * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
2590            copyright notice.
2591    
2592    2002-10-18  Bernhard Herzog  <[email protected]>
2593    
2594            * test/test_map.py
2595            (TestMapWithContents.test_projected_bounding_box): Use an explicit
2596            epsilon.
2597    
2598            * test/support.py (FloatComparisonMixin.assertFloatEqual)
2599            (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
2600            message if the assertion fails and don't return the return value
2601            of self.assert_. In assertFloatSeqEqual the return meant that not
2602            all items of the sequence were compared.
2603    
2604    2002-09-20  Bernhard Herzog  <[email protected]>
2605    
2606            * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
2607    
2608            * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
2609    
2610            * test/test_map.py (TestMapWithContents.test_tree_info): Create
2611            the string with the bounding box on the fly because of platform
2612            differences in the way %g is handled.
2613    
2614            * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
2615            DBFfile too because Thuban layers can't yet cope missing DBF
2616            files.
2617    
2618    2002-09-20  Bernhard Herzog  <[email protected]>
2619    
2620            * test/test_menu.py: Use initthuban instead of
2621            add_thuban_dir_to_path to initialize Thuban.
2622    
2623            * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
2624            Mixin class for float comparisons
2625            (SubscriberMixin): New. Mixin class to test messages sent through
2626            the Connector class
2627    
2628            * test/README: Fix a typo and add the -v flag to the command for
2629            individual tests
2630    
2631            * test/test_session.py: New. Test cases for Thuban.Model.session
2632    
2633            * test/test_proj.py: New. Test cases for Thuban.Model.proj
2634    
2635            * test/test_map.py: New. Test cases for Thuban.Model.map
2636    
2637            * test/test_layer.py: New. Test cases for Thuban.Model.layer
2638    
2639            * test/test_label.py: New. Test cases for Thuban.Model.label
2640    
2641            * test/test_connector.py: New. Test cases for Thuban.Lib.connector
2642    
2643            * test/test_color.py: New. Test cases for Thuban.Model.color
2644    
2645            * test/test_base.py: New. Test cases for Thuban.Model.base
2646    
2647    2002-09-13  Bernhard Herzog  <[email protected]>
2648    
2649            * Thuban/Model/session.py (Session.forwarded_channels): Forward
2650            the CHANGED channel too.
2651    
2652            * Thuban/Model/map.py (Map.forwarded_channels): Forward the
2653            CHANGED channel too.
2654            (Map.__init__): Call the Modifiable constructor as well.
2655    
2656            * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
2657            event if the modified flag changes.
2658            (Modifiable.changed): Tweak the doc-string.
2659    
2660            * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
2661            (MainWindow.set_position_text): Put the code that puts the text
2662            with the mouse position into the status bar into the new method
2663            set_position_text so that it can overwritten in derived classes.
2664    
2665    2002-09-12  Bernhard Herzog  <[email protected]>
2666    
2667            * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
2668            message box on the main window.
2669    
2670    2002-09-11  Bernhard Herzog  <[email protected]>
2671    
2672            * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
2673            the 'E' because it's less likely to interfere with other menu
2674            entries.
2675            (MainWindow.build_menu): remove an incorrect comment.
2676    
2677    2002-09-10  Bernhard Herzog  <[email protected]>
2678    
2679            * Thuban/UI/mainwindow.py (MainWindow.Map): New.
2680            (_tool_command): Add sensitive parameter
2681            (_has_visible_map): Sensitivity callback to tools and other
2682            commands that require a visible map. Use it in map_zoom_in_tool,
2683            map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
2684            and map_full_extent
2685    
2686    2002-09-06  Bernhard Herzog  <[email protected]>
2687    
2688            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
2689            VIEW_POSITION
2690    
2691    2002-09-04  Frank Koormann  <[email protected]>
2692    
2693            * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
2694    
2695    2002-09-02  Bernhard Herzog  <[email protected]>
2696    
2697            * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
2698            wxWindows already and our implementation doesn't work correctly
2699            with wxGTK 2.3:
2700            (MapCanvas.__init__): Remove the instance variable
2701            (MapCanvas.OnPaint): Always call do_redraw when there's a map to
2702            be drawin
2703            (MapCanvas.OnIdle): Removed.
2704    
2705            * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
2706            a parameter to determine the size of the rectangle.
2707            (MapCanvas.find_shape_at): Create the box around the point on a
2708            layer by layer basis and make the size depend on the shape type.
2709            This solves a problem with the selection of point shapes at the
2710            border of the layer's bounding box
2711    
2712    2002-08-30  Bernhard Herzog  <[email protected]>
2713    
2714            * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
2715            for the sensitivity  of remove layer.
2716            (_can_remove_layer): New. Sensitivity callback for remove layer
2717            (Command layer_remove): Use _can_remove_layer
2718    
2719            * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
2720            determine whether a given layer can be deleted.
2721    
2722            * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
2723            (MapCanvas.do_redraw): Get rid of the unused update_region
2724            instance variable
2725    
2726            * Thuban/UI/view.py: Add/update some doc-strings.
2727    
2728            * test/: new subdirectory with a bunch of unit tests.
2729    
2730            * test/README, test/test_table.py, test/test_save.py,
2731            test/test_menu.py, test/test_load.py: Initial set of tests and
2732            brief instructions on how to run them
2733    
2734    2002-08-29  Bernhard Herzog  <[email protected]>
2735    
2736            * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
2737            arcs with multiple parts.
2738    
2739            * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
2740            Handle degenrate rectangles.
2741    
2742            * Thuban/Model/table.py: Make writing records work correctly:
2743            (Table.__init__): Keep track of whether the DBF is open for
2744            writing
2745            (Table.write_record): Open the DBF file for writing when necessary
2746    
2747    2002-08-27  Bernhard Herzog  <[email protected]>
2748    
2749            * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
2750            dbf files only for reading by default. Use a new writable dbf
2751            object for writing.
2752    
2753    2002-08-26  Bernhard Herzog  <[email protected]>
2754    
2755            * Thuban/UI/mainwindow.py: Refactor the context creation:
2756            (MainWindow.Context): New method to return a context
2757            (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
2758            new method
2759    
2760            * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
2761            layer table specific code from TableGrid into LayerTableGrid
2762            (TableFrame, LayerTableFrame): Split the layer table specific code
2763            from TableFrame into LayerTableFrame
2764            (LayerTableGrid.select_shape): Remove a debug print
2765    
2766            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
2767            LayerTableFrame
2768    
2769    2002-08-23  Bernhard Herzog  <[email protected]>
2770    
2771            * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
2772            absolute filename.
2773    
2774    2002-08-22  Bernhard Herzog  <[email protected]>
2775    
2776            * Thuban/Model/table.py (Table.write_record): New method to write
2777            records.
2778            (Table.__init__): Open the DBF file for writing too.
2779    
2780            * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
2781            into the underlying table.
2782    
2783            * extensions/shapelib/shapefil.h (DBFCommit),
2784            extensions/shapelib/dbfopen.c (DBFCommit): New API function to
2785            commit any changes made to the DBF file.
2786    
2787            * Thuban/UI/mainwindow.py (make_check_current_tool)
2788            (_tool_command): Put the code that generates the "checked"
2789            callback into a separate function so that we can reuse it
2790            elsewhere
2791    
2792            * Thuban/Model/save.py (Saver): New class to handle serializing a
2793            session into an XML file. The main reason to introduce a class is
2794            that applications built on Thuban can derive from it so that they
2795            can save additional information in a session file.
2796            (save_session): Delegate almost all the work to the Saver class.
2797            Rename the filename argument to file because it may be a file like
2798            object now.
2799    
2800            * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
2801            code. Remove the little test code which would be executed when the
2802            module is run as a script which didn't work anymore since it can't
2803            import the other Thuban modules.
2804            (ProcessSession, load_session): Refactor the ProcessSession to
2805            have one method for each element start and end tag so that derived
2806            classes can easily override the processing of individual tags.
2807            Also, always parse with namespaces enabled because applications
2808            built on top of Thuban will likely use namespaces if they extend
2809            the session file format.
2810    
2811    2002-08-21  Bernhard Herzog  <[email protected]>
2812    
2813            * setup.py (ThubanInstall.run): Don't repr install_lib_orig
2814            because thubaninit_contents will do it for us.
2815    
2816    2002-08-16  Jan-Oliver Wagner <[email protected]>
2817    
2818            * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
2819            tree window already open
2820    
2821    2002-08-15  Bernhard Herzog  <[email protected]>
2822    
2823            * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
2824            with self.
2825    
2826            * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
2827            when we have actually captured it.
2828    
2829            * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
2830            shapefile and destroy the table.
2831    
2832            * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
2833    
2834    2002-08-14  Bernhard Herzog  <[email protected]>
2835    
2836            * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
2837            instance variable columns
2838            (RecordTable.GetTypeName): row and col may be negative in some
2839            cases.
2840    
2841            * setup.py (InstallLocal.initialize_options)
2842            (InstallLocal.finalize_options, InstallLocal.user_options): New
2843            option create-init-file to build a thubaninit.py when running
2844            install_local
2845            (InstallLocal.run): Create the thubaninit.py module when requested
2846            (thubaninit_contents): Split the template into several parts and
2847            create a new function thubaninit_contents that creates the
2848            contents of a thubaninit module.
2849            (ThubanInstall.run): Use the new function to create the thubaninit
2850            module.
2851    
2852    2002-07-30  Bernhard Herzog  <[email protected]>
2853    
2854            * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
2855            cleanup.
2856            (ThubanApplication.MainLoop): Extend to automatically call OnExit.
2857    
2858            * Thuban/Model/session.py (Session.Destroy): Don't bypass the
2859            direct base class' Destroy method.
2860    
2861            * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
2862            layers.
2863            (Map.Destroy): Destroy the label_layer as well and call the
2864            inherited Desatroymethod first so that no more messages are
2865            issued.
2866            (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
2867            message if the stacking order actually has changed. Add
2868            doc-strings.
2869            (Map.BoundingBox): Correct the doc-string.
2870            (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
2871            (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
2872    
2873            * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
2874            all labels.
2875    
2876    2002-07-29  Bernhard Herzog  <[email protected]>
2877    
2878            * Thuban/Model/map.py (Map.subscribe_layer_channels)
2879            (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
2880            to a layer's channels into separate methods.
2881            (Map.RemoveLayer, Map.AddLayer): Call the new methods
2882            (Map.Destroy): Unsubscribe from a layer's channels before
2883            destroying it.
2884    
2885            * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
2886            selected_layer parameter to searched_layer which is the layer to
2887            search in.
2888            (MapCanvas.SelectShapeAt): New parameter layer to restrict the
2889            search to that layer. Return the selected layer and shape.
2890    
2891            * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
2892            typo
2893    
2894    2002-07-24  Bernhard Herzog  <[email protected]>
2895    
2896            * Thuban/UI/application.py (ThubanApplication.create_session):
2897            Extend the doc string.
2898            (ThubanApplication.subscribe_session)
2899            (ThubanApplication.unsubscribe_session): New methods to
2900            subscribe/unsubscribe to/from session channels.
2901            (ThubanApplication.SetSession): Call the new methods here.
2902            (ThubanApplication.maps_changed, ThubanApplication.set_map):
2903            Renamed set_map to maps_changed. Its now a subscriber for
2904            MAPS_CHANGED.
2905    
2906            * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
2907            x-coordinate in case of simple clicks
2908    
2909            * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
2910            don't pass it as a parameter
2911    
2912            * Thuban/Model/session.py (Session.RemoveMap): New
2913    
2914            * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
2915            window size into a parameter.
2916    
2917    2002-07-23  Bernhard Herzog  <[email protected]>
2918    
2919            * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
2920            just commands.
2921    
2922            * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
2923            parameter list a bit to allow setting the window title and the
2924            initial message in the status bar. Update the callers.
2925    
2926            * Thuban/UI/application.py (ThubanApplication.OnInit)
2927            (ThubanApplication.CreateMainWindow): Put the mainwindow
2928            instantiation into a separate method so that it can be overridden
2929            by a subclass.
2930    
2931    2002-07-19  Bernhard Herzog  <[email protected]>
2932    
2933            * Thuban/Model/session.py: Issue a CHANGED message every time
2934            another changed message is issued to make it easier to get
2935            notified of changes.
2936            (Session): Update the doc string
2937            (Session.forward): Issue changed-events as CHANGED as well.
2938            (Session.changed): Overwrite the inherited version to issue
2939            CHANGED events as well.
2940    
2941            * Thuban/UI/tree.py: We can now simply subscribe to the session's
2942            CHANGED channel to be informed of changes.
2943            (SessionTreeCtrl.session_channels): Not needed any longer.
2944            (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
2945            Only have to (un)subscribe CHANGED
2946    
2947            * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
2948    
2949            * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
2950            for the wxPython locale bug to __init__.py so that it's
2951            automatically executed by anybody using UI code from Thuban.
2952    
2953    2002-07-18  Bernhard Herzog  <[email protected]>
2954    
2955            * Thuban/UI/main.py (main): app no longer needs to be global
2956    
2957            * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
2958            as parameter and store it in an instance variable
2959            (MainWindow.invoke_command, MainWindow.update_command_ui)
2960            (MainWindow.save_modified_session, MainWindow.NewSession)
2961            (MainWindow.OpenSession, MainWindow.SaveSession)
2962            (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
2963            application object.
2964    
2965            * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
2966            the main window with self.
2967    
2968            * Thuban/UI/context.py: New module with the context class
2969    
2970            * Thuban/UI/command.py (Command): Update doc string.
2971    
2972            * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
2973            MainWindow.update_command_ui): Pass an instance of the context
2974            class to the command's methods
2975            (check_current_tool, call_method): Handle the new context
2976            implementation
2977    
2978            * Examples/simple_extensions/simple_tool.py (simple_tool,
2979            check_simple_tool): Handle the new context implementation
2980    
2981            * Examples/simple_extensions/simple_command.py (simple_command):
2982            Handle the new context implementation. Update the comments about
2983            the context.
2984    
2985            * Thuban/UI/application.py (ThubanApplication.SetSession): Add
2986            doc-string
2987            (ThubanApplication.Session): New method to return the session
2988            object
2989    
2990            * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
2991            interactor's selected_layer may not be a layer of the current
2992            session when the tree is updated while a new session is being set.
2993    
2994    2002-07-17  Bernhard Herzog  <[email protected]>
2995    
2996            * Thuban/UI/tree.py (color_string): Removed. No longer used.
2997            (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
2998            update_tree into update_tree and add_items. The tree now uses a
2999            more generic way to display the contents of the tree.
3000            (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
3001    
3002            * Thuban/Model/layer.py (Layer.TreeInfo),
3003            Thuban/Model/extension.py (Extension.TreeInfo),
3004            Thuban/Model/map.py (Map.TreeInfo),
3005            Thuban/Model/session.py (Session.TreeInfo):
3006            Add TreeInfo methods to implement the new tree view update scheme
3007    
3008    2002-07-16  Bernhard Herzog  <[email protected]>
3009    
3010            * Thuban/UI/application.py: Don't use "import from" for the
3011            MainWindow. It can't always be resolved.
3012            (ThubanApplication.OnInit): change reference to MainWindow
3013            accordingly.
3014    
3015            * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
3016            completely
3017    
3018    2002-07-10  Bernhard Herzog  <[email protected]>
3019    
3020            * setup.py (create_init_module): New configurable variable whose
3021            default depends on the platform we're running on.
3022            (ThubanInstall.initialize_options): Initialize
3023            self.create_init_module from the global create_init_module
3024            (ThubanInstall.user_options): indictate that the options
3025            create-init-module and init-module-dir have arguments.
3026    
3027            * setup.py: In the setup call change the version number to include
3028            cvs.
3029    
3030            * MANIFEST.in: Add the files in Examples
3031    
3032    2002-07-09  Bernhard Herzog  <[email protected]>
3033    
3034            * setup.py: In the setup call, use the thuban homepage as the
3035            value of the url parameter.
3036    
3037            * Examples: New subdirectory for examples.
3038    
3039            * Examples/simple_extensions/simple_tool.xpm,
3040            Examples/simple_extensions/simple_tool.py,
3041            Examples/simple_extensions/simple_command.py,
3042            Examples/simple_extensions/README: Simple examples showing how to
3043            add new commands and tools.
3044    
3045            * setup.cfg (bdist_rpm): Add the default value for prefix and tell
3046            bdist_rpm that we also have an install script.
3047            (bdist_inno): Add 2002 to the copyright notice.
3048    
3049            * setup.py: Create a file in python's site-packages directory to
3050            make installation of Thuban as a library easier.
3051            (ThubanInstall.user_options): Add two new options,
3052            create-init-module and init-module-dir
3053            (ThubanInstall.expand_with_pure_python_dirs): New method to expand
3054            filenames for installation in the default directories.
3055            (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
3056            the inherited methods to capture some filenames before they're
3057            transformed too much by distutils.
3058            (ThubanInstall.run): Create the init module if requested.
3059            (ThubanInstall.thuban_init_filename): New method to return the
3060            full name of the init module.
3061            (ThubanInstall.get_outputs): Append the filename of the init
3062            module.
3063    
3064    2002-07-08  Bernhard Herzog  <[email protected]>
3065    
3066            * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
3067            handle the prefix properly which means that the default for the
3068            installation prefix should be /usr for RPMs and /usr/local when
3069            doing a normal source install.
3070            (bdist_rpm_install_script): Script to override the default install
3071            commands in the specfile generated by the bdist_rpm command.
3072            (thuban_bdist_rpm.user_options): Add a prefix option
3073            (thuban_bdist_rpm.initialize_options): Init the prefix option.
3074            Create the script files for the spec files as empty files here
3075            (thuban_bdist_rpm._make_spec_file): Override the inherited method
3076            to fill the script files with content.
3077    
3078            * Thuban/Model/save.py (relative_filename): Wrapper around
3079            Thuban.Lib.fileutil.relative_filename that accepts an empty dir
3080            argument. save_session now automatically uses this version,
3081            solving a problem when saving to a relative filename.
3082    
3083            * setup.py: In the setup call, make sure that the library
3084            directories are under $prefix/lib not directly under $prefix.
3085    
3086    2002-06-20  Jan-Oliver Wagner <[email protected]>
3087    
3088          * Thuban/Model/extension.py: new module to handle extension objects.          * Thuban/Model/extension.py: new module to handle extension objects.
3089          * Thuban/Model/messages.py: new messages for extensions.          * Thuban/Model/messages.py: new messages for extensions.
# Line 11  Line 3096 
3096  2002-05-29  Bernhard Herzog  <[email protected]>  2002-05-29  Bernhard Herzog  <[email protected]>
3097    
3098          * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind          * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
3099          the events for a comnmand.          the events for a command.
3100          (MainWindow.add_toolbar_command, MainWindow.add_menu_command):          (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
3101          Call bind_command_events to bind the events. add_toolbar_command          Call bind_command_events to bind the events. add_toolbar_command
3102          can now bind events too so that it's possible to have commands          can now bind events too so that it's possible to have commands
# Line 227  Line 3312 
3312          * Thuban/UI/messages.py (VIEW_POSITION): New message for the          * Thuban/UI/messages.py (VIEW_POSITION): New message for the
3313          position in the statusbar          position in the statusbar
3314    
3315  2002-04-26      Frank Koormann <[email protected]>  2002-04-26  Frank Koormann <[email protected]>
3316    
3317          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data          * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
3318    
3319  2002-04-24      Frank Koormann <[email protected]>  2002-04-24  Frank Koormann <[email protected]>
3320            
3321          * Resources/Bitmaps/identify.xpm: shadow added          * Resources/Bitmaps/identify.xpm: shadow added
3322    
3323          * Resources/Bitmaps/fullextent.xpm: new          * Resources/Bitmaps/fullextent.xpm: new
           
 2002-04-22      Jan-Oliver Wagner <[email protected]>  
3324    
3325          * Thuban/UI/tree.py (update_tree): added test for None on map bounding box  2002-04-22  Jan-Oliver Wagner <[email protected]>
3326    
3327            * Thuban/UI/tree.py (update_tree): added test for None on map bounding
3328            box
3329    
3330  2002-04-21      Jan-Oliver Wagner <[email protected]>  2002-04-21  Jan-Oliver Wagner <[email protected]>
3331    
3332          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new          * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
3333    
3334          * Thuban/UI/tree.py (update_tree): added added map extent          * Thuban/UI/tree.py (update_tree): added added map extent
3335    
3336          * Thuban/UI/mainwindow.py (_method_command): extended by parameter          * Thuban/UI/mainwindow.py (_method_command): extended by parameter
3337          icon; added map_full_extend as tool          icon; added map_full_extend as tool
3338    
3339  2002-04-19      Jan-Oliver Wagner <[email protected]>  2002-04-19  Jan-Oliver Wagner <[email protected]>
3340    
3341          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for          * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
3342          saving _new_ sessions          saving _new_ sessions
# Line 352  Line 3438 
3438    
3439          * setup.py: increase version number to 0.1          * setup.py: increase version number to 0.1
3440          (data_dist): New command class for data distribution          (data_dist): New command class for data distribution
           
3441    
3442  2001-09-14  Bernhard Herzog  <[email protected]>  2001-09-14  Bernhard Herzog  <[email protected]>
3443    
3444          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):          * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3445          Handle the case of no layer (i.e. layer is None) properly.          Handle the case of no layer (i.e. layer is None) properly.
3446    
3447          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):          * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3448          Set the initial selection of the combo boxes to reflect the          Set the initial selection of the combo boxes to reflect the
3449          projection we're starting with in a way that works on windows,          projection we're starting with in a way that works on windows,
3450          too.          too.
# Line 469  Line 3554 
3554          (MainWindow.identify_view_on_demand): Store the interactor in an          (MainWindow.identify_view_on_demand): Store the interactor in an
3555          instvar and use that reference instead of going through main.app          instvar and use that reference instead of going through main.app
3556    
3557          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):          * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
3558          * Thuban/UI/application.py (ThubanApplication.OnInit):          * Thuban/UI/application.py (ThubanApplication.OnInit):
3559          * Thuban/UI/main.py (main): Create the session tree view in main          * Thuban/UI/main.py (main): Create the session tree view in main
3560          with the new mainwindow method ShowSessionTree and not directly          with the new mainwindow method ShowSessionTree and not directly
3561          the application's OnInit method          the application's OnInit method
# Line 486  Line 3571 
3571          layer to the tableview dialog.          layer to the tableview dialog.
3572    
3573          * Thuban/UI/tableview.py: Add some doc-strings          * Thuban/UI/tableview.py: Add some doc-strings
3574          (TableGrid):          (TableGrid):
3575          (TableGrid.OnRangeSelect):          (TableGrid.OnRangeSelect):
3576          (TableGrid.OnSelectCell):          (TableGrid.OnSelectCell):
3577          (TableFrame.__init__):          (TableFrame.__init__):
# Line 553  Line 3638 
3638  2001-09-05  Bernhard Herzog  <[email protected]>  2001-09-05  Bernhard Herzog  <[email protected]>
3639    
3640          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.          * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
3641            
3642          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument          * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
3643          interactor to pass through to the MapCanvas          interactor to pass through to the MapCanvas
3644            
3645          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new          * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
3646          argument to the MainWindow constructor to get rid of the ugly hack          argument to the MainWindow constructor to get rid of the ugly hack
3647          that made main.app available early just so that the mapcanvas          that made main.app available early just so that the mapcanvas
# Line 603  Line 3688 
3688          (ThubanInstall.run): Remove the leading install root from the          (ThubanInstall.run): Remove the leading install root from the
3689          script filename if an install root was specified and use the new          script filename if an install root was specified and use the new
3690          link_file method          link_file method
3691            
3692          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to          * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
3693          the window when the first layer is added to the map.          the window when the first layer is added to the map.
3694    
# Line 640  Line 3725 
3725          (InnoIconItem): Helper class for bdist_inno          (InnoIconItem): Helper class for bdist_inno
3726          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added          (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
3727          this together with the appropriate parameters, to the setup call.          this together with the appropriate parameters, to the setup call.
3728            
3729          * setup.cfg (bdist_inno): added new section for the inno setup          * setup.cfg (bdist_inno): added new section for the inno setup
3730          installer          installer
3731    

Legend:
Removed from v.199  
changed lines
  Added in v.972

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26