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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26