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

Legend:
Removed from v.705  
changed lines
  Added in v.807

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26