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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26