/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.716  
changed lines
  Added in v.899

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26