/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.687  
changed lines
  Added in v.766

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26