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

Legend:
Removed from v.557  
changed lines
  Added in v.997

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26