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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26