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

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

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

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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26