/[thuban]/branches/WIP-pyshapelib-bramz/ChangeLog
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/ChangeLog

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

revision 766 by bh, Tue Apr 29 12:42:27 2003 UTC revision 1220 by bh, Mon Jun 16 17:43:09 2003 UTC
# Line 1  Line 1 
1    2003-06-16  Bernhard Herzog  <[email protected]>
2    
3            Update to the layer interface: Direct access to the table,
4            shapetable, shapefile and filename attributes is now actively
5            deprecated by issuing deprecation warnings for all places where
6            this happens.
7    
8            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
9            to the instance variables table, shapetable, shapefile and
10            filename via __getattr__ so that we can issue a deprecation
11            warning.
12            (Layer.SetShapeStore): Don't set the deprecated instance variables
13            any more
14            (Layer.SetShapeStore): Don't use deprecated layer instance
15            variables
16            (Layer.Destroy): No need to explicitly remove the instance
17            variables any more
18            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
19            instance variables
20    
21            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
22            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
23            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
24            use deprecated layer instance variables
25    
26            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
27            deprecated layer instance variables
28    
29            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
30            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
31            instance variables
32    
33            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
34            deprecated layer instance variables
35    
36            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
37            deprecated layer instance variables
38    
39            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
40            deprecated layer instance variables
41    
42            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
43            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
44            variables
45    
46            * test/runtests.py (main): Turn Thuban's deprecation warnings into
47            errors so that they're cought by the tests
48    
49            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
50            layer instance variables
51    
52    2003-06-16  Jonathan Coles   <[email protected]>
53    
54            Fix a problem under Windows whereby if the user double-clicks on a
55            layer in the legend that tree item will expand or collapse as well
56            as open the layer properties dialog. The state of the tree item
57            should not be affected.
58    
59            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
60            preventExpandCollapse and subscribe to expanding and collapsing
61            events.
62            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
63            collapsing events and will veto the event if it has been triggered
64            by the user double clicking on a layer.
65            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
66            that an expanding/collapsing event should be vetoed.
67    
68    2003-06-13  Bernhard Herzog  <[email protected]>
69    
70            * Thuban/UI/classifier.py (Classifier.OnClose)
71            (Classifier.map_layers_removed)
72            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
73            in OnClose and not in map_layers_removed or
74            layer_shapestore_replaced to make sure it always happens when the
75            dialog is closed
76    
77    2003-06-13  Jonathan Coles   <[email protected]>
78    
79            This puts back a fix for Windows where a panel is needed so that
80            the background of the table view appears correctly.
81    
82            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
83            object that can be used by derived classes to place any
84            controls (including the grid) onto.
85            (QueryTableFrame.__init__): Use the panel as the parent window
86            for all the controls. Reparent the grid so that the panel is
87            the parent. Call UpdateStatusText() to correctly initialize
88            the status bar.
89    
90    2003-06-13  Jonathan Coles   <[email protected]>
91    
92            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
93            from wxFrame (as opposed to wxDialog like the other classes)
94            but otherwise behaves like the other classes. This is needed
95            for the TableView which isn't really a dialog and needs to
96            have a status bar and control buttons.
97    
98            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
99            instance variable to keep track of how many rows are selected.
100            Subscribe once to the the events we are interested in.
101            (ThubanGrid.OnRangeSelect): Only handle event if event handling
102            hasn't been turned off.
103            (ThubanGrid.OnSelectCell): Only handle event if event handling
104            hasn't been turned off.
105            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
106            as an event listener (which changes the event handler stack)
107            simply set an instance variable to False. This is checked in
108            the event handlers.
109            (ThubanGrid.GetNumberSelected): Return the number of currently
110            selected rows.
111            (TableFrame): Inherit from ThubanFrame so we can have a
112            status bar and control buttons.
113            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
114            Explicitly set which items are selected in the operator choice and
115            action choice so there is always a valid selection. Fixes RTbug #1941.
116            Subscribe to grid cell selection events so we can update the
117            status bar.
118            (QueryTableFrame.UpdateStatusText): Update the status bar with
119            how many rows are in the grid, how many columns, and how many
120            rows are selected.
121            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
122            Call UpdateStatusText when cells are (de)selected.
123            (QueryTableFrame.OnQuery): Use the string value in the value
124            combo if either the selected item index is 0 or if the string
125            cannot be found in the predefined list (this happens if the
126            user changes the text). Fixes RTbug #1940.
127            Only turn off the grid event listeners if there a query comes
128            back with a none empty list of ids. in the case that the list
129            is empty this causes a grid.ClearSelection() call to actually
130            clear the grid selection which causes the selected items in
131            the map to be deselected. Fixes RTbug #1939.
132    
133            * test/test_save.py (XMLWriterTest.Encode): Check return values.
134            Fixes RTbug #1851.
135    
136    2003-06-13  Bernhard Herzog  <[email protected]>
137    
138            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
139            self.selected_shape with the current selection to make sure the
140            contents of the dialog are up to date when it's shown for the
141            first time.
142            The dialog used to work without this by luck. The recent fix to
143            the connector module 'broke' a 'feature' the identify view was
144            relying on, i.e that subscribing to a message in response to
145            receiving a message of that type would mean that the new
146            subscriber would also be called for the same message.
147            
148    2003-06-12  Jonathan Coles   <[email protected]>
149    
150            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
151            the image is rendered. Fixes RTbug #1937.
152    
153    2003-06-12  Jonathan Coles   <[email protected]>
154    
155            * Thuban/Lib/fileutil.py: As is done under Windows, create the
156            user directory if it doesn't exist on a posix system.
157            Fixes RTbug #1815.
158    
159            * Thuban/Model/resource.py (get_user_proj_files): Moved the
160            called to get_application_dir here, so that the directory
161            will only be called if this method is invoked.
162    
163            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
164            the projfilepath if no projection is selected.
165    
166    2003-06-12  Jonathan Coles   <[email protected]>
167    
168            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
169            the scalebar if the current map has no projection set.
170    
171            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
172            projfilepath label to just the basename of the projection file
173            rather than include the entire path.
174    
175            * Thuban/Model/resource.py: Fix missed proj functions that
176            needed to be renamed.
177    
178    2003-06-12  Jonathan Coles   <[email protected]>
179    
180            * Thuban/Model/classification.py: Removed assert statements that
181            tested if the variable was an instance of Color.
182    
183            * Thuban/Model/color.py (Color): Remove commented code that isn't
184            used.
185            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
186            Fixes RTbug #1835.
187            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
188            Needed now that the class doesn't inherit from Color.
189    
190    2003-06-12  Jonathan Coles   <[email protected]>
191    
192            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
193            check unicode strings.
194    
195            * test/test_layer.py: Check for existence of gdal.
196    
197    2003-06-12  Jonathan Coles   <[email protected]>
198        
199            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
200            that was in load.py
201    
202            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
203            that was in save.py
204    
205    2003-06-12  Jonathan Coles   <[email protected]>
206    
207            This is largely a collection of bug fixes. We also handle the
208            case where gdal is not on the system. The XMLReader and XMLWriter
209            classes were moved into there own files to resolve some circular
210            import references and because they shouldn't really be in the
211            file that is dediciated to reading/writing session files since
212            they are also used elsewhere.
213    
214            * Thuban/Model/classgen.py: Renamed functions to follow the
215            function_names_with_underscores style. Fixes RTbug #1903.
216            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
217    
218            * Thuban/Model/layer.py: Import gdal only if it available.
219            (RasterLayer): Handle the case where the gdal library is unavailable.
220            Addresses RTbug #1877.
221    
222            * Thuban/Model/load.py (XMLReader): Moved into seperate file
223            xmlreader.py.
224    
225    2003-06-12  Jonathan Coles   <[email protected]>
226    
227            This is largely a collection of bug fixes. We also handle the
228            case where gdal is not on the system. The XMLReader and XMLWriter
229            classes were moved into there own files to resolve some circular
230            import references and because they shouldn't really be in the
231            file that is dediciated to reading/writing session files since
232            they are also used elsewhere.
233    
234            * Thuban/Model/classgen.py: Renamed functions to follow the
235            function_names_with_underscores style. Fixes RTbug #1903.
236            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
237    
238            * Thuban/Model/layer.py: Import gdal only if it available.
239            (RasterLayer): Handle the case where the gdal library is unavailable.
240            Addresses RTbug #1877.
241    
242            * Thuban/Model/load.py (XMLReader): Moved into seperate file
243            xmlreader.py.
244    
245            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
246            file xmlwriter.py.
247    
248            * Thuban/Model/resource.py: Renamed functions to following the
249            function_names_with_underscores style.
250            (has_gdal_support): New function that returns true if the gdal
251            library is available. Addresses RTbug #1877.
252    
253            * Thuban/UI/application.py (ThubanApplication.OpenSession):
254            Display a message box if the gdal library is not available, but
255            only if there are any layers that would use it. Addresses RTbug #1877.
256    
257            * Thuban/UI/classgen.py: Use renamed projection resource functions.
258            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
259            when using integers versus floats.
260    
261            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
262            determine if the "Add Image Layer" menu option should be
263            greyed out or not. Addresses RTbug #1877.
264    
265            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
266    
267            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
268            optimize if a raster layer is visible. Fixes RTbug #1931.
269            Only draw the raster layer if the gdal library is available.
270            Addresses RTbug #1877.
271    
272            * test/test_classgen.py: Add tests for generate_singletons,
273            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
274            (test_calculate_quantiles): Fix some tests to catch the new
275            ValueError that is raised.
276    
277            * test/test_proj.py: Use renamed projection resource functions.
278    
279            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
280            test for saving classified layers. Fixes RTbug #1902.
281            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
282    
283    2003-06-12  Jan-Oliver Wagner <[email protected]>
284    
285            Fix for http://intevation.de/rt/webrt?serial_num=1900.
286    
287            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
288    
289            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
290            multiplechoicedialog.py rather than from the wxPython library.
291    
292    2003-06-11  Frank Koormann  <[email protected]>
293    
294            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
295            update.
296    
297    2003-06-11  Frank Koormann  <[email protected]>
298    
299            * Thuban/Lib/fileutil.py (get_application_dir): New function to
300            determine the absolute .thuban/thuban directory under
301            "posix" (os.expanduser) and "nt" (read AppData registry key).
302    
303            * Thuban/Model/resource.py: Use get_application_dir
304    
305            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
306            Use get_application_dir.
307    
308    2003-06-10  Bernhard Herzog  <[email protected]>
309    
310            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
311            the messages MAP_LAYERS_REMOVED messages
312            (LayerTableFrame.OnClose): Unsubscribe from it.
313            (LayerTableFrame.map_layers_removed): New. Receiver for
314            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
315            dialog is showing is removed.
316    
317    2003-06-10  Bernhard Herzog  <[email protected]>
318    
319            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
320            of the receivers list so that unsubscribing in a receiver doesn't
321            modify it while iterating over it.
322    
323            * test/test_connector.py
324            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
325            unsubscribing in a receiver works correctly. See docstring for
326            details
327    
328    2003-06-10  Bernhard Herzog  <[email protected]>
329    
330            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
331            message.
332    
333            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
334            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
335            LAYER_CHANGED will still be sent if the classification changes.
336    
337            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
338            parameter so we can subscribe to some of its messages
339            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
340            and the layer's LAYER_SHAPESTORE_REPLACED
341            (Classifier.unsubscribe_messages): New. Unsubscribe from message
342            subscribed to in __init__
343            (Classifier.map_layers_removed)
344            (Classifier.layer_shapestore_replaced): receivers for the messages
345            subscribed to in __init__. Unsubscribe and close the dialog
346    
347            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
348            the map to the Classifier dialog
349    
350            * test/test_layer.py (SetShapeStoreTests): Derive from
351            SubscriberMixin as well so we can test messages
352            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
353            messages
354            (SetShapeStoreTests.tearDown): Clear the messages again
355            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
356            for the modified flag too
357            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
358            to check whether SetShapeStore sets the modified flag
359            (SetShapeStoreTests.test_set_shape_store_different_field_name)
360            (SetShapeStoreTests.test_set_shape_store_same_field)
361            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
362            Add tests for the messages. This checks both the new
363            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
364    
365    2003-06-06  Jan-Oliver Wagner <[email protected]>
366    
367            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
368            the menu items.
369    
370    2003-06-05  Frank Koormann  <[email protected]>
371    
372            * Thuban/UI/identifyview.py (IdentifyView.__init__):
373            Layout reimplemented without panel. Make life easier to fit the list
374            in the dialog.
375    
376    2003-06-05  Frank Koormann  <[email protected]>
377    
378            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
379            once on initialisation (Former implementation resulted in multiple
380            entries for each projection).
381            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
382            if set, select the projection found under the specified name. This
383            overwrites any other selection estimate.
384            Removed projchoice filling from this method.
385            (ProjFrame._OnSave, ProjFrame._OnAddToList):
386            Updated call of ProjFrame.__FillAvailList
387            (LCCPanel._DoLayout): Moved parameter controls in more common order.
388    
389            * Resources/Projections/defaults.proj: Extended defaults representing
390            various common European projections.
391    
392    2003-06-05  Frank Koormann  <[email protected]>
393    
394            * Thuban/UI/identifyview.py (IdentifyView.__init__):
395            Use ListCtrl instead of GridCtrl
396    
397            * Thuban/Model/resource.py:
398            Guess location of .thuban directory from tempdir parent directory.
399    
400            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
401            Guess location of .thuban directory from tempdir parent directory.
402    
403    2003-06-04  Bernhard Herzog  <[email protected]>
404    
405            Do not cache the values returned by the tree widget's
406            GetFirstChild and GetNextChild methods because it led to lots of
407            segfaults. The new way requires more brute force but is more
408            reliable.
409    
410            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
411            variable layer2id
412            (LegendTree.find_layer): New method to do with brute force what
413            layer2id tried to accomplish
414            (LegendTree._OnMsgLayerChanged)
415            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
416            Use find_layer instead of layer2id
417            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
418            update layer2id anymore
419            (LegendTree._OnMsgMapLayersRemoved)
420            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
421    
422    2003-06-03  Thomas Koester  <[email protected]>
423    
424            * Thuban/Model/classgen.py (GenQuantiles0): New function.
425    
426    2003-06-02  Bernhard Herzog  <[email protected]>
427    
428            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
429            New commands.
430            (main_menu): Add the new commands.
431            (MainWindow.TableRename): New. Implementation of the table_rename
432            command.
433            (MainWindow.RenameLayer): New. Implementation of the layer_rename
434            command.
435    
436            * Thuban/Model/session.py (Session.AddTable): call self.changed to
437            set the modified flag
438    
439            * test/test_session.py (TestSessionSimple.test_add_table): Test
440            whether the modified flag is set properly
441    
442            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
443            instead of issue so that the modified flags get updated.
444    
445            * test/test_base.py (SomeTitledObject): Derive from Modifiable
446            instead of Publisher to reflect reality better and to accomodate
447            the fact that SetTitle now calls changed instead of issue
448    
449    2003-06-02  Bernhard Herzog  <[email protected]>
450    
451            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
452            acquisition has to happen before the try in a try-finally.
453    
454    2003-06-02  Bernhard Herzog  <[email protected]>
455    
456            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
457            possible that a layer is removed that is not currently selected in
458            the legend so don't check for this.
459    
460    2003-05-30  Bernhard Herzog  <[email protected]>
461    
462            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
463            variables to None that have direct or indirect references to
464            shapefiles or dbf files to make sure that they do go away and the
465            files are closed.
466    
467    2003-05-30  Bernhard Herzog  <[email protected]>
468    
469            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
470            availImgListIndices when a new image list is created
471            
472    2003-05-30  Bernhard Herzog  <[email protected]>
473    
474            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
475            changing_selection to indicate whether the LegendTree code itself
476            is currently changing the selection
477            (LegendTree.normalize_selection): New method to normalize the
478            selection by selecting the layer item even if the user clicked on
479            the classification.
480            (LegendTree._OnSelChanged): normalize the selection. This works
481            around a bug in wx which doesn't keep track of the selection
482            properly when subtrees are deleted.
483    
484    2003-05-30  Bernhard Herzog  <[email protected]>
485    
486            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
487            maximum and minimum scale factors.
488    
489            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
490            changes in classgen.py
491    
492    2003-05-30  Jonathan Coles   <[email protected]>
493    
494            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
495            all the methods functions. Fixes RTBug #1903.
496    
497            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
498            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
499            RTBug #1907.
500    
501            * Thuban/UI/classgen.py: Use classgen functions that were part
502            of the ClassGenerator class. Put try/finally blocks around
503            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
504            RTBug #1904.
505    
506            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
507    
508            * Thuban/UI/legend.py: The legend was cleared and repopulated any
509            time something changed which caused some state to be lost such
510            as which children were expanded or collapsed. Fixes RTBug #1901.
511            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
512            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
513            the legend but not in the map.
514            (LegendTree.__FillTree): Move main functionality out into smaller
515            methods that can be used by other methods.
516            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
517            if they are available.
518            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
519            that we override the wxTreeCtrl method. Iterate over children
520            and call __RemoveLayer.
521            (LegendTree.__AddLayer): New. Add a new layer to the legend.
522            (LegendTree.__RemoveLayer): Remove a layer from the legend.
523            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
524            Should only be called with the id of a layer branch.
525            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
526            Returns the root item or creates one if necessary.
527    
528            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
529            ProjectRasterFile with tuple arguments instead of strings.
530    
531            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
532            with try/finally. Fixes RTBug #1904.
533    
534            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
535            with try/finally. Fixes RTBug #1904.
536            (MapCanvas.FitSelectedToWindow): If a single point is selected
537            simply center it on the display. Fixes RTBug #1849.
538    
539            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
540            to be compiled as a standalone app. Now the code can only be
541            called from Python which simplifies the parameter passing.
542            (ProjectRasterFile): Handle Python arguments. Remove code that
543            checks for a destination dataset. Add more clean up code.
544    
545            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
546            TestMapWithContents.test_lower_layer_bottom):
547            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
548            Fixes RTBug #1907.
549    
550            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
551            extent to the map when the legend is toggled. Fixes RTBug #1881.
552    
553    2003-05-29  Jan-Oliver Wagner <[email protected]>
554    
555            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
556            unsubscribes all that is subcribed in __init__.
557    
558    2003-05-28  Bernhard Herzog  <[email protected]>
559    
560            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
561            (MainWindow.CanDuplicateLayer): New methods to implement the
562            Layer/Duplicate command.
563            (layer_duplicate command): New.
564            (main_menu): Add layer_duplicate to the Layer menu.
565    
566    2003-05-28  Bernhard Herzog  <[email protected]>
567    
568            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
569            renderer so that NULL/None values get displayed differently (by a
570            gray rectangle).
571            (TableGrid.__init__): Override the default renderers
572    
573    2003-05-28  Bernhard Herzog  <[email protected]>
574    
575            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
576            classification to "None" if the type of the field has changed.
577    
578            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
579            test for the Layer.SetShapeStore method
580    
581    2003-05-28  Jan-Oliver Wagner <[email protected]>
582    
583            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
584            does not necessarily have a filename).
585    
586    2003-05-28  Jan-Oliver Wagner <[email protected]>
587    
588            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
589            sort the selection list for the dialog.
590    
591    2003-05-28  Frank Koormann  <[email protected]>
592    
593            * extensions/thuban/wxproj.cpp
594            (project_point): Removed cast to int for projected point coordinates.
595            (shape_centroid): Return last point if all polygon vertices fall
596            to one point.
597    
598    2003-05-28  Bernhard Herzog  <[email protected]>
599    
600            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
601            with layers that don't have shapestores, i.e. raster layers.
602    
603    2003-05-28  Bernhard Herzog  <[email protected]>
604    
605            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
606            when determining the title from the filename.
607    
608            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
609            reflect changes in the way the title is derived from the filename
610    
611    2003-05-28  Frank Koormann  <[email protected]>
612    
613            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
614            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
615    
616    2003-05-27  Bernhard Herzog  <[email protected]>
617    
618            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
619            delegate SelectedLayer.
620            (MainWindow.LayerUnjoinTable): Implement.
621            (_can_unjoin): New. Helper function for the sensitivity of the
622            layer/unjoin command.
623    
624            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
625            (DerivedShapeStore.OrigShapeStore): New. Return the original
626            shapestore. Used to figure out how to unjoin.
627            (DerivedShapeStore.Shapefile): Fix a typo.
628    
629    2003-05-27  Bernhard Herzog  <[email protected]>
630    
631            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
632            well
633            (JoinDialog.__init__): Use the layer parameter and only build the
634            left choice when a layer is given
635            (JoinDialog.OnJoin): Handle layer joins as well
636            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
637            that the user selects the "Select..." item. The sensitivitly
638            updating is now in update_sensitivity
639            (JoinDialog.y): New method to refactor the sensitivity update of
640            the join button into its own method.
641    
642            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
643    
644    2003-05-27  Bernhard Herzog  <[email protected]>
645    
646            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
647            iff there are unreferenced tables in the session
648    
649    2003-05-27  Bernhard Herzog  <[email protected]>
650    
651            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
652    
653            * Thuban/Model/session.py (Session.UnreferencedTables): New method
654            to return tables that are not referenced by other tables or shape
655            stores and can be removed.
656            (Session.RemoveTable): Issue a TABLE_REMOVED message after
657            removing the table
658    
659            * Thuban/UI/mainwindow.py: Remove unused imports
660            (MainWindow.TableClose): Implement.
661    
662            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
663            messages so that the frame will be automatically closed when a new
664            session is opened or the table is removed.
665            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
666            __init__
667            (TableFrame.close_on_session_replaced)
668            (TableFrame.close_on_table_removed): New. Subscribers that close
669            the window
670    
671            * test/test_session.py (TestSessionMessages.test_remove_table)
672            (TestSessionSimple.test_remove_table): Move the test to
673            TestSessionSimple and add test for the TABLE_REMOVED message
674            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
675            (TestSessionSimple.test_unreferenced_tables) New. Test for the
676            UnreferencedTables method.
677            (UnreferencedTablesTests): New. Class with some more sophisticated
678            tests for UnreferencedTables.
679    
680    2003-05-27  Frank Koormann  <[email protected]>
681    
682            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
683            display has some unwanted side effects. Removed again.
684    
685    2003-05-27  Frank Koormann  <[email protected]>
686    
687            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
688    
689            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
690    
691    2003-05-27  Jan-Oliver Wagner <[email protected]>
692    
693            * test/test_menu.py (MenuTest.test): Added test for
694            Menu.RemoveItem().
695    
696            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
697            the menu.
698    
699    2003-05-27  Frank Koormann  <[email protected]>
700            
701            Nonmodal dialogs without parent (i.e. they can fall behind the main
702            window)
703    
704            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
705            all dialogs in the dialogs dictionary and the canvas.
706    
707            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
708            parent, i.e. can fall behind other windows.
709            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
710            dictionary before removing it.
711    
712            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
713    
714            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
715            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
716            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
717    
718    2003-05-27  Bernhard Herzog  <[email protected]>
719    
720            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
721            tableview dialog
722            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
723            Also, don't use the table's titles as the dialog names. The titles
724            aren't guaranteed to be unique.
725            (MainWindow.TableOpen): Open a table view dialog after opening the
726            table
727    
728    2003-05-27  Bernhard Herzog  <[email protected]>
729    
730            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
731            effect can be achieved by simply closing the window showing the
732            table.
733            (MainWindow.TableHide): Removed.
734            (main_menu): Removed "table_hide"
735    
736    2003-05-27  Frank Koormann  <[email protected]>
737    
738            Fix legend tree display problems under Win32
739    
740            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
741            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
742            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
743    
744            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
745    
746    2003-05-27  Jan-Oliver Wagner <[email protected]>
747    
748            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
749            'after' now allows to insert separators almost anywhere in the menu.
750    
751    2003-05-27  Frank Koormann  <[email protected]>
752    
753            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
754            "S" of selection box label to hint on hot key (Alt-S). Works under
755            Win32 but is ignored under GTK.
756    
757    2003-05-26  Frank Koormann  <[email protected]>
758    
759            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
760            Center Choices.
761    
762    2003-05-26  Bernhard Herzog  <[email protected]>
763    
764            Remove the Precision methods again. They're too DBF specific to be
765            part of the table interface and they're only used in table_to_dbf
766            anyway.
767            
768            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
769            fixed precision of 12 for doubles.
770            (TransientTableBase.Precision): Removed
771            (AutoTransientTable.Width): Delegate to self.table.
772    
773            * Thuban/Model/table.py (DBFTable.Precision)
774            (MemoryTable.Precision): Removed.
775            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
776            (table_to_dbf): Use a fixed precision of 12 for floats unless the
777            column object specifies something else.
778    
779            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
780            test for table_to_dbf
781    
782    2003-05-26  Bernhard Herzog  <[email protected]>
783    
784            * test/test_transientdb.py
785            (TestTransientTable.run_iceland_political_tests): Fix a comment.
786    
787    2003-05-26  Bernhard Herzog  <[email protected]>
788    
789            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
790            implementation. Mark parts of the file format strings for
791            localization.
792    
793            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
794            file and add the table to the tables managed by the session
795    
796            * test/test_session.py (TestSessionSimple.test_open_table_file):
797            New. test case for OpenTableFile
798    
799    2003-05-26  Jan-Oliver Wagner <[email protected]>
800    
801            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
802            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
803            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
804            Replace the true/false of wxWindows by True/False of Python 2.2.1.
805    
806    2003-05-26  Jan-Oliver Wagner <[email protected]>
807    
808            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
809            already a selection present, update the grid accordingly.
810    
811            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
812            resizeable and increase its initial size.
813    
814    2003-05-26  Frank Koormann  <[email protected]>
815    
816            Table export functionality
817    
818            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
819            Return width (in characters) for a column.
820            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
821            (table_to_dbf): Write table to dbf file.
822            (table_to_csv): Write table to csv file.
823    
824            * Thuban/Model/transientdb.py (TransientTableBase.Width,
825            TransientTableBase.Precision): Return column width and precision.
826    
827            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
828            or table_to_csv depending on file selection.
829    
830            * test/test_dbf_table.py:
831            Test table_to_dbf (extension of former part of test).
832    
833            * test/test_csv_table.py:
834            Test table_to_csv.
835    
836    2003-05-23  Jan-Oliver Wagner <[email protected]>
837    
838            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
839            Use QueryTableFrame instead of TableFrame.
840    
841            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
842            table window with 'Layer Table:' instead of 'Table:'.
843    
844    2003-05-23  Jan-Oliver Wagner <[email protected]>
845    
846            Give all tables a title via mix-in TitledObject.LayerShowTable
847    
848            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
849            only if it exists.
850    
851            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
852            and call its init-method with a default title. Remove Title() method.
853    
854            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
855            AutoTransientTable): mix-in TitledObject and call its init-method with
856            a default title. Remove Title() method.
857    
858    2003-05-23  Bernhard Herzog  <[email protected]>
859    
860            * Thuban/Model/session.py (Session.AddShapeStore): Define
861            AddShapeStore analogously to AddTable.
862    
863            * test/test_session.py (TestSessionSimple.test_add_shapestore):
864            New. Test for AddShapeStore
865    
866    2003-05-23  Jan-Oliver Wagner <[email protected]>
867    
868            Introducing QueryTableFrame and a very coarse ShowTable implementation.
869    
870            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
871            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
872            The latter implements the selection GUI without dependency on a layer.
873            LayerTableFrame now is derived from QueryTableFrame and connects
874            to a layer.
875    
876            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
877            implementation that still needs work.
878    
879            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
880    
881    2003-05-22  Frank Koormann  <[email protected]>
882    
883            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
884            Added "outer_join = False" as optional parameter.
885            (TransientJoinedTable.create): If outer join is true, perform a
886            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
887            the left table. Records not matching are filled with 0 / None.
888    
889            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
890            (JoinDialog.OnJoin): Consider outer join check box.
891    
892    2003-05-22  Bernhard Herzog  <[email protected]>
893    
894            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
895            somewhat safer way. Storing the traceback in a local variable can
896            lead to memory leaks
897    
898    2003-05-22  Bernhard Herzog  <[email protected]>
899    
900            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
901            the wxMessageDialog's Destroy() method.
902    
903    2003-05-22  Frank Koormann  <[email protected]>
904    
905            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
906            TransientTable.Title()
907    
908    2003-05-22  Frank Koormann  <[email protected]>
909    
910            Join Dialog, initial version.
911    
912            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
913    
914            * Thuban/UI/join.py (JoinDialog): Functional implementation of
915            former framework. Renamed Table1/Table2 to LeftTable/RightTable
916            in all occurences.
917    
918            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
919            Typo fixed.
920    
921    2003-05-22  Bernhard Herzog  <[email protected]>
922    
923            Give the tables titles so that the GUI can display more meaningful
924            names. For now the titles are fixed but depend on e.g. filenames
925            or the titles of the joined tables.
926    
927            * Thuban/Model/transientdb.py (TransientTable.Title)
928            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
929    
930            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
931    
932            * test/test_transientdb.py
933            (TestTransientTable.test_auto_transient_table_title): New. Test
934            for the Title method
935            (TestTransientTable.test_transient_joined_table)
936            (TestTransientTable.test_transient_table): Add test for the Title
937            methods
938    
939            * test/test_memory_table.py (TestMemoryTable.test_title): New.
940            Test for the Title method
941    
942            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
943            the Title method
944    
945    2003-05-22  Bernhard Herzog  <[email protected]>
946    
947            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
948            Provide a better way to destroy the layers
949            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
950            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
951            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
952            the new way to destroy the layers.
953            (TestLayer.test_derived_store): New. Test for using a layer with a
954            DerivedShapeStore
955    
956            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
957            filename if the shape store actually has one.
958    
959    2003-05-22  Bernhard Herzog  <[email protected]>
960    
961            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
962            for the filename
963    
964            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
965            for the FileName method
966            (TestDBFTableWriting.test_write): Fix spelling of filename
967    
968    2003-05-22  Thomas Koester  <[email protected]>
969    
970            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
971            from SciParam that now really is immutable.
972    
973    2003-05-22  Frank Koormann  <[email protected]>
974    
975            Layer Top/Bottom placement added to legend.
976    
977            * Thuban/UI/legend.py
978            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
979            bound to tool events.
980            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
981            New, methods binding the event methods with the map methods.
982    
983            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
984            layer at top/bottom of layer stack.
985    
986            * Resources/Bitmaps/top_layer.xpm: New button icon.
987    
988            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
989    
990    2003-05-22  Bernhard Herzog  <[email protected]>
991    
992            * Thuban/Model/session.py (Session.RemoveTable): New method to
993            remove tables
994    
995            * test/test_session.py (TestSessionSimple.test_remove_table): New.
996            Test for RemoveTable
997    
998    2003-05-22  Thomas Koester  <[email protected]>
999    
1000            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1001            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1002    
1003    2003-05-22  Bernhard Herzog  <[email protected]>
1004    
1005            Implement a way to discover dependencies between tables and
1006            shapestores.
1007    
1008            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1009            (TransientJoinedTable.Dependencies)
1010            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1011            interface
1012            (TransientJoinedTable.__init__): Keep tack of the original table
1013            objects in addition to the corresponding transient tables.
1014    
1015            * Thuban/Model/table.py (DBFTable.Dependencies)
1016            (MemoryTable.Dependencies): New. Implement the dependencies
1017            interface
1018    
1019            * Thuban/Model/data.py (ShapeTable): New. Helper class for
1020            ShapefileStore
1021            (ShapefileStore.__init__): Use ShapeTable instead of
1022            AutoTransientTable
1023            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1024            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1025            methods for filename and type
1026            (ShapefileStore.Dependencies): New. Implement the dependencies
1027            interface
1028            (DerivedShapeStore): New class to replace SimpleStore. The main
1029            difference to SimpleStore is that it depends not on a shapefile
1030            but another shapestore which expresses the dependencies a bit
1031            better
1032            (SimpleStore.__init__): Add deprecation warning.
1033    
1034            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1035            Test for the Dependencies method.
1036    
1037            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1038            New. Test for the Dependencies method.
1039    
1040            * test/test_transientdb.py
1041            (TestTransientTable.test_auto_transient_table_dependencies): New.
1042            Test for the Dependencies method.
1043            (TestTransientTable.test_transient_joined_table): Add test for the
1044            Dependencies method.
1045    
1046            * test/test_session.py (TestSessionSimple.setUp)
1047            (TestSessionSimple.tearDown): New. Implement a better way to
1048            destroy the sessions.
1049            (TestSessionSimple.test_initial_state)
1050            (TestSessionSimple.test_add_table): Bind session to self.session
1051            so that it's destroyed by tearDown
1052            (TestSessionSimple.test_open_shapefile): New. Test for
1053            OpenShapefile and the object it returns
1054    
1055    2003-05-22  Bernhard Herzog  <[email protected]>
1056    
1057            * Thuban/Model/session.py (Session.AddTable): New method to
1058            register tables with the session.
1059            (Session.Tables): Return the tables registered with AddTable too.
1060    
1061            * test/test_session.py (TestSessionSimple.test_add_table): New.
1062            Test case for the AddTable method
1063    
1064    2003-05-22  Frank Koormann  <[email protected]>
1065    
1066            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1067            lower right corner, center labels for selections, initialize controls
1068            in reasonable order for keyboard navigation.
1069    
1070            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1071            (ProjFrame.__DoOnProjAvail): Determine position of current projection
1072            using the wxListBox.FindString() method. Still a problem (#1886)
1073    
1074            * Thuban/UI/classifier.py
1075            (Classifier.__init__, SelectPropertiesDialog.__init__)
1076    
1077            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1078            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1079            different classification types from here to __init__.
1080            (GenUniquePanel.__init__): Set the column width of the first field
1081            in the Field ListCtrl to the full width.
1082    
1083            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1084            Button to 'Export'. Center Buttons in Selection Box, set Focus to
1085            Grid.
1086            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1087            changes focus to the Selection when pressing "Alt-S".
1088    
1089            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1090            the text if not visible. The italic font sometimes exceeds the
1091            rendering area.
1092    
1093    2003-05-21  Jonathan Coles   <[email protected]>
1094    
1095            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1096            to OnClose so that Thuban closes correctly.
1097    
1098            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
1099            DockFrame.OnClose, not DockFrame._OnClose.
1100    
1101    2003-05-21  Jonathan Coles   <[email protected]>
1102    
1103            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
1104            references to 'inf' and use new Range __init__ to pass floats
1105            directly rather than converting them to strings first.
1106            Fixes RTBug #1876.
1107    
1108            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
1109            Use new Range ___init__ to pass floats.
1110    
1111            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
1112            filename is a valid image file. Throw IOError otherwise.
1113    
1114            * Thuban/Model/range.py: Brought over new Range from SciParam that
1115            is immutable and has an __init__ which can accept floats.
1116    
1117            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
1118            into try block. AddLayer doesn't throw any exceptions anymore.
1119            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
1120            try block.
1121    
1122            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
1123            the first item in choices. Fixes RTBug #1882.
1124    
1125            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
1126            has gone to 0 which is a serious problem. abort.
1127            (MapRenderer.draw_raster_layer): Catch IOError seperately and
1128            print the error from GDAL.
1129    
1130            * Thuban/UI/tableview.py (TableGrid.__init__): Call
1131            ToggleEventListeners to turn on listening.
1132            (TableGrid.ToggleEventListeners): New. Turns event listening on
1133            and off so as to prevent excessive messages.
1134            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
1135            to suppress excessive messages when selecting many rows.
1136            Fixes RTBug #1880.
1137    
1138            * Thuban/UI/view.py: Added checks against if scale == 0. This
1139            is a serious problem that can occur when an image without
1140            geo data is loading and causes the map projection bounds to
1141            go to infinity. Right now, the solution is to simply try
1142            to recover.
1143    
1144            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
1145            to set the MFILEReceiver attributes even if the data is NULL.
1146    
1147            * extensions/thuban/gdalwarp.cpp: Improved the error handling
1148            and passed GDAL messages back up to the Python layer. Also
1149            tried to fix some memory leaks that were present in the original
1150            utility but didn't matter because the program aborted.
1151    
1152            * test/test_range.py: Copied over tests from SciParam. Removed
1153            tests against importing. Fixes RTBug #1867.
1154    
1155    2003-05-21  Bernhard Herzog  <[email protected]>
1156    
1157            * test/test_load.py: Remove unused imports and restructure the
1158            test code
1159            (LoadSessionTest): Split into one class for each test and turn
1160            LoadSessionTest itself into the base class for all such session
1161            tests.
1162            (ClassificationTest): New base class for load tests that test
1163            classifications
1164            (TestSingleLayer, TestLayerVisibility, TestClassification)
1165            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
1166            for the individual tests
1167    
1168            * test/support.py (FileLoadTestCase.filename): New base class for
1169            file loading tests
1170    
1171    2003-05-21  Jan-Oliver Wagner <[email protected]>
1172    
1173            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
1174            Mercator' to 'UTM Zone 32' as a more convenient example.
1175            Added 'Gauss Krueger Zone 6'.
1176    
1177            * Data/iceland_sample_raster.thuban: political polygon now
1178            filled transparent to have the raster image visible at once.
1179    
1180    2003-05-21  Frank Koormann  <[email protected]>
1181    
1182            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
1183            OnClose() to keep in sync with extensions. Internally Thuban
1184            still uses "underscored" names.
1185    
1186    2003-05-20  Jonathan Coles   <[email protected]>
1187    
1188            This puts back Raster layer support. These layers support projections
1189            through the GDAL library. Currently, the CVS version is being used.
1190            There are no Debian packages available although this may change soon.
1191            A GDAL driver was extended to support writing to memory rather to
1192            files.
1193    
1194            There is still some work that needs to be done, such as some error
1195            handling when loading invalid images or when there is a problem
1196            projecting the image. This putback simply checks in the majority
1197            of the work.
1198    
1199            * setup.py: Add gdalwarp library extension.
1200    
1201            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
1202            Defaults to False, but can be overridden by subclasses if they
1203            support classification.
1204            (RasterLayer): New. Defines a new layer that represents an
1205            image.
1206    
1207            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
1208            tag handler.
1209            (SessionLoader.start_layer): Encode the filename.
1210            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
1211            New. Supports reading a rasterlayer tag.
1212    
1213            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
1214    
1215            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
1216            get a string in Latin1. If we get such as string convert it to
1217            unicode first, otherwise leave if alone before encoding.
1218            (SessionSaver.write_layer): Add support for writing both Layers
1219            and RasterLayers.
1220    
1221            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1222            The right argument may not be a string, it could also be a Column.
1223    
1224            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
1225            Make initial window size 600x400. Fixes RTBug #1872.
1226    
1227            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
1228            the dialog is constructed so that we can support layers that
1229            do not have classifications.
1230            (Classifier._OnTry): Only build a classification if the layer
1231            supports one.
1232    
1233            * Thuban/UI/legend.py: Change all checks that a layer is an
1234            instance of Layer into checks against BaseLayer.
1235            (LegendTree.__FillTreeLayer): Only add children to a branch if
1236            the layer supports classification.
1237    
1238            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
1239            MainWindow.OpenSession): Don't proceed with an action if the
1240            user chooses Cancel when they are asked to save changes.
1241            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
1242            user to select an image file. Create a new RasterLayer and add
1243            it to the map.
1244    
1245            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
1246            for rendering RasterLayer layers.
1247            (MapRenderer.draw_raster_layer): Actually method that calls
1248            the GDALWarp python wrapper and constructs an image from the
1249            data returned.
1250    
1251            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
1252            Choices symbols to match those used in the table query method.
1253            Replace deprecated method calls on table with new method names.
1254    
1255            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
1256            how small the scale can get. This still needs more testing.
1257    
1258            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
1259            Provides a driver to output in .bmp format.
1260    
1261            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
1262            New. Provides IO routines which write to memory, rather than a file.
1263    
1264            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
1265            of the gdalwarp utility provided in GDAL. Added function calls
1266            that can be accessed from python.
1267    
1268            * Data/iceland_sample_raster.thuban: New. Sample file that uses
1269            a raster layer.
1270    
1271            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
1272            layer image data.
1273    
1274            * Doc/thuban.dtd: Added rasterlayer attribute definition.
1275    
1276            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
1277            tests associated with the raster layer code.
1278    
1279            * test/test_transientdb.py
1280            (TestTransientTable.test_auto_transient_table_query): Added a test
1281            for using a Column object as the "right" parameter to a query.
1282    
1283    2003-05-19  Frank Koormann  <[email protected]>
1284    
1285            * Thuban/version.py (get_changelog_date):
1286            Catch exceptions if ChangeLog does not exist.
1287    
1288            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
1289    
1290    2003-05-19  Frank Koormann  <[email protected]>
1291    
1292            Extended version information for Thuban
1293    
1294            * Thuban/version.py: New, version information for Thuban: Last
1295            modification date and last ChangeLog entry date.
1296    
1297            * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
1298            information: Display Thuban, wxPython and Python version.
1299    
1300    2003-05-16  Bernhard Herzog  <[email protected]>
1301    
1302            * Thuban/Model/save.py: Remove some unused imports including the
1303            __future__ import for nested_scopes as Thuban relies on Python 2.2
1304            now.
1305            (XMLWriter.encode): Remove the special case for a None argument.
1306            In the saver encode is always called with a string argument.
1307    
1308    2003-05-16  Bernhard Herzog  <[email protected]>
1309    
1310            * Thuban/UI/__init__.py: Remove the work-around for the locale bug
1311            in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
1312            of the bug was that e.g. float("1.2") would fail. Thuban now
1313            requires 2.4.x.
1314            
1315    2003-05-16  Frank Koormann   <[email protected]>
1316    
1317            Printing enhancement and WMF export (under Win32)
1318    
1319            * Thuban/UI/renderer.py (ExportRenderer): New, derived from
1320            ScreenRenderer. Renders Map, Legend and Scalebar for export.
1321            (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
1322            PrintRender.
1323    
1324            * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
1325            to fullfil information needed for PrinterRenderer.
1326            (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
1327            (MapCanvas.Print): Adapted to new MapPrintout.
1328            (OutputTransform): General calculations to transform from canvas
1329            coordinates to export/printing devices.
1330    
1331            * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
1332            new method_command to call ExportMap, with platform dependency (only
1333            __WXMSW__)
1334      
1335            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
1336            of scalebar drawing area as new parameters.
1337            
1338            * Thuban/Model/scalebar.py (roundInterval): round long instead of int
1339    
1340            * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
1341            Update to extended scalebar.DrawScalebar header.
1342    
1343            * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
1344    
1345            * test/test_scalebar.py: Made test executable as standalone.
1346    
1347    2003-05-16  Bernhard Herzog  <[email protected]>
1348    
1349            * Thuban/Model/table.py (Table): Remove this compatibility alias
1350            for DBFTable.
1351    
1352            * test/test_table.py: Import DBFTable as Table because that alias
1353            doesn't exist anymore.
1354    
1355            * Thuban/UI/classgen.py: Remove some unused imports
1356    
1357    2003-05-14  Jonathan Coles   <[email protected]>
1358    
1359            * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
1360            Fix docstring.
1361            (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
1362            (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
1363            values of the supplied range to determine the beginning and end
1364            bounds of the generated classes.
1365    
1366            * Thuban/Model/range.py (Range.number_re): Now accepts floats that
1367            do not have a leading 0 (.5 is now accepted as well as 0.5).
1368    
1369            * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
1370            call to ClassGenerator.GenUniformDistribution.
1371    
1372            * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
1373            layout bug with the 'Projection' label.
1374    
1375            * test/support.py (FloatTestCase): New. Needed for the Range tests.
1376    
1377            * test/test_range.py: New. Imported from SciParam.
1378    
1379    2003-05-12  Jonathan Coles   <[email protected]>
1380    
1381            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
1382            to table.UniqueValues() with calls that retrieve all the values
1383            from the table. This will need to be replaced by a method on table
1384            which can simply return the list (perhaps more efficiently).
1385    
1386    2003-05-12  Jonathan Coles   <[email protected]>
1387    
1388            The return value of ClassGenerator.CalculateQuantiles has changed.
1389            Refer to the documentation for details.
1390    
1391            * test/test_classgen.py: Modified Quantile tests to use the
1392            new return values.
1393    
1394            * Thuban/Model/classgen.py
1395            (ClassGenerator.GenQuantiles): Add comments describing the parameters,
1396            use new return values from CalculateQuantiles to produce the correct
1397            range bounds in the Classification.
1398            (ClassGenerator.CalculateQuantiles): Add more comments describing
1399            the return values and parameters. Make minor adjustments to improve
1400            the legibility of the code. Fix problem with adjusted not being set
1401            in most cases.
1402    
1403    2003-05-12  Frank Koormann <[email protected]>
1404            
1405            * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
1406            and latin1. Fixes #1851 finally.
1407    
1408    2003-05-09  Jonathan Coles   <[email protected]>
1409    
1410            * test/test_classgen.py: New. Tests the Quantile algorithm.
1411    
1412            * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
1413            Clean up debugging statement, add comments, fix a small bug in the
1414            returned adjusted percentiles.
1415            
1416    2003-05-09  Jonathan Coles   <[email protected]>
1417    
1418            Introduces Range class from SciParam into the ClassGroupRange class,
1419            and such ranges can now be saved and loaded from disk.
1420    
1421            Quantiles are now available in the Classification Generator.
1422    
1423            Initial support for building Queries on a table. Doesn't do anything
1424            but run some tests.
1425    
1426            * Thuban/Model/classification.py: Explicit imports.
1427            (ClassGroupRange): Use the Range class to store the underlying
1428            range information. The interface remains the same, except for
1429            GetRange(), and you can also supply a Range object as the min
1430            parameter to SetRange or __init__.
1431    
1432            * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
1433            string appropriately for use in Thuban. Fixes RTbug #1851.
1434            (SessionLoader.end_projection): Handle the context of the
1435            projection tag a bit better by looking at what objects are not
1436            None. There was an assumption that a projection tag for a map
1437            could occur before any layers.
1438            (SessionLoader.start_clrange): Provide backward compatibility for
1439            reading min/max values as well as the new range parameter.
1440    
1441            * Thuban/Model/map.py: Explicit imports.
1442    
1443            * Thuban/Model/resource.py: Import _.
1444            (ProjFileSaver.write): write header using projfile.dtd.
1445    
1446            * Thuban/Model/save.py: Explicit imports.
1447            (XMLWriter.encode): New. Encode the given string from a format
1448            used by Thuban into UTF-8. Fixes RTbug #1851.
1449    
1450            * Thuban/UI/classgen.py: Explicit imports.
1451            (ClassGenDialog.__init__): Clean up the code and add support
1452            for Quantiles.
1453            (ClassGenDialog.OnOK): Add support for Quantiles.
1454            (GenQuantilesPanel): New. Input panel for Quantiles.
1455            (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
1456            GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
1457    
1458            * Thuban/Model/classgen.py: New. Contains all the classes named above.
1459    
1460            * Thuban/UI/classifier.py: Explicit imports.
1461            (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
1462            ClassTable.SetValueAsCustom): Reworked to use new Range class.
1463    
1464            * Thuban/UI/legend.py: Explicit imports.
1465    
1466            * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
1467            a Table menu and associated method calls.
1468            (MainWindow.choose_color): Removed. No longer needed.
1469    
1470            * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
1471            should be disabled if no projection is selected in the available
1472            list.
1473    
1474            * Thuban/UI/renderer.py: Explicit imports.
1475    
1476            * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
1477            with correctly selecting the rows and issuing the right events.
1478            Be sure to call Skip() to allow the grid to do some of its own
1479            handling which allows the rows to actually be selected.
1480            (LayerTableGrid.select_shapes): Rename from select_shape. Supports
1481            selecting multiple shapes.
1482            (LayerTableFrame): Support for building Queries.
1483            (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
1484    
1485            * Thuban/UI/tree.py: Explicit imports.
1486    
1487            * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
1488            table view can call it.
1489    
1490            * test/test_classification.py: Explicit imports.
1491            (TestClassification.test_ClassGroupRange): Fix test for new
1492            Range class.
1493    
1494            * Doc/thuban.dtd: Add range parameter for clrange.
1495    
1496            * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
1497            object in ClassGroupRange, and also uesd for inputting ranges in
1498            the classifer table and elsewhere.
1499    
1500            * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
1501            yet.
1502    
1503    2003-05-09  Frank Koormann <[email protected]>
1504    
1505            * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
1506    
1507    2003-05-08  Frank Koormann <[email protected]>
1508    
1509            Coding style updates
1510    
1511            * test/test_scalebar.py: Replaced tab indentation by spaces.
1512    
1513            * Thuban/UI/scalebar.py: Explicit imports.
1514    
1515    2003-05-08  Frank Koormann <[email protected]>
1516    
1517            * Thuban/UI/scalebar.py
1518            (ScaleBar.DrawScalebar): Format string bug fixed.
1519    
1520    2003-05-08  Frank Koormann <[email protected]>
1521    
1522            Reorganization of scalebar component (no wx in Thuban/Model)
1523    
1524            * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
1525            (deriveInterval):
1526            Calculate scalebar interval and unit which fits in width for scale.
1527            (roundInterval): Round float.
1528    
1529            * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
1530    
1531            * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
1532    
1533            * Thuban/UI/legend.py: Import Thuban.UI.scalebar
1534    
1535    2003-05-08  Frank Koormann <[email protected]>
1536    
1537            * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
1538            Initialize ScaleBar with canvas.map
1539    
1540            * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
1541            round intervals to display smarter lengths
1542            (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
1543            layer. If the maps has no projection applied grey the scalebar.
1544    
1545    2003-05-07  Frank Koormann <[email protected]>
1546            
1547            Basic Scalebar features added.
1548    
1549            * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
1550    
1551            * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
1552            (ScaleBarBitmap): New, links the scalebar bitmap with view messages
1553            and the renderer.
1554    
1555            * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
1556    
1557            * Thuban/UI/messages.py: SCALE_CHANGED added.
1558    
1559    2003-05-07  Bernhard Herzog  <[email protected]>
1560    
1561            * Thuban/Model/session.py (Session.__init__): New instance
1562            variable shapestores to hold a list of all open shapestore objects
1563            (Session.ShapeStores): New. Accessor method for the shapestores
1564            list.
1565            (Session._add_shapestore, Session._clean_weak_store_refs): New.
1566            Internal methods to maintain the shapestores list.
1567            (Session.Tables): New. Return all tables open in the session.
1568            (Session.OpenShapefile): Insert the new ShapeStore into the
1569            shapestores list.
1570    
1571            * test/test_session.py (TestSessionSimple.test_initial_state): Add
1572            tests for ShapeStores and Tables
1573            (TestSessionWithContent.test_shape_stores)
1574            (TestSessionWithContent.test_tables): New. Test cases for
1575            ShapeStores and Tables
1576    
1577    2003-05-07  Bernhard Herzog  <[email protected]>
1578    
1579            * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
1580            Add comments about the optimizations used.
1581            (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
1582            Implement the ReadValue table interface method.
1583    
1584            * test/test_transientdb.py
1585            (TestTransientTable.run_iceland_political_tests)
1586            (TestTransientTable.test_transient_joined_table): Add tests for
1587            ReadValue
1588    
1589    2003-05-07  Frank Koormann <[email protected]>
1590    
1591            * Resources/Bitmaps/fulllayerextent.xpm,
1592            Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
1593            new icons.
1594    
1595    2003-05-06  Bernhard Herzog  <[email protected]>
1596    
1597            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1598            New. Simply delegate to the transient table's version.
1599    
1600            * test/test_transientdb.py
1601            (TestTransientTable.test_auto_transient_table_query): New. Test
1602            case for AutoTransientTable's SimpleQuery
1603    
1604    2003-05-06  Bernhard Herzog  <[email protected]>
1605    
1606            * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
1607            Implement a simple query method for the query dialog
1608            (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
1609            the row index or shapeid.
1610            (TransientTable.create): Insert the right value of the row index
1611            (TransientJoinedTable.create): Copy the row index of the left
1612            table to the joined result table
1613    
1614            * test/test_transientdb.py
1615            (TestTransientTable.test_transient_table_read_twice): Fix
1616            doc-string
1617            (TestTransientTable.test_transient_table_query): New. Test for the
1618            SimpleQuery method
1619    
1620    2003-05-06  Bernhard Herzog  <[email protected]>
1621    
1622            Convert all table users to use the new table interface. This only
1623            covers Thuban itself, not GREAT-ER or other applications built on
1624            Thuban yet, so the compatibility interface stays in place for the
1625            time being but it now issues DeprecationWarnings.
1626    
1627            Finally, the new Table interface has a new method, HasColumn.
1628    
1629            * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
1630            issue deprecation warnings when they're. The warnings refer to the
1631            caller of the method.
1632            (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
1633            for the deprecation warnings
1634    
1635            * test/test_table.py: Ignore the deprecation warnings for the old
1636            table in the tests in this module. The purpose of the tests is to
1637            test the old interface, after all.
1638    
1639            * test/test_transientdb.py
1640            (TestTransientTable.run_iceland_political_tests): Use the
1641            constants for the types. Add a test for HasColumn
1642            (TestTransientTable.test_transient_joined_table): Adapt to new
1643            table interface. Add a test for HasColumn
1644            (TestTransientTable.test_transient_table_read_twice): Adapt to new
1645            table interface
1646    
1647            * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
1648            Adapt to new table interface
1649    
1650            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
1651            new table interface
1652    
1653            * Thuban/UI/controls.py (RecordListCtrl.fill_list)
1654            (RecordTable.SetTable): Adapt to new table interface
1655    
1656            * Thuban/UI/classifier.py (Classifier.__init__)
1657            (Classifier.__init__): Adapt to new table interface
1658    
1659            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
1660            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
1661            to new table interface
1662    
1663            * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
1664            (AutoTransientTable.HasColumn): Implement the new table interface
1665            method
1666            (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
1667            (AutoTransientTable.UniqueValues): Adapt to new table interface
1668    
1669            * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
1670            Adapt to new table interface
1671    
1672            * test/test_layer.py (TestLayer.open_shapefile): Helper method to
1673            simplify opening shapefiles a bit easier.
1674            (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1675            (TestLayer.test_point_layer): Use the new helper method
1676            (TestLayer.test_get_field_type): New. Test for the GetFieldType
1677            method
1678    
1679            * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
1680            the new table method
1681    
1682            * test/test_memory_table.py (TestMemoryTable.test_has_column):
1683            Test for the new table method HasColumn
1684    
1685    2003-05-06  Jonathan Coles   <[email protected]>
1686    
1687            Addresses the "Selection Extent" wish of RTbug #1787.
1688    
1689            * Resources/Bitmaps/fulllayerextent.xpm,
1690            Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
1691            extent. These are just place holders for the real bitmaps.
1692    
1693            * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
1694            calculate the bounding box once (the first time compute_bbox() is
1695            called).
1696            (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
1697            the bounding box for the shapes in lat/long coordinates.
1698    
1699            * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
1700            option.
1701            (MainWindow.has_selected_shapes): New. Returns true if there are
1702            any selected shapes.
1703            (MainWindow.FullSelectionExtent): New. Calls
1704            MapCanvas.FitSelectedToWindow() when the user selects the menu option.
1705            (_has_selected_shapes): New. Returns true if there are any
1706            selected shapes.
1707    
1708            * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
1709            true if there are any selected shapes.
1710    
1711            * Thuban/UI/view.py (MapCanvas): Added delegated method
1712            HasSelectedShapes.
1713            (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
1714            shapes on the canvas using the map projection (if any).
1715    
1716            * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
1717            for Layer.ShapesBoundingBox().
1718    
1719    2003-05-06  Bernhard Herzog  <[email protected]>
1720    
1721            * Resources/Projections/defaults.proj: Fix spelling of Mercator
1722    
1723    2003-05-05  Jonathan Coles   <[email protected]>
1724    
1725            Addresses the "Full Layer Extent" wish of RTbug #1787.
1726    
1727            * Resources/Projections/defaults.proj: Added UK National Grid.
1728    
1729            * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
1730            (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
1731            when the user selects the menu option.
1732    
1733            * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
1734            scales the given layer on the canvas using the map projection.
1735    
1736    2003-05-05  Bernhard Herzog  <[email protected]>
1737    
1738            Convert the table implementations to a new table interface. All
1739            tables use a common mixin class to provide backwards compatibility
1740            until all table users have been updated.
1741    
1742            * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
1743            provide backwards compatibility for table classes implementing the
1744            new interface
1745            (DBFTable, MemoryTable): Implement the new table interface. Use
1746            OldTableInterfaceMixin as base for compatibility
1747            (DBFColumn, MemoryColumn): New. Column description for DBFTable
1748            and MemoryTable resp.
1749    
1750            * test/test_dbf_table.py: New. Test cases for the DBFTable with
1751            the new table interface.
1752    
1753            * test/test_memory_table.py: New. Test cases for the MemoryTable
1754            with the new table interface.
1755    
1756            * test/test_table.py: Document the all tests in this file as only
1757            for backwards compatibility. The equivalent tests for the new
1758            interface are in test_memory_table.py and test_dbf_table.py
1759            (MemoryTableTest.test_read): field_info should be returning tuples
1760            with four items
1761            (MemoryTableTest.test_write): Make doc-string a more precise.
1762    
1763            * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
1764            table interface. Derive from from OldTableInterfaceMixin for
1765            compatibility.
1766            (TransientTableBase.create): New intance variable column_map to
1767            map from names and indices to column objects
1768            (TransientTable.create): Use the new table interface of the input
1769            table
1770            (AutoTransientTable): Convert to new table interface. Derive from
1771            from OldTableInterfaceMixin for compatibility.
1772            (AutoTransientTable.write_record): Removed. It's not implemented
1773            yet and we still have to decide how to handle writing with the new
1774            table and data framework.
1775    
1776            * test/test_transientdb.py
1777            (TestTransientTable.run_iceland_political_tests)
1778            (TestTransientTable.test_transient_joined_table): Use the new
1779            table interface
1780    
1781    2003-05-05  Jonathan Coles   <[email protected]>
1782    
1783            This is namely a collection of UI updates to improve user interactivity.
1784            Tabbing between controls now exists and you can use ESC to close dialog
1785            boxes; ENTER will active the default button.
1786    
1787            * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
1788            order that the controls are created so that tabbing works correctly.
1789            (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
1790            wxDialog can handle the default button correctly.
1791            (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
1792            same reasons as for OnOK.
1793            (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
1794            when we ask the table for the maximum/minimum values of a field
1795            which could take a very long time.
1796    
1797            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
1798            order that the controls are created so that tabbing works correctly.
1799            (SelectPropertiesDialog.__init__): Rearrange the order that the
1800            controls are created so that tabbing works correctly.
1801    
1802            * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
1803            to derive from a wxDialog but behave like the original implementation
1804            which was derived from a wxFrame. wxDialog provides useful key
1805            handling functionality like ESC calling OnCancel and ENTER calling
1806            OnOK which is lost with wxFrame.
1807    
1808            * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
1809            new dialogs.
1810    
1811            * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
1812            order that the controls are created so that tabbing works correctly.
1813            (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
1814            (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
1815            (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
1816            (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
1817            can provide the "UK National Grid" as a default projection.
1818            (UTMPanel.__init__): Rearrange the order that the controls are
1819            created so that tabbing works correctly.
1820    
1821    2003-05-05  Bernhard Herzog  <[email protected]>
1822    
1823            * extensions/thuban/wxproj.cpp: Fix some of the comments.
1824            (project_point): If a map projection but no layer projection is
1825            given, convert degrees to radians before applying the map
1826            projection.
1827    
1828            * Thuban/UI/tableview.py (TableGrid.disallow_messages)
1829            (TableGrid.allow_messages): New methods to make it possible to
1830            inhibit message sending.
1831            (TableGrid.issue): Only send the message if not inhibited.
1832            (LayerTableGrid.select_shape): Use the new methods to make sure
1833            that no ROW_SELECTED message is sent while we're updating the
1834            selected rows to match the selected shapes.
1835    
1836    2003-05-02  Jan-Oliver Wagner <[email protected]>
1837    
1838            Implementation of MemoryTable.
1839    
1840            * Thuban/Model/table.py (MemoryTable): New. Quite simple table
1841            implementation that operates on a list of tuples. All of the data
1842            are kept in the memory.
1843    
1844            * test/test_table.py (MemoryTableTest): New.
1845    
1846            * test/test_transientdb.py (SimpleTable): Removed.
1847            (TestTransientTable.test_transient_joined_table,
1848            (TestTransientTable.test_transient_table_read_twice): Replaced
1849            SimpleTable by MemoryTable.
1850    
1851    2003-04-30  Jonathan Coles   <[email protected]>
1852    
1853            * Data/iceland_sample.thuban: Now contains correct projections
1854            for each of the layers.
1855    
1856            * Resources/Projections/defaults.proj: Geographic projection
1857            contains unit conversion parameter.
1858    
1859    2003-04-30  Jonathan Coles   <[email protected]>
1860    
1861            The most important part of this putback is the projection changes.
1862            It should now be possible to specify the projection that a layer
1863            is in and then specify a different projection for the map. The
1864            projection dialog has an extra parameter for a geographic projection
1865            which lets the user select if the input is in degrees or radians.
1866    
1867            * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
1868            to say that the parameter is a tuple of unprojected
1869            points (which is what the callers to this method were assuming).
1870            Also, since the points are unprojected we need to projected them.
1871    
1872            * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
1873            LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
1874            groups are selected, move the layer up/down. Fixes RTbug #1833.
1875    
1876            * Thuban/UI/mainwindow.py: Move menu item map_rename up.
1877    
1878            * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
1879            parameter in call to SetClientData.
1880            (GeoPanel): Add support for selecting the units that the
1881            source data is in (Radians or Degrees).
1882    
1883            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
1884            the rendering loop by reducing the number of if's, removing the
1885            unnecessary try/except block, and checking if the old group
1886            is the same as the new one (which happens a lot if there is
1887            no classification, or lots of shapes are in the same group).
1888    
1889            * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
1890            around the redraw routine to try to catch problems that the user
1891            may create by selecting invalid projections for the data set and
1892            map. Clears the display if there are any problems and prints the
1893            error.
1894            (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
1895            rectangle.
1896    
1897            * extensions/thuban/wxproj.cpp (project_point): First invert the
1898            supplied point (which should be in projected coordinates) using
1899            the layer's projection and then project the point using the
1900            map's projection.
1901            (project_points): Use project_point() to project each point.
1902    
1903    2003-04-30  Jan-Oliver Wagner <[email protected]>
1904    
1905            * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
1906            don't set the Classification to None if the classfication field
1907            is None (ie only a DEFAULT).
1908    
1909    2003-04-30  Bernhard Herzog  <[email protected]>
1910    
1911            * Thuban/UI/view.py: Fix some typos.
1912    
1913            * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
1914            not pop up the dialog if the selection becomes empty (this could
1915            happen if e.g. a new selection is opened while the identify tool
1916            is active and dialog had been closed)
1917    
1918    2003-04-30  Bernhard Herzog  <[email protected]>
1919    
1920            * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
1921            instance variable read_record_last_result
1922            (TransientTableBase.read_record): Make sure reading the same
1923            record twice works. The implementation uses the new instance
1924            variable read_record_last_result
1925    
1926            * test/test_transientdb.py
1927            (TestTransientTable.test_transient_table_read_twice): New test
1928            case for the above bug-fix.
1929    
1930    2003-04-29  Jonathan Coles   <[email protected]>
1931    
1932            * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
1933    
1934            * Thuban/UI/classgen.py: Remove all uses of Str2Num.
1935    
1936            * Thuban/UI/classifier.py: Remove all uses of Str2Num.
1937            (ClassTable.SetValueAsCustom): Rename keyword argument in
1938            ClassGroup* constructors to match argument name.
1939    
1940    2003-04-29  Bernhard Herzog  <[email protected]>
1941    
1942            * Thuban/Model/session.py (Session.Destroy): Explicitly close the
1943            transient DB if it exists to make sure it doesn't leave a journal
1944            file in the temp directory.
1945    
1946            * Thuban/Model/transientdb.py (TransientDatabase.close): Set
1947            self.conn to None after closing the connection to make sure it's
1948            not closed twice
1949    
1950    2003-04-29  Jonathan Coles   <[email protected]>
1951    
1952            Add a visible parameter in the layer XML tag. The default value is
1953            "true". If anything other than "false" is specified we also assume
1954            "true". Addresses RTbug #1025.
1955    
1956            * Doc/thuban.dtd: Add visible parameter to a layer.
1957    
1958            * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
1959            of visible from 1 to True.
1960            (Layer.__init__): Change default value of visible from 1 to True.
1961    
1962            * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
1963            parameter.
1964    
1965            * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
1966            parameter.
1967    
1968            * test/test_load.py: Add new test data contents_test_visible.
1969            (LoadSessionTest.setUp): save test data.
1970            (LoadSessionTest.testLayerVisibility): Test if the visible flag
1971            is loaded correctly.
1972    
1973            * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
1974            for saving an invisible layer.
1975    
1976    2003-04-29  Jonathan Coles   <[email protected]>
1977    
1978            * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
1979            legend dialog box and tell it to change its map to the one
1980            supplied to SetMap(). Fixes RTbug #1770.
1981    
1982  2003-04-29  Bernhard Herzog  <[email protected]>  2003-04-29  Bernhard Herzog  <[email protected]>
1983    
1984          Next step of table implementation. Introduce a transient database          Next step of table implementation. Introduce a transient database
# Line 51  Line 2032 
2032          once. Plus it introduces a reference cycle that keeps can keep the          once. Plus it introduces a reference cycle that keeps can keep the
2033          session object alive for a long time.          session object alive for a long time.
2034    
2035  2003-04-25  Jonathan Coles   <[email protected]>  2003-04-29  Jonathan Coles   <[email protected]>
2036    
2037          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make          * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2038          Projection an immutable item. Fixes RTbug #1825.          Projection an immutable item. Fixes RTbug #1825.

Legend:
Removed from v.766  
changed lines
  Added in v.1220

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26