/[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 721 by jonathan, Thu Apr 24 10:11:55 2003 UTC revision 823 by jonathan, Mon May 5 18:20:39 2003 UTC
# Line 1  Line 1 
1    2003-05-05  Jonathan Coles   <[email protected]>
2    
3            Addresses the "Full Layer Extent" wish of RTbug #1787.
4    
5            * Resources/Projections/defaults.proj: Added UK National Grid.
6    
7            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
8            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
9            when the user selects the menu option.
10    
11            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
12            scales the given layer on the canvas using the map projection.
13    
14    2003-05-05  Bernhard Herzog  <[email protected]>
15    
16            Convert the table implementations to a new table interface. All
17            tables use a common mixin class to provide backwards compatibility
18            until all table users have been updated.
19    
20            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
21            provide backwards compatibility for table classes implementing the
22            new interface
23            (DBFTable, MemoryTable): Implement the new table interface. Use
24            OldTableInterfaceMixin as base for compatibility
25            (DBFColumn, MemoryColumn): New. Column description for DBFTable
26            and MemoryTable resp.
27    
28            * test/test_dbf_table.py: New. Test cases for the DBFTable with
29            the new table interface.
30    
31            * test/test_memory_table.py: New. Test cases for the MemoryTable
32            with the new table interface.
33    
34            * test/test_table.py: Document the all tests in this file as only
35            for backwards compatibility. The equivalent tests for the new
36            interface are in test_memory_table.py and test_dbf_table.py
37            (MemoryTableTest.test_read): field_info should be returning tuples
38            with four items
39            (MemoryTableTest.test_write): Make doc-string a more precise.
40    
41            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
42            table interface. Derive from from OldTableInterfaceMixin for
43            compatibility.
44            (TransientTableBase.create): New intance variable column_map to
45            map from names and indices to column objects
46            (TransientTable.create): Use the new table interface of the input
47            table
48            (AutoTransientTable): Convert to new table interface. Derive from
49            from OldTableInterfaceMixin for compatibility.
50            (AutoTransientTable.write_record): Removed. It's not implemented
51            yet and we still have to decide how to handle writing with the new
52            table and data framework.
53    
54            * test/test_transientdb.py
55            (TestTransientTable.run_iceland_political_tests)
56            (TestTransientTable.test_transient_joined_table): Use the new
57            table interface
58    
59    2003-05-05  Jonathan Coles   <[email protected]>
60    
61            This is namely a collection of UI updates to improve user interactivity.
62            Tabbing between controls now exists and you can use ESC to close dialog
63            boxes; ENTER will active the default button.
64    
65            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
66            order that the controls are created so that tabbing works correctly.
67            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
68            wxDialog can handle the default button correctly.
69            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
70            same reasons as for OnOK.
71            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
72            when we ask the table for the maximum/minimum values of a field
73            which could take a very long time.
74    
75            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
76            order that the controls are created so that tabbing works correctly.
77            (SelectPropertiesDialog.__init__): Rearrange the order that the
78            controls are created so that tabbing works correctly.
79    
80            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
81            to derive from a wxDialog but behave like the original implementation
82            which was derived from a wxFrame. wxDialog provides useful key
83            handling functionality like ESC calling OnCancel and ENTER calling
84            OnOK which is lost with wxFrame.
85    
86            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
87            new dialogs.
88    
89            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
90            order that the controls are created so that tabbing works correctly.
91            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
92            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
93            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
94            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
95            can provide the "UK National Grid" as a default projection.
96            (UTMPanel.__init__): Rearrange the order that the controls are
97            created so that tabbing works correctly.
98    
99    2003-05-05  Bernhard Herzog  <[email protected]>
100    
101            * extensions/thuban/wxproj.cpp: Fix some of the comments.
102            (project_point): If a map projection but no layer projection is
103            given, convert degrees to radians before applying the map
104            projection.
105    
106            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
107            (TableGrid.allow_messages): New methods to make it possible to
108            inhibit message sending.
109            (TableGrid.issue): Only send the message if not inhibited.
110            (LayerTableGrid.select_shape): Use the new methods to make sure
111            that no ROW_SELECTED message is sent while we're updating the
112            selected rows to match the selected shapes.
113    
114    2003-05-02  Jan-Oliver Wagner <[email protected]>
115    
116            Implementation of MemoryTable.
117    
118            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
119            implementation that operates on a list of tuples. All of the data
120            are kept in the memory.
121    
122            * test/test_table.py (MemoryTableTest): New.
123    
124            * test/test_transientdb.py (SimpleTable): Removed.
125            (TestTransientTable.test_transient_joined_table,
126            (TestTransientTable.test_transient_table_read_twice): Replaced
127            SimpleTable by MemoryTable.
128    
129    2003-04-30  Jonathan Coles   <[email protected]>
130    
131            * Data/iceland_sample.thuban: Now contains correct projections
132            for each of the layers.
133    
134            * Resources/Projections/defaults.proj: Geographic projection
135            contains unit conversion parameter.
136    
137    2003-04-30  Jonathan Coles   <[email protected]>
138    
139            The most important part of this putback is the projection changes.
140            It should now be possible to specify the projection that a layer
141            is in and then specify a different projection for the map. The
142            projection dialog has an extra parameter for a geographic projection
143            which lets the user select if the input is in degrees or radians.
144    
145            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
146            to say that the parameter is a tuple of unprojected
147            points (which is what the callers to this method were assuming).
148            Also, since the points are unprojected we need to projected them.
149    
150            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
151            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
152            groups are selected, move the layer up/down. Fixes RTbug #1833.
153    
154            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
155    
156            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
157            parameter in call to SetClientData.
158            (GeoPanel): Add support for selecting the units that the
159            source data is in (Radians or Degrees).
160    
161            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
162            the rendering loop by reducing the number of if's, removing the
163            unnecessary try/except block, and checking if the old group
164            is the same as the new one (which happens a lot if there is
165            no classification, or lots of shapes are in the same group).
166    
167            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
168            around the redraw routine to try to catch problems that the user
169            may create by selecting invalid projections for the data set and
170            map. Clears the display if there are any problems and prints the
171            error.
172            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
173            rectangle.
174    
175            * extensions/thuban/wxproj.cpp (project_point): First invert the
176            supplied point (which should be in projected coordinates) using
177            the layer's projection and then project the point using the
178            map's projection.
179            (project_points): Use project_point() to project each point.
180    
181    2003-04-30  Jan-Oliver Wagner <[email protected]>
182    
183            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
184            don't set the Classification to None if the classfication field
185            is None (ie only a DEFAULT).
186    
187    2003-04-30  Bernhard Herzog  <[email protected]>
188    
189            * Thuban/UI/view.py: Fix some typos.
190    
191            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
192            not pop up the dialog if the selection becomes empty (this could
193            happen if e.g. a new selection is opened while the identify tool
194            is active and dialog had been closed)
195    
196    2003-04-30  Bernhard Herzog  <[email protected]>
197    
198            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
199            instance variable read_record_last_result
200            (TransientTableBase.read_record): Make sure reading the same
201            record twice works. The implementation uses the new instance
202            variable read_record_last_result
203    
204            * test/test_transientdb.py
205            (TestTransientTable.test_transient_table_read_twice): New test
206            case for the above bug-fix.
207    
208    2003-04-29  Jonathan Coles   <[email protected]>
209    
210            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
211    
212            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
213    
214            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
215            (ClassTable.SetValueAsCustom): Rename keyword argument in
216            ClassGroup* constructors to match argument name.
217    
218    2003-04-29  Bernhard Herzog  <[email protected]>
219    
220            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
221            transient DB if it exists to make sure it doesn't leave a journal
222            file in the temp directory.
223    
224            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
225            self.conn to None after closing the connection to make sure it's
226            not closed twice
227    
228    2003-04-29  Jonathan Coles   <[email protected]>
229    
230            Add a visible parameter in the layer XML tag. The default value is
231            "true". If anything other than "false" is specified we also assume
232            "true". Addresses RTbug #1025.
233    
234            * Doc/thuban.dtd: Add visible parameter to a layer.
235    
236            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
237            of visible from 1 to True.
238            (Layer.__init__): Change default value of visible from 1 to True.
239    
240            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
241            parameter.
242    
243            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
244            parameter.
245    
246            * test/test_load.py: Add new test data contents_test_visible.
247            (LoadSessionTest.setUp): save test data.
248            (LoadSessionTest.testLayerVisibility): Test if the visible flag
249            is loaded correctly.
250    
251            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
252            for saving an invisible layer.
253    
254    2003-04-29  Jonathan Coles   <[email protected]>
255    
256            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
257            legend dialog box and tell it to change its map to the one
258            supplied to SetMap(). Fixes RTbug #1770.
259    
260    2003-04-29  Bernhard Herzog  <[email protected]>
261    
262            Next step of table implementation. Introduce a transient database
263            using SQLite that some of the data is copied to on demand. This
264            allows us to do joins and other operations that require an index
265            for good performance with reasonable efficiency. Thuban now needs
266            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
267            haven't tested that.
268            
269            * Thuban/Model/transientdb.py: New. Transient database
270            implementation.
271    
272            * test/test_transientdb.py: New. Tests for the transient DB
273            classes.
274    
275            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
276            classes to help automatically remove temporary files and
277            directories.
278            (Session.__init__): New instance variables temp_dir for the
279            temporary directory and transient_db for the SQLite database
280            (Session.temp_directory): New. Create a temporary directory if not
281            yet done and return its name. Use AutoRemoveDir to have it
282            automatically deleted
283            (Session.TransientDB): Instantiate the transient database if not
284            done yet and return it.
285    
286            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
287            AutoTransientTable so that data is copied to the transient DB on
288            demand.
289            (SimpleStore): New class that simply combines a table and a
290            shapefile
291    
292            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
293            DBFTable and update its doc-string to reflect the fact that this
294            is only the table interface to a DBF file. Table is now an alias
295            for DBFTable for temporary backwards compatibility.
296    
297            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
298            the last reference to the session goes away so that the temporary
299            files are removed properly.
300    
301            * test/test_load.py (LoadSessionTest.tearDown): Remove the
302            reference to the session to make sure the temporary files are
303            removed.
304    
305    2003-04-29  Bernhard Herzog  <[email protected]>
306    
307            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
308            the __parser instance variable into a normal local variable in
309            read. It's only used there and read will never be called more than
310            once. Plus it introduces a reference cycle that keeps can keep the
311            session object alive for a long time.
312    
313    2003-04-29  Jonathan Coles   <[email protected]>
314    
315            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
316            Projection an immutable item. Fixes RTbug #1825.
317            (Projection.__init__): Initialize instance variables here.
318            (ProjFile.Replace): New. Replace the given projection object with
319            the new projection object. This solves the problem of needing the
320            mutator Projection.SetProjection() in the ProjFrame class and
321            allows a projection to change parameters without changing its
322            location in the file.
323    
324            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
325            be of type wxSAVE and should verify overwriting a file.
326    
327            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
328            ProjFile.Replace() method instead of the mutator
329            Projection.SetProjection(). Also requires that we reassign the
330            client data to the new projection.
331    
332            * test/test_proj.py (TestProjection.test): Test GetName() and
333            GetAllParameters()
334            (TestProjFile.test): Remove tests for Set*() methods. Add tests
335            for Replace().
336    
337    2003-04-25  Jonathan Coles   <[email protected]>
338    
339            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
340            to save the name of the projection.
341    
342            * test/test_save.py (SaveSessionTest.testLayerProjection): New
343            test to verify layer projections are saved correctly.
344    
345    2003-04-25  Jonathan Coles   <[email protected]>
346    
347            * Thuban/Model/proj.py (Projection.SetName): Set the name
348            to "Unknown" if name is None.
349            (Projection.SetAllParameters): New. Set the projection's
350            parameter list to the one supplied.
351            (Projection.SetProjection): New. Set the projection's
352            properties to those of the supplied Projection.
353    
354            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
355            the dialog title to include the map's title.
356            (MainWindow.LayerProjection): Set the dialog title to include
357            the layer's title.
358    
359            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
360            error dialogs into a single method call.
361            (ProjFrame.__VerifyButtons): Add more states to check.
362            (ProjFrame.__GetProjection): Return the current state of an
363            edited projection or None.
364            (ProjFrame.__FillAvailList): Remove checks for states that
365            shouldn't exist.
366            (ProjFrame._OnNew): Clear all selected items and supply
367            a projection panel if necessary.
368    
369            * test/test_proj.py (TestProjFile.test): Add tests for
370            ProjFile.SetAllParameters, ProjFile.SetProjection,
371            ProjFile.SetName.
372    
373    2003-04-25  Jonathan Coles   <[email protected]>
374    
375            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
376            takes an optional argument to select the current projection.
377            This does not guarantee that the item is visible due to
378            limited wxWindows functionality. Fixes RTBug #1821.
379    
380    2003-04-25  Jonathan Coles   <[email protected]>
381    
382            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
383            the projection name and use it when constructing the Projection
384            object.
385    
386            * Thuban/Model/proj.py (Projection.__init__): Change the default
387            value for 'name' to None and then test if name is equal to None
388            in the body of the constructor. This way the caller doesn't have to
389            know what the default value should be. Namely, useful in load.py
390            where we have to pick a default value if the 'name' parameter
391            doesn't exist in the XML file.
392    
393            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
394            Tests a file where a layer has a projection.
395    
396    2003-04-25  Jonathan Coles   <[email protected]>
397    
398            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
399            tree for projection information.
400    
401            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
402            XMLReader.GetFileName.
403            (SessionLoader): Added support for loading projection tags that
404            appear inside a layer.
405    
406            * Thuban/Model/proj.py (ProjFile): Document the class. Move
407            back to using a list because the order of the projections in
408            the file is important to maintain. Fixes RTbug #1817.
409    
410            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
411            to ProjFile.GetFilename.
412    
413            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
414            information.
415    
416            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
417            ProjFrame._OnSaveAs. Removed old dead code from previous
418            implementation.
419            (ProjFrame._OnExport): Add support for exporting more than one
420            projection to a single file.
421            (ProjFrame.__FillAvailList): use string formatting (% operator)
422            to build strings that are (partly) translated. Fixes RTbug #1818.
423    
424            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
425            class.
426    
427    2003-04-24  Bernhard Herzog  <[email protected]>
428    
429            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
430    
431            * po/fr.po: New. French translation by Daniel Calvelo Aros
432    
433            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
434            empty strings.
435    
436    2003-04-24  Jonathan Coles   <[email protected]>
437    
438            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
439            implement the interface that the ProjFrame dialog expects.
440    
441            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
442            name of the projection to be changed.
443            (ProjFile): Use a dictionary instead of a list so that removing
444            projections is easier and we are sure about uniqueness.
445            (ProjFile.Remove): Remove the given projection object.
446    
447            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
448            Return a list with only one projection file instead of searching for
449            any projection file. This simplifies many things if the user can
450            only have one system file and one user file.
451    
452            * Thuban/UI/classgen.py: Change all references to
453            genCombo to genChoice.
454    
455            * Thuban/UI/mainwindow.py: Add a Projection option under the
456            layer menu.
457            (MainWindow.LayerProjection): New. Open up a projection window
458            for a layer.
459    
460            * Thuban/UI/projdialog.py: Large changes to how the dialog is
461            laid out. Use three panels instead of one. One for the list of
462            projections, one for the edit controls, and one for the buttons.
463            Fixed resizing problems so that the dialog resizes correctly
464            when the projection panel changes. Added import/export, save, and
465            new buttons/functionality.
466    
467    2003-04-24  Bernhard Herzog  <[email protected]>
468    
469            First step towards table management. Introduce a simple data
470            abstraction so that we replace the data a layer uses more easily
471            in the next step.
472    
473            * Thuban/Model/data.py: New file with a simple data abstraction
474            that bundles shapefile and dbffile into one object.
475    
476            * Thuban/Model/session.py (Session.OpenShapefile): New method to
477            open shapefiles and return a shape store object
478    
479            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
480            object instead of a shapefile filename. This introduces a new
481            instance variable store holding the datastore. For intermediate
482            backwards compatibility keep the old instance variables.
483            (open_shapefile): Removed. No longer needed with the shape store.
484            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
485            get the shape store used by a layer.
486            (Layer.Destroy): No need to explicitly destroy the shapefile or
487            table anymore.
488    
489            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
490            (MainWindow.AddLayer): Use the session's OpenShapefile method to
491            open shapefiles
492    
493            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
494            session's OpenShapefile method to open shapefiles
495    
496            * test/test_classification.py
497            (TestClassification.test_classification): Use the session's
498            OpenShapefile method to open shapefiles and build the filename in
499            a more platform independed way
500    
501            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
502            Implement to have a session to use in the tests
503            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
504            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
505            session's OpenShapefile method to open shapefiles
506            (TestLayerLegend.setUp): Instantiate a session so that we can use
507            it to open shapefiles.
508            (TestLayerLegend.tearDown): Make sure that all references to
509            layers and session are removed otherwise we may get a resource
510            leak
511    
512            * test/test_map.py (TestMapAddLayer.test_add_layer)
513            (TestMapWithContents.setUp): Instantiate a session so that we can
514            use it to open shapefiles.
515            (TestMapWithContents.tearDown): Make sure that all references to
516            layers, maps and sessions are removed otherwise we may get a
517            resource leak
518            ("__main__"): use support.run_tests() so that more info about
519            uncollected garbage is printed
520    
521            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
522            session's OpenShapefile method to open shapefiles
523            ("__main__"): use support.run_tests() so that more info about
524            uncollected garbage is printed
525    
526            * test/test_selection.py (TestSelection.tearDown): Make sure that
527            all references to the session and the selection are removed
528            otherwise we may get a resource leak
529            (TestSelection.get_layer): Instantiate a session so that we can
530            use it to open shapefiles.
531            ("__main__"): use support.run_tests() so that more info about
532            uncollected garbage is printed
533    
534            * test/test_session.py (TestSessionBase.tearDown)
535            (TestSessionWithContent.tearDown): Make sure that all references
536            to the session and layers are removed otherwise we may get a
537            resource leak
538            (TestSessionWithContent.setUp): Use the session's OpenShapefile
539            method to open shapefiles
540    
541  2003-04-24  Jonathan Coles   <[email protected]>  2003-04-24  Jonathan Coles   <[email protected]>
542    
543          * Thuban/Model/load.py (XMLReader.read): Should have been checking          * Thuban/Model/load.py (XMLReader.read): Should have been checking

Legend:
Removed from v.721  
changed lines
  Added in v.823

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26