/[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 634 by jonathan, Wed Apr 9 15:41:58 2003 UTC revision 723 by bh, Thu Apr 24 15:31:53 2003 UTC
# Line 1  Line 1 
1    2003-04-24  Bernhard Herzog  <[email protected]>
2    
3            First step towards table management. Introduce a simple data
4            abstraction so that we replace the data a layer uses more easily
5            in the next step.
6    
7            * Thuban/Model/data.py: New file with a simple data abstraction
8            that bundles shapefile and dbffile into one object.
9    
10            * Thuban/Model/session.py (Session.OpenShapefile): New method to
11            open shapefiles and return a shape store object
12    
13            * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
14            object instead of a shapefile filename. This introduces a new
15            instance variable store holding the datastore. For intermediate
16            backwards compatibility keep the old instance variables.
17            (open_shapefile): Removed. No longer needed with the shape store.
18            (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
19            get the shape store used by a layer.
20            (Layer.Destroy): No need to explicitly destroy the shapefile or
21            table anymore.
22    
23            * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
24            (MainWindow.AddLayer): Use the session's OpenShapefile method to
25            open shapefiles
26    
27            * Thuban/Model/load.py (ProcessSession.start_layer): Use the
28            session's OpenShapefile method to open shapefiles
29    
30            * test/test_classification.py
31            (TestClassification.test_classification): Use the session's
32            OpenShapefile method to open shapefiles and build the filename in
33            a more platform independed way
34    
35            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
36            Implement to have a session to use in the tests
37            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
38            (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
39            session's OpenShapefile method to open shapefiles
40            (TestLayerLegend.setUp): Instantiate a session so that we can use
41            it to open shapefiles.
42            (TestLayerLegend.tearDown): Make sure that all references to
43            layers and session are removed otherwise we may get a resource
44            leak
45    
46            * test/test_map.py (TestMapAddLayer.test_add_layer)
47            (TestMapWithContents.setUp): Instantiate a session so that we can
48            use it to open shapefiles.
49            (TestMapWithContents.tearDown): Make sure that all references to
50            layers, maps and sessions are removed otherwise we may get a
51            resource leak
52            ("__main__"): use support.run_tests() so that more info about
53            uncollected garbage is printed
54    
55            * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
56            session's OpenShapefile method to open shapefiles
57            ("__main__"): use support.run_tests() so that more info about
58            uncollected garbage is printed
59    
60            * test/test_selection.py (TestSelection.tearDown): Make sure that
61            all references to the session and the selection are removed
62            otherwise we may get a resource leak
63            (TestSelection.get_layer): Instantiate a session so that we can
64            use it to open shapefiles.
65            ("__main__"): use support.run_tests() so that more info about
66            uncollected garbage is printed
67    
68            * test/test_session.py (TestSessionBase.tearDown)
69            (TestSessionWithContent.tearDown): Make sure that all references
70            to the session and layers are removed otherwise we may get a
71            resource leak
72            (TestSessionWithContent.setUp): Use the session's OpenShapefile
73            method to open shapefiles
74    
75    2003-04-24  Jonathan Coles   <[email protected]>
76    
77            * Thuban/Model/load.py (XMLReader.read): Should have been checking
78            if the file_or_filename object had the 'read' attribute.
79    
80    2003-04-23  Jonathan Coles   <[email protected]>
81    
82            * Thuban/Model/resource.py: Fixes RTbug #1813.
83            (ReadProjFile): Add documentation about which exceptions are raised.
84            Always pass the exceptions up to the caller.
85            (GetProjFiles): If the directory can't be read return an empty list.
86            If any of the proj files can't be read skip that file and go
87            on to the next one.
88    
89            * test/test_proj.py: Added test cases to handle nonexistent files,
90            unreadable files, and files that don't parse correctly.
91    
92    2003-04-23  Jonathan Coles   <[email protected]>
93    
94            Projection dialog. Allows the user to select from a list
95            of projection templates and optionally edit them and save new ones.
96    
97            * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
98            (ProjPanel): Base class for projection specific panels.
99            (TMPanel): Projection panel for Transverse Mercartor.
100            (UTMPanel): Projection panel for Universal Transverse Mercartor.
101            (LCCPanel): Projection panel for Lambert Conic Conformal.
102            (GeoPanel): Projetion panel for Geographic Projection.
103    
104    2003-04-23  Jonathan Coles   <[email protected]>
105    
106            * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
107            promote symmetry. There now exists XMLReader and XMLWriter.
108            (XMLReader.read): New. Call to read the given file descriptor or
109            filename.
110            (XMLReader.close): New. Make sure the file is closed.
111            (XMLReader.GetFileName): New. Return just the file name that is being
112            read from.
113            (XMLReader.GetDirectory): New. Return just the directory of the file
114            that is being read.
115            (XMLReader.AddDispatchers): New. Take a dictionary which contains
116            the names of functions to call as the XML tree is parsed.
117            (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
118            (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
119            (SessionLoader): Removed class variables start_dispatcher and
120            end_dispatcher since this functionality is now part of a class
121            instance. Fixes RTbug #1808.
122            (SessionLoader.__init__): Add dispatcher functions.
123            (load_xmlfile): Code was moved into the XMLReader.read().
124            (load_session): Use modified SessionLoader.
125    
126            * Thuban/Model/map.py (Map.GetProjection): New. Returns the
127            map's projection.
128    
129            * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
130            GetAllParameters.
131            (Projection.GetParameter): Returns the value for the given parameter.
132    
133            * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
134            (GetProjFiles): Renamed from GetProjections. Now returns a list
135            of ProjFile objects.
136            (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
137            a list of ProjFile objects whose files are not user defined.
138            (GetUserProjFiles): Renamed from GetUserProjections. Returns a
139            list of ProjFile objects whose files are user defined.
140            (ProjFileReader): Extend new XMLReader.
141    
142            * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
143            promote symmetry.
144    
145            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
146            control instead of a wxComboBox. wxChoice controls do not generate
147            events as the uses highlights possible choices which fixes problems
148            with resizing the dialog when the use selects an option.
149    
150            * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
151            control instead of a wxComboBox.
152    
153            * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
154            dialog.
155    
156            * test/test_proj.py (TestProjection.test): New tests for GetParameter
157            method.
158    
159    2003-04-22  Bernhard Herzog  <[email protected]>
160    
161            * Thuban/UI/mainwindow.py: Remove some unused imports and global
162            constants
163    
164            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
165            (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
166    
167    2003-04-17  Bernhard Herzog  <[email protected]>
168    
169            * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
170            (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
171            anymore.
172            (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
173            (Layer.ShapeType, Layer.Shape): No need to call
174            self.open_shapefile since it's always called in __init__
175    
176            * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
177            In wxPython 2.4 there's no need to extend MainLoop anymore since
178            wxPython itself makes sure OnExit is called.
179    
180    2003-04-16  Jonathan Coles   <[email protected]>
181    
182            Initial putback of projection management code. Includes new
183            classes to read and write projection files. The current load
184            and save classes were abstracted a bit so they could be reused.
185            The Projection class was extended to provide new methods and
186            have a name.
187    
188            * Thuban/Model/load.py (XMLProcessor): New. Contains all the
189            general XML reading methods that were part of ProcessSession.
190    
191            * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
192            name.
193            (ProjFile): New. Represents a file that contains projection
194            information.
195    
196            * Thuban/Model/resource.py: New. Contains general utilities
197            for read and writing projection files.
198    
199            * Thuban/Model/save.py (XMLSaver): New. Contains all the
200            general XML writing methods that were part of SessionSaver.
201            (SessionSaver): Renamed from Saver.
202    
203            * test/test_proj.py: New test cases for the projection
204            file read and write functions.
205    
206    2003-04-16  Jonathan Coles   <[email protected]>
207    
208            * Thuban/Model/classification.py: Use repr() around values
209            in the ClassGroup*.__repr__() methods so it is clearer when
210            a value is a string and when it is a number.
211    
212            * test/test_load.py: Rework the classification test to test
213            that we can load old files.
214            (testLabels): Test a file where the groups have labels.
215    
216    2003-04-16  Bernhard Herzog  <[email protected]>
217    
218            Safer implementation of the performance enhancements of the
219            low-level renderer:
220            
221            * extensions/thuban/wxproj.cpp (extract_projection)
222            (extract_pointer): Rename extract_projection to extract_pointer
223            and redefine its purpose to return the pointer stored in a CObject
224            returned by the object's cobject method. Update all callers.
225            (s_draw_info, free_draw_info, draw_polygon_init): Implement the
226            handling of these low-level parameters so that each s_draw_info
227            instance is handled as a CObject at python level that also
228            contains real references to the actual python objects which
229            contain the values in the struct. Add free_draw_info as the
230            destructor.
231            (draw_polygon_shape): Add the py_draw_info parameter which must a
232            cobject containing an s_draw_info pointer.
233    
234            * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
235            method to instantiat the low-level render parameter
236            (MapRenderer.draw_shape_layer): Use the new method. Remove some
237            commented out code.
238            (MapRenderer.draw_polygon_shape): Make the first parameter not the
239            layer but the low-level render parameter
240            (ScreenRenderer.draw_shape_layer): Use the low-level render
241            parameter.
242    
243    2003-04-15  Jonathan Coles   <[email protected]>
244    
245            * Thuban/Model/classification.py: Implemented __repr__ for
246            the ClassGroup* classes to make debugging a bit easier.
247            (ClassGroup.SetLabel): Check that the string is an instance
248            of StringTypes not StringType. Accounts for Unicode strings.
249    
250            * Thuban/Model/color.py: Implemented __repr__ to make
251            debugging a bit easier.
252    
253            * Thuban/Model/save.py (Saver.write_classification): Need to
254            save the group label.
255    
256            * test/test_load.py (testClassification): New. Loads the
257            iceland_sample_test.thuban file and checks if it was loaded
258            correctly.
259    
260    2003-04-15  Jonathan Coles   <[email protected]>
261    
262            * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
263            to improve rendering performance by initializing the variables
264            that are not change each time draw_polygon_shape() is called.
265            The values are stored in a global struct draw_info.
266            (draw_polygon_shape): Removed initialization code that is
267            now in draw_polygon_init().
268    
269            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
270            drawing initialization call to draw_polygon_init()
271            (MapRenderer.draw_polygon_shape): Use new signature of
272            draw_polygon_shape.
273    
274            * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
275            weirdness by setting the range to (1, maxint).
276    
277            * Thuban/Model/classification.py (ClassGroupProperties): Make
278            instance variables private and optimize comparison operator
279            by first checking if the color references are the same.
280            (ClassGroupSingleton): Make instance variables private.
281            (ClassGroupRange): Make instance variables private.
282    
283            * HOWTO-Release: Filled in missing steps for releasing packages.
284    
285    2003-04-15  Bernhard Herzog  <[email protected]>
286    
287            First stab at internationalized messages:
288    
289            * Thuban/__init__.py (_): Implement the translation function for
290            real using the python gettext module.
291    
292            * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
293            translate empty strings.
294    
295            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
296            Add a missing space to a warning message
297    
298            * po/README: New. Notes about the management of the translation
299            files.
300    
301            * po/Makefile: New. Makefile to help manage the translation files.
302    
303            * po/es.po: New. Spanish translation by Daniel Calvelo Aros
304    
305            * MANIFEST.in: Include the *.mo files in Resources/Locale and the
306            translations and support files in po/
307    
308            * setup.py (data_files): Add the *.mo files to the data_files too
309    
310            * README: Add note about the translations when building from CVS
311    
312    2003-04-14  Jonathan Coles   <[email protected]>
313    
314            * Thuban/UI/dock.py: Fixes some window resizing problems most
315            noticable under windows. Always assume the button bitmaps will
316            be there. Code clean up.
317            (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
318            images for the dock/undock button to the same images.
319            Work around for RTbug #1801.
320    
321            * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
322            be allowed to grow within the sizer. Fixes a bug under Windows
323            where the toolbar wasn't being drawn.
324    
325    2003-04-14  Frank Koormann   <[email protected]>
326    
327            * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
328            Updated design to try to make the button functionality more
329            transparent.
330    
331    2003-04-14  Jonathan Coles   <[email protected]>
332    
333            * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
334            finalize the intialization of the panel.
335    
336            * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
337            creation of the panel. Should be the last thing called in the
338            initializer of a subclass.
339    
340            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
341            set the current selections in the combo boxes. This is needed
342            under Windows.
343    
344            * Thuban/UI/classifier.py (Classifier.__init__): Add a top
345            level panel to the dialog so that the background colors are
346            consistent under Windows.
347    
348    2003-04-11  Jonathan Coles   <[email protected]>
349    
350            * Thuban/UI/classgen.py: Change color ramps to start at white
351            not black.
352    
353            * Thuban/UI/legend.py: Enable/disable the legend buttons when
354            the legend changes. Fixes RTbug #1793.
355    
356            * test/test_classification.py: Added test for copying of
357            classifications.
358    
359    2003-04-11  Jonathan Coles   <[email protected]>
360    
361            * Thuban/UI/resource.py: New. Centralize the loading of resources
362            such as bitmaps.
363    
364            * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
365            added images to the move buttons, added 'reverse' button.
366            (CustomRampPanel.__init__): Added images to the move buttons.
367            (GreyRamp): New. Generates a ramp from white to black.
368            (HotToColdRamp): New. Generates a ramp from cold to hot colors.
369    
370            * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
371            ID_PROPERTY_*.
372            (Classifier.__init__): Minor changes to the layout.
373            (Classifier._OnTitleChanged): Listen for when the user edits the
374            title and update the dialog's title and the layer's title.
375    
376            * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
377    
378            * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
379            (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
380            if the layer's title changes.
381    
382            * Thuban/UI/mainwindow.py: Added new menu item and associated code
383            to open a dialog to rename the map.
384            (MainWindow): Use new resource class to import bitmaps.
385    
386    2003-04-11  Jonathan Coles   <[email protected]>
387    
388            * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
389            Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
390            Resources/Bitmaps/group_use_none.xpm,
391            Resources/Bitmaps/group_use_not.xpm,
392            Resources/Bitmaps/hide_layer.xpm,
393            Resources/Bitmaps/layer_properties.xpm,
394            Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
395            Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
396            New.
397    
398    2003-04-10  Jonathan Coles   <[email protected]>
399    
400            * Thuban/Model/classification.py: (ClassGroupRange.__init__):
401            Should pass group to ClassGroup constructor.
402    
403    2003-04-10  Jonathan Coles   <[email protected]>
404    
405            * Thuban/Model/classification.py: (ClassGroup): Move all the common
406            methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
407            here. Implement SetVisible(), IsVisible().
408            (ClassGroup.__init__): Add group parameter which acts as a copy
409            constructor.
410    
411            * Thuban/UI/classifier.py (ClassTable): Add a new column for the
412            "Visible" check boxes.
413            (Classifier): Rename the buttons and refactor the code to match
414            the new labels.
415    
416            * Thuban/UI/legend.py: Classify button is now called "Properties".
417            Refactored the code to change variable names.
418            (LegendTree.__FillTreeLayer): Only list a group if it is visible.
419    
420            * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
421            MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
422            renamed to MainWindow.LayerEditProperties.
423            (MainWindow.ToggleLegend): Don't include map name in legend title.
424            (MainWindow.SetMap): Added the map name to the window title.
425            (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
426            MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
427            Functionality is found in the layer properties dialog.
428    
429            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
430            draw visible groups.
431    
432  2003-04-09  Jonathan Coles   <[email protected]>  2003-04-09  Jonathan Coles   <[email protected]>
433    
434          * Thuban/UI/classgen.py: Modifications to allow simple          * Thuban/UI/classgen.py: Modifications to allow simple

Legend:
Removed from v.634  
changed lines
  Added in v.723

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26