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

Legend:
Removed from v.688  
changed lines
  Added in v.769

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26