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

Legend:
Removed from v.46  
changed lines
  Added in v.1011

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26