/[thuban]/branches/greater-ms3/thuban/ChangeLog
ViewVC logotype

Diff of /branches/greater-ms3/thuban/ChangeLog

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26