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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26