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

Legend:
Removed from v.734  
changed lines
  Added in v.1283

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26