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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26