/[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 701 by bh, Thu Apr 17 16:18:48 2003 UTC revision 788 by bh, Wed Apr 30 10:57:36 2003 UTC
# Line 1  Line 1 
1    2003-04-30  Bernhard Herzog  <[email protected]>
2    
3            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
4            not pop up the dialog if the selection becomes empty (this could
5            happen if e.g. a new selection is opened while the identify tool
6            is active and dialog had been closed)
7    
8    2003-04-30  Bernhard Herzog  <[email protected]>
9    
10            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
11            instance variable read_record_last_result
12            (TransientTableBase.read_record): Make sure reading the same
13            record twice works. The implementation uses the new instance
14            variable read_record_last_result
15    
16            * test/test_transientdb.py
17            (TestTransientTable.test_transient_table_read_twice): New test
18            case for the above bug-fix.
19    
20    2003-04-29  Bernhard Herzog  <[email protected]>
21    
22            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
23            transient DB if it exists to make sure it doesn't leave a journal
24            file in the temp directory.
25    
26            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
27            self.conn to None after closing the connection to make sure it's
28            not closed twice
29    
30    2003-04-29  Jonathan Coles   <[email protected]>
31    
32            Add a visible parameter in the layer XML tag. The default value is
33            "true". If anything other than "false" is specified we also assume
34            "true". Addresses RTbug #1025.
35    
36            * Doc/thuban.dtd: Add visible parameter to a layer.
37    
38            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
39            of visible from 1 to True.
40            (Layer.__init__): Change default value of visible from 1 to True.
41    
42            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
43            parameter.
44    
45            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
46            parameter.
47    
48            * test/test_load.py: Add new test data contents_test_visible.
49            (LoadSessionTest.setUp): save test data.
50            (LoadSessionTest.testLayerVisibility): Test if the visible flag
51            is loaded correctly.
52    
53            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
54            for saving an invisible layer.
55    
56    2003-04-29  Jonathan Coles   <[email protected]>
57    
58            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
59            legend dialog box and tell it to change its map to the one
60            supplied to SetMap(). Fixes RTbug #1770.
61    
62    2003-04-29  Bernhard Herzog  <[email protected]>
63    
64            Next step of table implementation. Introduce a transient database
65            using SQLite that some of the data is copied to on demand. This
66            allows us to do joins and other operations that require an index
67            for good performance with reasonable efficiency. Thuban now needs
68            SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
69            haven't tested that.
70            
71            * Thuban/Model/transientdb.py: New. Transient database
72            implementation.
73    
74            * test/test_transientdb.py: New. Tests for the transient DB
75            classes.
76    
77            * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
78            classes to help automatically remove temporary files and
79            directories.
80            (Session.__init__): New instance variables temp_dir for the
81            temporary directory and transient_db for the SQLite database
82            (Session.temp_directory): New. Create a temporary directory if not
83            yet done and return its name. Use AutoRemoveDir to have it
84            automatically deleted
85            (Session.TransientDB): Instantiate the transient database if not
86            done yet and return it.
87    
88            * Thuban/Model/data.py (ShapefileStore.__init__): Use an
89            AutoTransientTable so that data is copied to the transient DB on
90            demand.
91            (SimpleStore): New class that simply combines a table and a
92            shapefile
93    
94            * Thuban/Model/table.py (Table, DBFTable): Rename Table into
95            DBFTable and update its doc-string to reflect the fact that this
96            is only the table interface to a DBF file. Table is now an alias
97            for DBFTable for temporary backwards compatibility.
98    
99            * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
100            the last reference to the session goes away so that the temporary
101            files are removed properly.
102    
103            * test/test_load.py (LoadSessionTest.tearDown): Remove the
104            reference to the session to make sure the temporary files are
105            removed.
106    
107    2003-04-29  Bernhard Herzog  <[email protected]>
108    
109            * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
110            the __parser instance variable into a normal local variable in
111            read. It's only used there and read will never be called more than
112            once. Plus it introduces a reference cycle that keeps can keep the
113            session object alive for a long time.
114    
115    2003-04-29  Jonathan Coles   <[email protected]>
116    
117            * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
118            Projection an immutable item. Fixes RTbug #1825.
119            (Projection.__init__): Initialize instance variables here.
120            (ProjFile.Replace): New. Replace the given projection object with
121            the new projection object. This solves the problem of needing the
122            mutator Projection.SetProjection() in the ProjFrame class and
123            allows a projection to change parameters without changing its
124            location in the file.
125    
126            * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
127            be of type wxSAVE and should verify overwriting a file.
128    
129            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
130            ProjFile.Replace() method instead of the mutator
131            Projection.SetProjection(). Also requires that we reassign the
132            client data to the new projection.
133    
134            * test/test_proj.py (TestProjection.test): Test GetName() and
135            GetAllParameters()
136            (TestProjFile.test): Remove tests for Set*() methods. Add tests
137            for Replace().
138    
139    2003-04-25  Jonathan Coles   <[email protected]>
140    
141            * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
142            to save the name of the projection.
143    
144            * test/test_save.py (SaveSessionTest.testLayerProjection): New
145            test to verify layer projections are saved correctly.
146    
147    2003-04-25  Jonathan Coles   <[email protected]>
148    
149            * Thuban/Model/proj.py (Projection.SetName): Set the name
150            to "Unknown" if name is None.
151            (Projection.SetAllParameters): New. Set the projection's
152            parameter list to the one supplied.
153            (Projection.SetProjection): New. Set the projection's
154            properties to those of the supplied Projection.
155    
156            * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
157            the dialog title to include the map's title.
158            (MainWindow.LayerProjection): Set the dialog title to include
159            the layer's title.
160    
161            * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
162            error dialogs into a single method call.
163            (ProjFrame.__VerifyButtons): Add more states to check.
164            (ProjFrame.__GetProjection): Return the current state of an
165            edited projection or None.
166            (ProjFrame.__FillAvailList): Remove checks for states that
167            shouldn't exist.
168            (ProjFrame._OnNew): Clear all selected items and supply
169            a projection panel if necessary.
170    
171            * test/test_proj.py (TestProjFile.test): Add tests for
172            ProjFile.SetAllParameters, ProjFile.SetProjection,
173            ProjFile.SetName.
174    
175    2003-04-25  Jonathan Coles   <[email protected]>
176    
177            * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
178            takes an optional argument to select the current projection.
179            This does not guarantee that the item is visible due to
180            limited wxWindows functionality. Fixes RTBug #1821.
181    
182    2003-04-25  Jonathan Coles   <[email protected]>
183    
184            * Thuban/Model/load.py (SessionLoader.start_projection): Remember
185            the projection name and use it when constructing the Projection
186            object.
187    
188            * Thuban/Model/proj.py (Projection.__init__): Change the default
189            value for 'name' to None and then test if name is equal to None
190            in the body of the constructor. This way the caller doesn't have to
191            know what the default value should be. Namely, useful in load.py
192            where we have to pick a default value if the 'name' parameter
193            doesn't exist in the XML file.
194    
195            * test/test_load.py (LoadSessionTest.testLayerProjection): New.
196            Tests a file where a layer has a projection.
197    
198    2003-04-25  Jonathan Coles   <[email protected]>
199    
200            * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
201            tree for projection information.
202    
203            * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
204            XMLReader.GetFileName.
205            (SessionLoader): Added support for loading projection tags that
206            appear inside a layer.
207    
208            * Thuban/Model/proj.py (ProjFile): Document the class. Move
209            back to using a list because the order of the projections in
210            the file is important to maintain. Fixes RTbug #1817.
211    
212            * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
213            to ProjFile.GetFilename.
214    
215            * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
216            information.
217    
218            * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
219            ProjFrame._OnSaveAs. Removed old dead code from previous
220            implementation.
221            (ProjFrame._OnExport): Add support for exporting more than one
222            projection to a single file.
223            (ProjFrame.__FillAvailList): use string formatting (% operator)
224            to build strings that are (partly) translated. Fixes RTbug #1818.
225    
226            * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
227            class.
228    
229    2003-04-24  Bernhard Herzog  <[email protected]>
230    
231            * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
232    
233            * po/fr.po: New. French translation by Daniel Calvelo Aros
234    
235            * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
236            empty strings.
237    
238    2003-04-24  Jonathan Coles   <[email protected]>
239    
240            * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
241            implement the interface that the ProjFrame dialog expects.
242    
243            * Thuban/Model/proj.py (Projection.SetName): New. Allows the
244            name of the projection to be changed.
245            (ProjFile): Use a dictionary instead of a list so that removing
246            projections is easier and we are sure about uniqueness.
247            (ProjFile.Remove): Remove the given projection object.
248    
249            * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
250            Return a list with only one projection file instead of searching for
251            any projection file. This simplifies many things if the user can
252            only have one system file and one user file.
253    
254            * Thuban/UI/classgen.py: Change all references to
255            genCombo to genChoice.
256    
257            * Thuban/UI/mainwindow.py: Add a Projection option under the
258            layer menu.
259            (MainWindow.LayerProjection): New. Open up a projection window
260            for a layer.
261    
262            * Thuban/UI/projdialog.py: Large changes to how the dialog is
263            laid out. Use three panels instead of one. One for the list of
264            projections, one for the edit controls, and one for the buttons.
265            Fixed resizing problems so that the dialog resizes correctly
266            when the projection panel changes. Added import/export, save, and
267            new buttons/functionality.
268    
269    2003-04-24  Bernhard Herzog  <[email protected]>
270    
271            First step towards table management. Introduce a simple data
272            abstraction so that we replace the data a layer uses more easily
273            in the next step.
274    
275            * Thuban/Model/data.py: New file with a simple data abstraction
276            that bundles shapefile and dbffile into one object.
277    
278            * Thuban/Model/session.py (Session.OpenShapefile): New method to
279            open shapefiles and return a shape store object
280    
281            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
282            object instead of a shapefile filename. This introduces a new
283            instance variable store holding the datastore. For intermediate
284            backwards compatibility keep the old instance variables.
285            (open_shapefile): Removed. No longer needed with the shape store.
286            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
287            get the shape store used by a layer.
288            (Layer.Destroy): No need to explicitly destroy the shapefile or
289            table anymore.
290    
291            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
292            (MainWindow.AddLayer): Use the session's OpenShapefile method to
293            open shapefiles
294    
295            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
296            session's OpenShapefile method to open shapefiles
297    
298            * test/test_classification.py
299            (TestClassification.test_classification): Use the session's
300            OpenShapefile method to open shapefiles and build the filename in
301            a more platform independed way
302    
303            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
304            Implement to have a session to use in the tests
305            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
306            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
307            session's OpenShapefile method to open shapefiles
308            (TestLayerLegend.setUp): Instantiate a session so that we can use
309            it to open shapefiles.
310            (TestLayerLegend.tearDown): Make sure that all references to
311            layers and session are removed otherwise we may get a resource
312            leak
313    
314            * test/test_map.py (TestMapAddLayer.test_add_layer)
315            (TestMapWithContents.setUp): Instantiate a session so that we can
316            use it to open shapefiles.
317            (TestMapWithContents.tearDown): Make sure that all references to
318            layers, maps and sessions are removed otherwise we may get a
319            resource leak
320            ("__main__"): use support.run_tests() so that more info about
321            uncollected garbage is printed
322    
323            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
324            session's OpenShapefile method to open shapefiles
325            ("__main__"): use support.run_tests() so that more info about
326            uncollected garbage is printed
327    
328            * test/test_selection.py (TestSelection.tearDown): Make sure that
329            all references to the session and the selection are removed
330            otherwise we may get a resource leak
331            (TestSelection.get_layer): Instantiate a session so that we can
332            use it to open shapefiles.
333            ("__main__"): use support.run_tests() so that more info about
334            uncollected garbage is printed
335    
336            * test/test_session.py (TestSessionBase.tearDown)
337            (TestSessionWithContent.tearDown): Make sure that all references
338            to the session and layers are removed otherwise we may get a
339            resource leak
340            (TestSessionWithContent.setUp): Use the session's OpenShapefile
341            method to open shapefiles
342    
343    2003-04-24  Jonathan Coles   <[email protected]>
344    
345            * Thuban/Model/load.py (XMLReader.read): Should have been checking
346            if the file_or_filename object had the 'read' attribute.
347    
348    2003-04-23  Jonathan Coles   <[email protected]>
349    
350            * Thuban/Model/resource.py: Fixes RTbug #1813.
351            (ReadProjFile): Add documentation about which exceptions are raised.
352            Always pass the exceptions up to the caller.
353            (GetProjFiles): If the directory can't be read return an empty list.
354            If any of the proj files can't be read skip that file and go
355            on to the next one.
356    
357            * test/test_proj.py: Added test cases to handle nonexistent files,
358            unreadable files, and files that don't parse correctly.
359    
360    2003-04-23  Jonathan Coles   <[email protected]>
361    
362            Projection dialog. Allows the user to select from a list
363            of projection templates and optionally edit them and save new ones.
364    
365            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
366            (ProjPanel): Base class for projection specific panels.
367            (TMPanel): Projection panel for Transverse Mercartor.
368            (UTMPanel): Projection panel for Universal Transverse Mercartor.
369            (LCCPanel): Projection panel for Lambert Conic Conformal.
370            (GeoPanel): Projetion panel for Geographic Projection.
371    
372    2003-04-23  Jonathan Coles   <[email protected]>
373    
374            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
375            promote symmetry. There now exists XMLReader and XMLWriter.
376            (XMLReader.read): New. Call to read the given file descriptor or
377            filename.
378            (XMLReader.close): New. Make sure the file is closed.
379            (XMLReader.GetFileName): New. Return just the file name that is being
380            read from.
381            (XMLReader.GetDirectory): New. Return just the directory of the file
382            that is being read.
383            (XMLReader.AddDispatchers): New. Take a dictionary which contains
384            the names of functions to call as the XML tree is parsed.
385            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
386            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
387            (SessionLoader): Removed class variables start_dispatcher and
388            end_dispatcher since this functionality is now part of a class
389            instance. Fixes RTbug #1808.
390            (SessionLoader.__init__): Add dispatcher functions.
391            (load_xmlfile): Code was moved into the XMLReader.read().
392            (load_session): Use modified SessionLoader.
393    
394            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
395            map's projection.
396    
397            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
398            GetAllParameters.
399            (Projection.GetParameter): Returns the value for the given parameter.
400    
401            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
402            (GetProjFiles): Renamed from GetProjections. Now returns a list
403            of ProjFile objects.
404            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
405            a list of ProjFile objects whose files are not user defined.
406            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
407            list of ProjFile objects whose files are user defined.
408            (ProjFileReader): Extend new XMLReader.
409    
410            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
411            promote symmetry.
412    
413            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
414            control instead of a wxComboBox. wxChoice controls do not generate
415            events as the uses highlights possible choices which fixes problems
416            with resizing the dialog when the use selects an option.
417    
418            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
419            control instead of a wxComboBox.
420    
421            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
422            dialog.
423    
424            * test/test_proj.py (TestProjection.test): New tests for GetParameter
425            method.
426    
427    2003-04-22  Bernhard Herzog  <[email protected]>
428    
429            * Thuban/UI/mainwindow.py: Remove some unused imports and global
430            constants
431    
432            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
433            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
434    
435  2003-04-17  Bernhard Herzog  <[email protected]>  2003-04-17  Bernhard Herzog  <[email protected]>
436    
437          * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.          * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.

Legend:
Removed from v.701  
changed lines
  Added in v.788

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26