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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26