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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26