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

Legend:
Removed from v.619  
changed lines
  Added in v.843

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26