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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26