/[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 735 by jonathan, Fri Apr 25 09:11:39 2003 UTC revision 921 by bh, Fri May 16 17:37:37 2003 UTC
# Line 1  Line 1 
1    2003-05-16  Bernhard Herzog  <[email protected]>
2    
3            * Thuban/Model/save.py: Remove some unused imports including the
4            __future__ import for nested_scopes as Thuban relies on Python 2.2
5            now.
6            (XMLWriter.encode): Remove the special case for a None argument.
7            In the saver encode is always called with a string argument.
8    
9    2003-05-16  Bernhard Herzog  <[email protected]>
10    
11            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
12            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
13            of the bug was that e.g. float("1.2") would fail. Thuban now
14            requires 2.4.x.
15            
16    2003-05-16  Frank Koormann   <[email protected]>
17    
18            Printing enhancement and WMF export (under Win32)
19    
20            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
21            ScreenRenderer. Renders Map, Legend and Scalebar for export.
22            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
23            PrintRender.
24    
25            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
26            to fullfil information needed for PrinterRenderer.
27            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
28            (MapCanvas.Print): Adapted to new MapPrintout.
29            (OutputTransform): General calculations to transform from canvas
30            coordinates to export/printing devices.
31    
32            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
33            new method_command to call ExportMap, with platform dependency (only
34            __WXMSW__)
35      
36            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
37            of scalebar drawing area as new parameters.
38            
39            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
40    
41            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
42            Update to extended scalebar.DrawScalebar header.
43    
44            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
45    
46            * test/test_scalebar.py: Made test executable as standalone.
47    
48    2003-05-16  Bernhard Herzog  <[email protected]>
49    
50            * Thuban/Model/table.py (Table): Remove this compatibility alias
51            for DBFTable.
52    
53            * test/test_table.py: Import DBFTable as Table because that alias
54            doesn't exist anymore.
55    
56            * Thuban/UI/classgen.py: Remove some unused imports
57    
58    2003-05-14  Jonathan Coles   <[email protected]>
59    
60            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
61            Fix docstring.
62            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
63            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
64            values of the supplied range to determine the beginning and end
65            bounds of the generated classes.
66    
67            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
68            do not have a leading 0 (.5 is now accepted as well as 0.5).
69    
70            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
71            call to ClassGenerator.GenUniformDistribution.
72    
73            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
74            layout bug with the 'Projection' label.
75    
76            * test/support.py (FloatTestCase): New. Needed for the Range tests.
77    
78            * test/test_range.py: New. Imported from SciParam.
79    
80    2003-05-12  Jonathan Coles   <[email protected]>
81    
82            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
83            to table.UniqueValues() with calls that retrieve all the values
84            from the table. This will need to be replaced by a method on table
85            which can simply return the list (perhaps more efficiently).
86    
87    2003-05-12  Jonathan Coles   <[email protected]>
88    
89            The return value of ClassGenerator.CalculateQuantiles has changed.
90            Refer to the documentation for details.
91    
92            * test/test_classgen.py: Modified Quantile tests to use the
93            new return values.
94    
95            * Thuban/Model/classgen.py
96            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
97            use new return values from CalculateQuantiles to produce the correct
98            range bounds in the Classification.
99            (ClassGenerator.CalculateQuantiles): Add more comments describing
100            the return values and parameters. Make minor adjustments to improve
101            the legibility of the code. Fix problem with adjusted not being set
102            in most cases.
103    
104    2003-05-12  Frank Koormann <[email protected]>
105            
106            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
107            and latin1. Fixes #1851 finally.
108    
109    2003-05-09  Jonathan Coles   <[email protected]>
110    
111            * test/test_classgen.py: New. Tests the Quantile algorithm.
112    
113            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
114            Clean up debugging statement, add comments, fix a small bug in the
115            returned adjusted percentiles.
116            
117    2003-05-09  Jonathan Coles   <[email protected]>
118    
119            Introduces Range class from SciParam into the ClassGroupRange class,
120            and such ranges can now be saved and loaded from disk.
121    
122            Quantiles are now available in the Classification Generator.
123    
124            Initial support for building Queries on a table. Doesn't do anything
125            but run some tests.
126    
127            * Thuban/Model/classification.py: Explicit imports.
128            (ClassGroupRange): Use the Range class to store the underlying
129            range information. The interface remains the same, except for
130            GetRange(), and you can also supply a Range object as the min
131            parameter to SetRange or __init__.
132    
133            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
134            string appropriately for use in Thuban. Fixes RTbug #1851.
135            (SessionLoader.end_projection): Handle the context of the
136            projection tag a bit better by looking at what objects are not
137            None. There was an assumption that a projection tag for a map
138            could occur before any layers.
139            (SessionLoader.start_clrange): Provide backward compatibility for
140            reading min/max values as well as the new range parameter.
141    
142            * Thuban/Model/map.py: Explicit imports.
143    
144            * Thuban/Model/resource.py: Import _.
145            (ProjFileSaver.write): write header using projfile.dtd.
146    
147            * Thuban/Model/save.py: Explicit imports.
148            (XMLWriter.encode): New. Encode the given string from a format
149            used by Thuban into UTF-8. Fixes RTbug #1851.
150    
151            * Thuban/UI/classgen.py: Explicit imports.
152            (ClassGenDialog.__init__): Clean up the code and add support
153            for Quantiles.
154            (ClassGenDialog.OnOK): Add support for Quantiles.
155            (GenQuantilesPanel): New. Input panel for Quantiles.
156            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
157            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
158    
159            * Thuban/Model/classgen.py: New. Contains all the classes named above.
160    
161            * Thuban/UI/classifier.py: Explicit imports.
162            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
163            ClassTable.SetValueAsCustom): Reworked to use new Range class.
164    
165            * Thuban/UI/legend.py: Explicit imports.
166    
167            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
168            a Table menu and associated method calls.
169            (MainWindow.choose_color): Removed. No longer needed.
170    
171            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
172            should be disabled if no projection is selected in the available
173            list.
174    
175            * Thuban/UI/renderer.py: Explicit imports.
176    
177            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
178            with correctly selecting the rows and issuing the right events.
179            Be sure to call Skip() to allow the grid to do some of its own
180            handling which allows the rows to actually be selected.
181            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
182            selecting multiple shapes.
183            (LayerTableFrame): Support for building Queries.
184            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
185    
186            * Thuban/UI/tree.py: Explicit imports.
187    
188            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
189            table view can call it.
190    
191            * test/test_classification.py: Explicit imports.
192            (TestClassification.test_ClassGroupRange): Fix test for new
193            Range class.
194    
195            * Doc/thuban.dtd: Add range parameter for clrange.
196    
197            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
198            object in ClassGroupRange, and also uesd for inputting ranges in
199            the classifer table and elsewhere.
200    
201            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
202            yet.
203    
204    2003-05-09  Frank Koormann <[email protected]>
205    
206            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
207    
208    2003-05-08  Frank Koormann <[email protected]>
209    
210            Coding style updates
211    
212            * test/test_scalebar.py: Replaced tab indentation by spaces.
213    
214            * Thuban/UI/scalebar.py: Explicit imports.
215    
216    2003-05-08  Frank Koormann <[email protected]>
217    
218            * Thuban/UI/scalebar.py
219            (ScaleBar.DrawScalebar): Format string bug fixed.
220    
221    2003-05-08  Frank Koormann <[email protected]>
222    
223            Reorganization of scalebar component (no wx in Thuban/Model)
224    
225            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
226            (deriveInterval):
227            Calculate scalebar interval and unit which fits in width for scale.
228            (roundInterval): Round float.
229    
230            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
231    
232            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
233    
234            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
235    
236    2003-05-08  Frank Koormann <[email protected]>
237    
238            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
239            Initialize ScaleBar with canvas.map
240    
241            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
242            round intervals to display smarter lengths
243            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
244            layer. If the maps has no projection applied grey the scalebar.
245    
246    2003-05-07  Frank Koormann <[email protected]>
247            
248            Basic Scalebar features added.
249    
250            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
251    
252            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
253            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
254            and the renderer.
255    
256            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
257    
258            * Thuban/UI/messages.py: SCALE_CHANGED added.
259    
260    2003-05-07  Bernhard Herzog  <[email protected]>
261    
262            * Thuban/Model/session.py (Session.__init__): New instance
263            variable shapestores to hold a list of all open shapestore objects
264            (Session.ShapeStores): New. Accessor method for the shapestores
265            list.
266            (Session._add_shapestore, Session._clean_weak_store_refs): New.
267            Internal methods to maintain the shapestores list.
268            (Session.Tables): New. Return all tables open in the session.
269            (Session.OpenShapefile): Insert the new ShapeStore into the
270            shapestores list.
271    
272            * test/test_session.py (TestSessionSimple.test_initial_state): Add
273            tests for ShapeStores and Tables
274            (TestSessionWithContent.test_shape_stores)
275            (TestSessionWithContent.test_tables): New. Test cases for
276            ShapeStores and Tables
277    
278    2003-05-07  Bernhard Herzog  <[email protected]>
279    
280            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
281            Add comments about the optimizations used.
282            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
283            Implement the ReadValue table interface method.
284    
285            * test/test_transientdb.py
286            (TestTransientTable.run_iceland_political_tests)
287            (TestTransientTable.test_transient_joined_table): Add tests for
288            ReadValue
289    
290    2003-05-07  Frank Koormann <[email protected]>
291    
292            * Resources/Bitmaps/fulllayerextent.xpm,
293            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
294            new icons.
295    
296    2003-05-06  Bernhard Herzog  <[email protected]>
297    
298            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
299            New. Simply delegate to the transient table's version.
300    
301            * test/test_transientdb.py
302            (TestTransientTable.test_auto_transient_table_query): New. Test
303            case for AutoTransientTable's SimpleQuery
304    
305    2003-05-06  Bernhard Herzog  <[email protected]>
306    
307            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
308            Implement a simple query method for the query dialog
309            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
310            the row index or shapeid.
311            (TransientTable.create): Insert the right value of the row index
312            (TransientJoinedTable.create): Copy the row index of the left
313            table to the joined result table
314    
315            * test/test_transientdb.py
316            (TestTransientTable.test_transient_table_read_twice): Fix
317            doc-string
318            (TestTransientTable.test_transient_table_query): New. Test for the
319            SimpleQuery method
320    
321    2003-05-06  Bernhard Herzog  <[email protected]>
322    
323            Convert all table users to use the new table interface. This only
324            covers Thuban itself, not GREAT-ER or other applications built on
325            Thuban yet, so the compatibility interface stays in place for the
326            time being but it now issues DeprecationWarnings.
327    
328            Finally, the new Table interface has a new method, HasColumn.
329    
330            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
331            issue deprecation warnings when they're. The warnings refer to the
332            caller of the method.
333            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
334            for the deprecation warnings
335    
336            * test/test_table.py: Ignore the deprecation warnings for the old
337            table in the tests in this module. The purpose of the tests is to
338            test the old interface, after all.
339    
340            * test/test_transientdb.py
341            (TestTransientTable.run_iceland_political_tests): Use the
342            constants for the types. Add a test for HasColumn
343            (TestTransientTable.test_transient_joined_table): Adapt to new
344            table interface. Add a test for HasColumn
345            (TestTransientTable.test_transient_table_read_twice): Adapt to new
346            table interface
347    
348            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
349            Adapt to new table interface
350    
351            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
352            new table interface
353    
354            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
355            (RecordTable.SetTable): Adapt to new table interface
356    
357            * Thuban/UI/classifier.py (Classifier.__init__)
358            (Classifier.__init__): Adapt to new table interface
359    
360            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
361            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
362            to new table interface
363    
364            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
365            (AutoTransientTable.HasColumn): Implement the new table interface
366            method
367            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
368            (AutoTransientTable.UniqueValues): Adapt to new table interface
369    
370            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
371            Adapt to new table interface
372    
373            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
374            simplify opening shapefiles a bit easier.
375            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
376            (TestLayer.test_point_layer): Use the new helper method
377            (TestLayer.test_get_field_type): New. Test for the GetFieldType
378            method
379    
380            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
381            the new table method
382    
383            * test/test_memory_table.py (TestMemoryTable.test_has_column):
384            Test for the new table method HasColumn
385    
386    2003-05-06  Jonathan Coles   <[email protected]>
387    
388            Addresses the "Selection Extent" wish of RTbug #1787.
389    
390            * Resources/Bitmaps/fulllayerextent.xpm,
391            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
392            extent. These are just place holders for the real bitmaps.
393    
394            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
395            calculate the bounding box once (the first time compute_bbox() is
396            called).
397            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
398            the bounding box for the shapes in lat/long coordinates.
399    
400            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
401            option.
402            (MainWindow.has_selected_shapes): New. Returns true if there are
403            any selected shapes.
404            (MainWindow.FullSelectionExtent): New. Calls
405            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
406            (_has_selected_shapes): New. Returns true if there are any
407            selected shapes.
408    
409            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
410            true if there are any selected shapes.
411    
412            * Thuban/UI/view.py (MapCanvas): Added delegated method
413            HasSelectedShapes.
414            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
415            shapes on the canvas using the map projection (if any).
416    
417            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
418            for Layer.ShapesBoundingBox().
419    
420    2003-05-06  Bernhard Herzog  <[email protected]>
421    
422            * Resources/Projections/defaults.proj: Fix spelling of Mercator
423    
424    2003-05-05  Jonathan Coles   <[email protected]>
425    
426            Addresses the "Full Layer Extent" wish of RTbug #1787.
427    
428            * Resources/Projections/defaults.proj: Added UK National Grid.
429    
430            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
431            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
432            when the user selects the menu option.
433    
434            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
435            scales the given layer on the canvas using the map projection.
436    
437    2003-05-05  Bernhard Herzog  <[email protected]>
438    
439            Convert the table implementations to a new table interface. All
440            tables use a common mixin class to provide backwards compatibility
441            until all table users have been updated.
442    
443            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
444            provide backwards compatibility for table classes implementing the
445            new interface
446            (DBFTable, MemoryTable): Implement the new table interface. Use
447            OldTableInterfaceMixin as base for compatibility
448            (DBFColumn, MemoryColumn): New. Column description for DBFTable
449            and MemoryTable resp.
450    
451            * test/test_dbf_table.py: New. Test cases for the DBFTable with
452            the new table interface.
453    
454            * test/test_memory_table.py: New. Test cases for the MemoryTable
455            with the new table interface.
456    
457            * test/test_table.py: Document the all tests in this file as only
458            for backwards compatibility. The equivalent tests for the new
459            interface are in test_memory_table.py and test_dbf_table.py
460            (MemoryTableTest.test_read): field_info should be returning tuples
461            with four items
462            (MemoryTableTest.test_write): Make doc-string a more precise.
463    
464            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
465            table interface. Derive from from OldTableInterfaceMixin for
466            compatibility.
467            (TransientTableBase.create): New intance variable column_map to
468            map from names and indices to column objects
469            (TransientTable.create): Use the new table interface of the input
470            table
471            (AutoTransientTable): Convert to new table interface. Derive from
472            from OldTableInterfaceMixin for compatibility.
473            (AutoTransientTable.write_record): Removed. It's not implemented
474            yet and we still have to decide how to handle writing with the new
475            table and data framework.
476    
477            * test/test_transientdb.py
478            (TestTransientTable.run_iceland_political_tests)
479            (TestTransientTable.test_transient_joined_table): Use the new
480            table interface
481    
482    2003-05-05  Jonathan Coles   <[email protected]>
483    
484            This is namely a collection of UI updates to improve user interactivity.
485            Tabbing between controls now exists and you can use ESC to close dialog
486            boxes; ENTER will active the default button.
487    
488            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
489            order that the controls are created so that tabbing works correctly.
490            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
491            wxDialog can handle the default button correctly.
492            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
493            same reasons as for OnOK.
494            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
495            when we ask the table for the maximum/minimum values of a field
496            which could take a very long time.
497    
498            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
499            order that the controls are created so that tabbing works correctly.
500            (SelectPropertiesDialog.__init__): Rearrange the order that the
501            controls are created so that tabbing works correctly.
502    
503            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
504            to derive from a wxDialog but behave like the original implementation
505            which was derived from a wxFrame. wxDialog provides useful key
506            handling functionality like ESC calling OnCancel and ENTER calling
507            OnOK which is lost with wxFrame.
508    
509            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
510            new dialogs.
511    
512            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
513            order that the controls are created so that tabbing works correctly.
514            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
515            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
516            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
517            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
518            can provide the "UK National Grid" as a default projection.
519            (UTMPanel.__init__): Rearrange the order that the controls are
520            created so that tabbing works correctly.
521    
522    2003-05-05  Bernhard Herzog  <[email protected]>
523    
524            * extensions/thuban/wxproj.cpp: Fix some of the comments.
525            (project_point): If a map projection but no layer projection is
526            given, convert degrees to radians before applying the map
527            projection.
528    
529            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
530            (TableGrid.allow_messages): New methods to make it possible to
531            inhibit message sending.
532            (TableGrid.issue): Only send the message if not inhibited.
533            (LayerTableGrid.select_shape): Use the new methods to make sure
534            that no ROW_SELECTED message is sent while we're updating the
535            selected rows to match the selected shapes.
536    
537    2003-05-02  Jan-Oliver Wagner <[email protected]>
538    
539            Implementation of MemoryTable.
540    
541            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
542            implementation that operates on a list of tuples. All of the data
543            are kept in the memory.
544    
545            * test/test_table.py (MemoryTableTest): New.
546    
547            * test/test_transientdb.py (SimpleTable): Removed.
548            (TestTransientTable.test_transient_joined_table,
549            (TestTransientTable.test_transient_table_read_twice): Replaced
550            SimpleTable by MemoryTable.
551    
552    2003-04-30  Jonathan Coles   <[email protected]>
553    
554            * Data/iceland_sample.thuban: Now contains correct projections
555            for each of the layers.
556    
557            * Resources/Projections/defaults.proj: Geographic projection
558            contains unit conversion parameter.
559    
560    2003-04-30  Jonathan Coles   <[email protected]>
561    
562            The most important part of this putback is the projection changes.
563            It should now be possible to specify the projection that a layer
564            is in and then specify a different projection for the map. The
565            projection dialog has an extra parameter for a geographic projection
566            which lets the user select if the input is in degrees or radians.
567    
568            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
569            to say that the parameter is a tuple of unprojected
570            points (which is what the callers to this method were assuming).
571            Also, since the points are unprojected we need to projected them.
572    
573            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
574            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
575            groups are selected, move the layer up/down. Fixes RTbug #1833.
576    
577            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
578    
579            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
580            parameter in call to SetClientData.
581            (GeoPanel): Add support for selecting the units that the
582            source data is in (Radians or Degrees).
583    
584            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
585            the rendering loop by reducing the number of if's, removing the
586            unnecessary try/except block, and checking if the old group
587            is the same as the new one (which happens a lot if there is
588            no classification, or lots of shapes are in the same group).
589    
590            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
591            around the redraw routine to try to catch problems that the user
592            may create by selecting invalid projections for the data set and
593            map. Clears the display if there are any problems and prints the
594            error.
595            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
596            rectangle.
597    
598            * extensions/thuban/wxproj.cpp (project_point): First invert the
599            supplied point (which should be in projected coordinates) using
600            the layer's projection and then project the point using the
601            map's projection.
602            (project_points): Use project_point() to project each point.
603    
604    2003-04-30  Jan-Oliver Wagner <[email protected]>
605    
606            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
607            don't set the Classification to None if the classfication field
608            is None (ie only a DEFAULT).
609    
610    2003-04-30  Bernhard Herzog  <[email protected]>
611    
612            * Thuban/UI/view.py: Fix some typos.
613    
614            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
615            not pop up the dialog if the selection becomes empty (this could
616            happen if e.g. a new selection is opened while the identify tool
617            is active and dialog had been closed)
618    
619    2003-04-30  Bernhard Herzog  <[email protected]>
620    
621            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
622            instance variable read_record_last_result
623            (TransientTableBase.read_record): Make sure reading the same
624            record twice works. The implementation uses the new instance
625            variable read_record_last_result
626    
627            * test/test_transientdb.py
628            (TestTransientTable.test_transient_table_read_twice): New test
629            case for the above bug-fix.
630    
631    2003-04-29  Jonathan Coles   <[email protected]>
632    
633            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
634    
635            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
636    
637            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
638            (ClassTable.SetValueAsCustom): Rename keyword argument in
639            ClassGroup* constructors to match argument name.
640    
641    2003-04-29  Bernhard Herzog  <[email protected]>
642    
643            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
644            transient DB if it exists to make sure it doesn't leave a journal
645            file in the temp directory.
646    
647            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
648            self.conn to None after closing the connection to make sure it's
649            not closed twice
650    
651    2003-04-29  Jonathan Coles   <[email protected]>
652    
653            Add a visible parameter in the layer XML tag. The default value is
654            "true". If anything other than "false" is specified we also assume
655            "true". Addresses RTbug #1025.
656    
657            * Doc/thuban.dtd: Add visible parameter to a layer.
658    
659            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
660            of visible from 1 to True.
661            (Layer.__init__): Change default value of visible from 1 to True.
662    
663            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
664            parameter.
665    
666            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
667            parameter.
668    
669            * test/test_load.py: Add new test data contents_test_visible.
670            (LoadSessionTest.setUp): save test data.
671            (LoadSessionTest.testLayerVisibility): Test if the visible flag
672            is loaded correctly.
673    
674            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
675            for saving an invisible layer.
676    
677    2003-04-29  Jonathan Coles   <[email protected]>
678    
679            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
680            legend dialog box and tell it to change its map to the one
681            supplied to SetMap(). Fixes RTbug #1770.
682    
683    2003-04-29  Bernhard Herzog  <[email protected]>
684    
685            Next step of table implementation. Introduce a transient database
686            using SQLite that some of the data is copied to on demand. This
687            allows us to do joins and other operations that require an index
688            for good performance with reasonable efficiency. Thuban now needs
689            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
690            haven't tested that.
691            
692            * Thuban/Model/transientdb.py: New. Transient database
693            implementation.
694    
695            * test/test_transientdb.py: New. Tests for the transient DB
696            classes.
697    
698            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
699            classes to help automatically remove temporary files and
700            directories.
701            (Session.__init__): New instance variables temp_dir for the
702            temporary directory and transient_db for the SQLite database
703            (Session.temp_directory): New. Create a temporary directory if not
704            yet done and return its name. Use AutoRemoveDir to have it
705            automatically deleted
706            (Session.TransientDB): Instantiate the transient database if not
707            done yet and return it.
708    
709            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
710            AutoTransientTable so that data is copied to the transient DB on
711            demand.
712            (SimpleStore): New class that simply combines a table and a
713            shapefile
714    
715            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
716            DBFTable and update its doc-string to reflect the fact that this
717            is only the table interface to a DBF file. Table is now an alias
718            for DBFTable for temporary backwards compatibility.
719    
720            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
721            the last reference to the session goes away so that the temporary
722            files are removed properly.
723    
724            * test/test_load.py (LoadSessionTest.tearDown): Remove the
725            reference to the session to make sure the temporary files are
726            removed.
727    
728    2003-04-29  Bernhard Herzog  <[email protected]>
729    
730            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
731            the __parser instance variable into a normal local variable in
732            read. It's only used there and read will never be called more than
733            once. Plus it introduces a reference cycle that keeps can keep the
734            session object alive for a long time.
735    
736    2003-04-29  Jonathan Coles   <[email protected]>
737    
738            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
739            Projection an immutable item. Fixes RTbug #1825.
740            (Projection.__init__): Initialize instance variables here.
741            (ProjFile.Replace): New. Replace the given projection object with
742            the new projection object. This solves the problem of needing the
743            mutator Projection.SetProjection() in the ProjFrame class and
744            allows a projection to change parameters without changing its
745            location in the file.
746    
747            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
748            be of type wxSAVE and should verify overwriting a file.
749    
750            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
751            ProjFile.Replace() method instead of the mutator
752            Projection.SetProjection(). Also requires that we reassign the
753            client data to the new projection.
754    
755            * test/test_proj.py (TestProjection.test): Test GetName() and
756            GetAllParameters()
757            (TestProjFile.test): Remove tests for Set*() methods. Add tests
758            for Replace().
759    
760    2003-04-25  Jonathan Coles   <[email protected]>
761    
762            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
763            to save the name of the projection.
764    
765            * test/test_save.py (SaveSessionTest.testLayerProjection): New
766            test to verify layer projections are saved correctly.
767    
768    2003-04-25  Jonathan Coles   <[email protected]>
769    
770            * Thuban/Model/proj.py (Projection.SetName): Set the name
771            to "Unknown" if name is None.
772            (Projection.SetAllParameters): New. Set the projection's
773            parameter list to the one supplied.
774            (Projection.SetProjection): New. Set the projection's
775            properties to those of the supplied Projection.
776    
777            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
778            the dialog title to include the map's title.
779            (MainWindow.LayerProjection): Set the dialog title to include
780            the layer's title.
781    
782            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
783            error dialogs into a single method call.
784            (ProjFrame.__VerifyButtons): Add more states to check.
785            (ProjFrame.__GetProjection): Return the current state of an
786            edited projection or None.
787            (ProjFrame.__FillAvailList): Remove checks for states that
788            shouldn't exist.
789            (ProjFrame._OnNew): Clear all selected items and supply
790            a projection panel if necessary.
791    
792            * test/test_proj.py (TestProjFile.test): Add tests for
793            ProjFile.SetAllParameters, ProjFile.SetProjection,
794            ProjFile.SetName.
795    
796    2003-04-25  Jonathan Coles   <[email protected]>
797    
798            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
799            takes an optional argument to select the current projection.
800            This does not guarantee that the item is visible due to
801            limited wxWindows functionality. Fixes RTBug #1821.
802    
803    2003-04-25  Jonathan Coles   <[email protected]>
804    
805            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
806            the projection name and use it when constructing the Projection
807            object.
808    
809            * Thuban/Model/proj.py (Projection.__init__): Change the default
810            value for 'name' to None and then test if name is equal to None
811            in the body of the constructor. This way the caller doesn't have to
812            know what the default value should be. Namely, useful in load.py
813            where we have to pick a default value if the 'name' parameter
814            doesn't exist in the XML file.
815    
816            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
817            Tests a file where a layer has a projection.
818    
819  2003-04-25  Jonathan Coles   <[email protected]>  2003-04-25  Jonathan Coles   <[email protected]>
820    
821          * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the          * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the

Legend:
Removed from v.735  
changed lines
  Added in v.921

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26