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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26