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

Legend:
Removed from v.16  
changed lines
  Added in v.986

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26