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

Legend:
Removed from v.408  
changed lines
  Added in v.995

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26