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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26