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

Legend:
Removed from v.669  
changed lines
  Added in v.865

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26