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

Legend:
Removed from v.700  
changed lines
  Added in v.764

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26