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

Legend:
Removed from v.53  
changed lines
  Added in v.985

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26