/[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 924 by frank, Mon May 19 09:12:42 2003 UTC revision 1279 by jonathan, Fri Jun 20 17:47:12 2003 UTC
# Line 1  Line 1 
1    2003-06-20  Jonathan Coles   <[email protected]>
2    
3            * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
4            by deriving classes to determine if that layer supports shapes.
5            (Layer): Override HasShapes and return true.
6    
7            * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
8            instead of a direct call to wx[Begin|End]CusyCursor().
9            (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
10            table data.
11    
12            * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
13            New. Wrappers around the wxWindows functions that allow us to
14            make additional calls such as wxYield which gives the native
15            system a chance to update the cursor correctly.
16    
17            * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
18            instead of a direct call to wx[Begin|End]CusyCursor().
19    
20            * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
21            instead of a direct call to wx[Begin|End]CusyCursor().
22            (MapCanvas.find_shape_at): Check if the current search layer
23            support shapes, otherwise go on to the next layer.
24    
25            * test/test_layer.py: Add tests in each type of layer for
26            HasClassification() and HasShapes()
27    
28    2003-06-20  Jonathan Coles   <[email protected]>
29    
30            * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
31            turning on the busy cursor to allow the system to change the
32            cursor before we begin painting. This fixes a problem that
33            was occuring only under GTK. Fixes RTbug #1840.
34    
35    2003-06-20  Bernhard Herzog  <[email protected]>
36    
37            * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
38            version.
39    
40            * Thuban/Model/save.py (sort_data_stores): New. Make topological
41            sort of the data sources so they can be written with sources that
42            data sources that depend on other data sources come after the
43            sources they depend on.
44            (SessionSaver.__init__): Add idmap instance variable to map from
45            objects to the ids used in the file.
46            (SessionSaver.get_id, SessionSaver.define_id)
47            (SessionSaver.has_id): New. Methods to manage the idmap
48            (SessionSaver.write): Use thuban-0.8.dtd
49            (SessionSaver.write_session): Add a namespace on the session and
50            write out the data sources before the maps.
51            (SessionSaver.write_data_containers): New. Write the data
52            containers.
53            (SessionSaver.write_layer): Layer elements now refer to a
54            shapestore and don't contain filenames anymore.
55    
56            * Thuban/Model/load.py (LoadError): Exception class to raise when
57            errors in the files are discovered
58            (SessionLoader.__init__): Define dispatchers for elements with a
59            thuban-0.8 namespace too.
60            (SessionLoader.check_attrs): New helper method to check and
61            convert attributes
62            (AttrDesc): New. Helper class for SessionLoader.check_attrs
63            (SessionLoader.start_fileshapesource)
64            (SessionLoader.start_derivedshapesource)
65            (SessionLoader.start_filetable, SessionLoader.start_jointable):
66            Handlers for the new elements in the new fileformat
67            (SessionLoader.start_layer): Handle the shapestore attribute in
68            addition to filename.
69            (SessionLoader.start_table, SessionLoader.end_table): Removed.
70            They were never used in the old formats and aren't needed for the
71            new.
72    
73            * Thuban/Model/session.py (Session.DataContainers): New method to
74            return all "data containers", i.e. shapestores and tables
75    
76            * test/xmlsupport.py (SaxEventLister.__init__)
77            (SaxEventLister.startElementNS, sax_eventlist): Add support to
78            normalize IDs.
79    
80            * test/test_xmlsupport.py
81            (TestEventList.test_even_list_id_normalization): New test case for
82            id normalization
83    
84            * test/test_load.py (LoadSessionTest.check_format): Use ID
85            normalization
86            (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
87            class atrributes used for ID normalization
88            (TestSingleLayer, TestLayerVisibility, TestLabels.test)
89            (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
90            file format
91            (TestJoinedTable): New test for loading sessions with joined
92            tables.
93            (TestLoadError): New. Test whether missing required attributes
94            cause a LoadError.
95    
96            * test/test_save.py (SaveSessionTest.thubanids)
97            (SaveSessionTest.thubanidrefs): New class attributes for ID
98            normalization in .thuban files.
99            (SaveSessionTest.compare_xml): Use id-normalization.
100            (SaveSessionTest.testEmptySession)
101            (SaveSessionTest.testLayerProjection)
102            (SaveSessionTest.testRasterLayer)
103            (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
104            (SaveSessionTest.testLayerProjection): The filename used was the
105            same as for testSingleLayer. Use a different one.
106            (SaveSessionTest.test_dbf_table)
107            (SaveSessionTest.test_joined_table): New test cases for saving the
108            new data sources structures.
109            (TestStoreSort, MockDataStore): Classes to test the sorting of the
110            data stores for writing.
111    
112            * test/runtests.py: Add CVS keywords
113    
114    2003-06-20  Jonathan Coles   <[email protected]>
115    
116            * test/test_session.py
117            (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
118            Use the cultural_landmark-point.dbf file for the store so that
119            the table rows and shape count match.
120    
121    2003-06-20  Jonathan Coles   <[email protected]>
122    
123            * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
124            an exception if the number of shapes is different from the
125            number of rows in the table. Address RTbug #1933.
126    
127            * test/test_layer.py (TestLayer.test_derived_store): Add
128            a test for the new exception in DerivedShapeStore.__init__.
129    
130            * test/support.py (FloatTestCase): Removed since there is
131            already FloatComparisonMixin. Fixes RTbug #1954.
132            (FloatComparisonMixin.assertFloatEqual): Include test for
133            infinity that was part of FloatTestCase.
134    
135            * test/test_range.py (RangeTest): Inherit from
136            support.FloatComparisonMixin now that we don't have
137            support.FloatTestCase.
138    
139    2003-06-20  Bernhard Herzog  <[email protected]>
140    
141            * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
142            the implementation in xmlsupport instead.
143            (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
144    
145            * test/test_proj.py: Import sax_eventlist from xmlsupport instead
146            of test_save
147    
148    2003-06-20  Bernhard Herzog  <[email protected]>
149    
150            * test/test_load.py (LoadSessionTest.check_format): New helper
151            method to make sure the test files we load might have been written
152            by the current thuban version.
153            (ClassificationTest.TestLayers, TestSingleLayer.test)
154            (TestLayerVisibility.test, TestClassification.test)
155            (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
156            Add check_format() calls and fix the thuban data to match the data
157            that would be written by saving the session loaded from it.
158    
159            * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
160            the same class and function in test_save.
161    
162            * test/test_xmlsupport.py (TestEventList): New. test cases for
163            sax_eventlist
164    
165    2003-06-20  Bernhard Herzog  <[email protected]>
166    
167            * Resources/XML/thuban.dtd: Add comment about which versions of
168            Thuban are covered by this DTD
169            (map): Fix content model for layers and raster layers. There can
170            be any number or layers and raster layers in any order.
171    
172    2003-06-20  Jonathan Coles   <[email protected]>
173    
174            This is mainly about fixing RTbug #1949.
175    
176            * Thuban/Model/classification.py: Remove "from __future__"
177            import statement since python 2.2 is the earliest supported
178            version.
179    
180            * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
181            Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
182            depending on the units this projection *forwards* into.
183    
184            * Thuban/Model/save.py (SessionSaver.write_classification):
185            Remove unnecessary use of lambdas and nested functions.
186    
187            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
188            adjustment here if the map projection uses degrees.
189    
190            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
191            scale adjust code since it is now done before calling
192            this method. Don't do anything if the map projection
193            is None.
194    
195    2003-06-19  Bernhard Herzog  <[email protected]>
196    
197            Move version specific load tests to their own file.
198    
199            * test/test_load.py: Expand the doc-string to explain a bit how to
200            handle file format changes.
201            (TestClassification.test): Update the docstring as this test is
202            not about Thuban 0.2 anymore.
203    
204            * test/test_load_0_2.py: New file with the load tests for thuban
205            files created with Thuban 0.2 and earlier.
206    
207    2003-06-19  Bernhard Herzog  <[email protected]>
208    
209            Add XML validation to some of the tests. Validation will only be
210            done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
211            To make the DTD available to the test cases it's moved into
212            Resources/XML
213    
214            * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
215            for versions up to and including 0.2. Two slight changes: added an
216            encoding specification and fixed the comment which refered to
217            GRASS, not Thuban
218    
219            * test/xmlsupport.py: New support module for tests involving XML.
220            Currently there's a mix-in class for XML validation.
221    
222            * test/test_xmlsupport.py: New. Tests for the xmlsupport module
223    
224            * test/test_save.py (SaveSessionTest): Derive from ValidationTest
225            so that we can validate the
226            (SaveSessionTest.testEmptySession)
227            (SaveSessionTest.testSingleLayer)
228            (SaveSessionTest.testSingleLayer)
229            (SaveSessionTest.testLayerProjection)
230            (SaveSessionTest.testRasterLayer)
231            (SaveSessionTest.testClassifiedLayer): Validate the generated XML
232    
233            * test/runtests.py (main): Call print_additional_summary instead
234            of print_garbage_information
235    
236            * test/support.py (resource_dir): New function to return the
237            "Resource" subdirectory
238            (print_additional_summary): New function to combine several
239            summary functions
240            (run_tests): Use print_additional_summary instead of calling
241            print_garbage_information directly
242    
243    2003-06-19  Bernhard Herzog  <[email protected]>
244    
245            * Doc/thuban.dtd (classification): Correct the content model of
246            the classification element.
247            (projection): Add the "name" attribute
248    
249    2003-06-19  Frank Koormann   <[email protected]>
250    
251            MERGE from the greater-ms3 branch.
252    
253            * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
254            scale if projection is latlong to get better estimate.
255    
256            Fix problem of hidden properties dialog under windows after double
257            click on layer tree:
258            The tree control always gets an Expanded / Collapsed event after
259            the ItemActivated  on double click, which raises the main window again.         We add a second ItemActivated event to the queue, which simply
260            raises the already displayed window.
261    
262            * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
263            raiseProperties initialized to prevent endless loops
264            (LegendTree._OnItemActivated): Depending on self.raiseProperties
265            simply raise the properties or open the dialog and issue a second
266            event.
267    
268    2003-06-18  Jonathan Coles   <[email protected]>
269    
270            * setup.py: Fix a few problems that occured under Windows.
271    
272    2003-06-18  Jonathan Coles   <[email protected]>
273    
274            When Thuban loaded the map was redrawn twice because the
275            legend was being opened after the mainwindow was created
276            and not during its creation. This meant the map was drawn
277            initially and then had to be redrawn when the legend
278            caused the display to change. Now the legend is opened
279            in the mainwindow constructor which resolves this issue.
280    
281            Also, although we were checking for the existence of
282            gdal and gdalwarp modules, the gdalwarp extension was
283            still being compiled (which may fail if the system doesn't
284            have gdal installed). the build_ext command to setup.py
285            now accepts the flags --with-gdal and --without-gdal.
286            If --without-gdal is specified setup.py will try to
287            use the gdal parameters specified by gdal-config. Under
288            windows, those parameters have to be set in setup.py
289            as with proj4 an wxWindows.
290    
291            * setup.py: Use a list instead of seperate variables for
292            extension parameters so we can create a generic function
293            that runs an appropriate *-config script.
294            (run_cs_script): Renamed from run_wx_script and modified
295            to accept a second argument which is a list of lists to
296            be filled in by the values returned from running the command.
297            (thuban_build_ext): New. Extends the build_ext command and
298            provides the options --with-gdal/--without-gdal which then
299            optionally includes the gdalwarp extension.
300    
301            * Thuban/Model/resource.py: First check if we can import
302            the gdalwarp Thuban extension before checking for gdal.
303            Also added some comments.
304            
305            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
306            the map is None which may be the case if none has been loaded
307            yet.
308    
309            * Thuban/UI/main.py (main): Remove call to ShowLegend.
310    
311            * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
312    
313            * Thuban/UI/renderer.py: Check for gdal support before importing
314            gdalwarp.
315            (MapRenderer.render_map): Only try to optimize if we have gdal
316            support otherwise nothing will get drawn.
317    
318            * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
319            during startup before a map has been created. Check if map is None
320            before using it and do nothing if it is.
321    
322    2003-06-17  Jonathan Coles   <[email protected]>
323    
324            Fix the problem with raster layers under Windows that caused
325            Thuban to crash. The view should respond to layer projection
326            changed events to update the display. Changes to a projection
327            should not cause the map to be set to full extent.
328            
329            * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
330            current_map_proj to remember the current map projection so that
331            when the projection changes we know what the previous projection
332            was.
333            (MapCanvas.SetMap): Unsubscribe and subscribe to
334            LAYER_PROJECTION_CHANGED events.
335            (MapCanvas.projection_changed): Split into two methods that respond
336            to map and layer projection changes.
337            (MapCanvas.map_projection_changed): New. Takes the current view and
338            projects it using the new projection. This does not cause the
339            map to be redrawn at full extent.
340            (MapCanvas.layer_projection_changed): New. Cause a redraw which
341            will draw each layer in its new projection.
342            
343            * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
344            VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
345            under Windows.
346            
347            * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
348            to twice sizeof(void*) because there are two digits for each
349            hex byte.
350    
351    2003-06-16  Bernhard Herzog  <[email protected]>
352    
353            Update to the layer interface: Direct access to the table,
354            shapetable, shapefile and filename attributes is now actively
355            deprecated by issuing deprecation warnings for all places where
356            this happens.
357    
358            * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
359            to the instance variables table, shapetable, shapefile and
360            filename via __getattr__ so that we can issue a deprecation
361            warning.
362            (Layer.SetShapeStore): Don't set the deprecated instance variables
363            any more
364            (Layer.SetShapeStore): Don't use deprecated layer instance
365            variables
366            (Layer.Destroy): No need to explicitly remove the instance
367            variables any more
368            (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
369            instance variables
370    
371            * Thuban/UI/classgen.py (ClassGenDialog.__init__)
372            (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
373            (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
374            use deprecated layer instance variables
375    
376            * Thuban/UI/classifier.py (Classifier.__init__): Don't use
377            deprecated layer instance variables
378    
379            * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
380            (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
381            instance variables
382    
383            * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
384            deprecated layer instance variables
385    
386            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
387            deprecated layer instance variables
388    
389            * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
390            deprecated layer instance variables
391    
392            * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
393            (MapRenderer.polygon_render_param): Don't use deprecated layer instance
394            variables
395    
396            * test/runtests.py (main): Turn Thuban's deprecation warnings into
397            errors so that they're cought by the tests
398    
399            * test/test_load.py (TestSingleLayer.test): Don't use deprecated
400            layer instance variables
401    
402    2003-06-16  Jonathan Coles   <[email protected]>
403    
404            Fix a problem under Windows whereby if the user double-clicks on a
405            layer in the legend that tree item will expand or collapse as well
406            as open the layer properties dialog. The state of the tree item
407            should not be affected.
408    
409            * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
410            preventExpandCollapse and subscribe to expanding and collapsing
411            events.
412            (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
413            collapsing events and will veto the event if it has been triggered
414            by the user double clicking on a layer.
415            (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
416            that an expanding/collapsing event should be vetoed.
417    
418    2003-06-13  Bernhard Herzog  <[email protected]>
419    
420            * Thuban/UI/classifier.py (Classifier.OnClose)
421            (Classifier.map_layers_removed)
422            (Classifier.layer_shapestore_replaced): Unsubscribe the messages
423            in OnClose and not in map_layers_removed or
424            layer_shapestore_replaced to make sure it always happens when the
425            dialog is closed
426    
427    2003-06-13  Jonathan Coles   <[email protected]>
428    
429            This puts back a fix for Windows where a panel is needed so that
430            the background of the table view appears correctly.
431    
432            * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
433            object that can be used by derived classes to place any
434            controls (including the grid) onto.
435            (QueryTableFrame.__init__): Use the panel as the parent window
436            for all the controls. Reparent the grid so that the panel is
437            the parent. Call UpdateStatusText() to correctly initialize
438            the status bar.
439    
440    2003-06-13  Jonathan Coles   <[email protected]>
441    
442            * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
443            from wxFrame (as opposed to wxDialog like the other classes)
444            but otherwise behaves like the other classes. This is needed
445            for the TableView which isn't really a dialog and needs to
446            have a status bar and control buttons.
447    
448            * Thuban/UI/tableview.py (TableGrid.__init__): Create an
449            instance variable to keep track of how many rows are selected.
450            Subscribe once to the the events we are interested in.
451            (ThubanGrid.OnRangeSelect): Only handle event if event handling
452            hasn't been turned off.
453            (ThubanGrid.OnSelectCell): Only handle event if event handling
454            hasn't been turned off.
455            (ThubanGrid.ToggleEventListeners): Rather than subscribe None
456            as an event listener (which changes the event handler stack)
457            simply set an instance variable to False. This is checked in
458            the event handlers.
459            (ThubanGrid.GetNumberSelected): Return the number of currently
460            selected rows.
461            (TableFrame): Inherit from ThubanFrame so we can have a
462            status bar and control buttons.
463            (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
464            Explicitly set which items are selected in the operator choice and
465            action choice so there is always a valid selection. Fixes RTbug #1941.
466            Subscribe to grid cell selection events so we can update the
467            status bar.
468            (QueryTableFrame.UpdateStatusText): Update the status bar with
469            how many rows are in the grid, how many columns, and how many
470            rows are selected.
471            (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
472            Call UpdateStatusText when cells are (de)selected.
473            (QueryTableFrame.OnQuery): Use the string value in the value
474            combo if either the selected item index is 0 or if the string
475            cannot be found in the predefined list (this happens if the
476            user changes the text). Fixes RTbug #1940.
477            Only turn off the grid event listeners if there a query comes
478            back with a none empty list of ids. in the case that the list
479            is empty this causes a grid.ClearSelection() call to actually
480            clear the grid selection which causes the selected items in
481            the map to be deselected. Fixes RTbug #1939.
482    
483            * test/test_save.py (XMLWriterTest.Encode): Check return values.
484            Fixes RTbug #1851.
485    
486    2003-06-13  Bernhard Herzog  <[email protected]>
487    
488            * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
489            self.selected_shape with the current selection to make sure the
490            contents of the dialog are up to date when it's shown for the
491            first time.
492            The dialog used to work without this by luck. The recent fix to
493            the connector module 'broke' a 'feature' the identify view was
494            relying on, i.e that subscribing to a message in response to
495            receiving a message of that type would mean that the new
496            subscriber would also be called for the same message.
497            
498    2003-06-12  Jonathan Coles   <[email protected]>
499    
500            * extensions/thuban/gdalwarp.cpp: Removed debug printing as
501            the image is rendered. Fixes RTbug #1937.
502    
503    2003-06-12  Jonathan Coles   <[email protected]>
504    
505            * Thuban/Lib/fileutil.py: As is done under Windows, create the
506            user directory if it doesn't exist on a posix system.
507            Fixes RTbug #1815.
508    
509            * Thuban/Model/resource.py (get_user_proj_files): Moved the
510            called to get_application_dir here, so that the directory
511            will only be called if this method is invoked.
512    
513            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
514            the projfilepath if no projection is selected.
515    
516    2003-06-12  Jonathan Coles   <[email protected]>
517    
518            * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
519            the scalebar if the current map has no projection set.
520    
521            * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
522            projfilepath label to just the basename of the projection file
523            rather than include the entire path.
524    
525            * Thuban/Model/resource.py: Fix missed proj functions that
526            needed to be renamed.
527    
528    2003-06-12  Jonathan Coles   <[email protected]>
529    
530            * Thuban/Model/classification.py: Removed assert statements that
531            tested if the variable was an instance of Color.
532    
533            * Thuban/Model/color.py (Color): Remove commented code that isn't
534            used.
535            (Transparent): Renamed from NoColor. Doesn't inherit from Color.
536            Fixes RTbug #1835.
537            (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
538            Needed now that the class doesn't inherit from Color.
539    
540    2003-06-12  Jonathan Coles   <[email protected]>
541    
542            * test/test_save.py (XMLWriterTest.testEncode): Explicitly
543            check unicode strings.
544    
545            * test/test_layer.py: Check for existence of gdal.
546    
547    2003-06-12  Jonathan Coles   <[email protected]>
548        
549            * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
550            that was in load.py
551    
552            * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
553            that was in save.py
554    
555    2003-06-12  Jonathan Coles   <[email protected]>
556    
557            This is largely a collection of bug fixes. We also handle the
558            case where gdal is not on the system. The XMLReader and XMLWriter
559            classes were moved into there own files to resolve some circular
560            import references and because they shouldn't really be in the
561            file that is dediciated to reading/writing session files since
562            they are also used elsewhere.
563    
564            * Thuban/Model/classgen.py: Renamed functions to follow the
565            function_names_with_underscores style. Fixes RTbug #1903.
566            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
567    
568            * Thuban/Model/layer.py: Import gdal only if it available.
569            (RasterLayer): Handle the case where the gdal library is unavailable.
570            Addresses RTbug #1877.
571    
572            * Thuban/Model/load.py (XMLReader): Moved into seperate file
573            xmlreader.py.
574    
575    2003-06-12  Jonathan Coles   <[email protected]>
576    
577            This is largely a collection of bug fixes. We also handle the
578            case where gdal is not on the system. The XMLReader and XMLWriter
579            classes were moved into there own files to resolve some circular
580            import references and because they shouldn't really be in the
581            file that is dediciated to reading/writing session files since
582            they are also used elsewhere.
583    
584            * Thuban/Model/classgen.py: Renamed functions to follow the
585            function_names_with_underscores style. Fixes RTbug #1903.
586            (calculate_quantiles): Raise ValueError if 'percents' is invalid.
587    
588            * Thuban/Model/layer.py: Import gdal only if it available.
589            (RasterLayer): Handle the case where the gdal library is unavailable.
590            Addresses RTbug #1877.
591    
592            * Thuban/Model/load.py (XMLReader): Moved into seperate file
593            xmlreader.py.
594    
595            * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
596            file xmlwriter.py.
597    
598            * Thuban/Model/resource.py: Renamed functions to following the
599            function_names_with_underscores style.
600            (has_gdal_support): New function that returns true if the gdal
601            library is available. Addresses RTbug #1877.
602    
603            * Thuban/UI/application.py (ThubanApplication.OpenSession):
604            Display a message box if the gdal library is not available, but
605            only if there are any layers that would use it. Addresses RTbug #1877.
606    
607            * Thuban/UI/classgen.py: Use renamed projection resource functions.
608            (GenUniformPanel.__CalcStepping): Fix a slight discrepency
609            when using integers versus floats.
610    
611            * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
612            determine if the "Add Image Layer" menu option should be
613            greyed out or not. Addresses RTbug #1877.
614    
615            * Thuban/UI/projdialog.py: Use renamed projection resource functions.
616    
617            * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
618            optimize if a raster layer is visible. Fixes RTbug #1931.
619            Only draw the raster layer if the gdal library is available.
620            Addresses RTbug #1877.
621    
622            * test/test_classgen.py: Add tests for generate_singletons,
623            generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
624            (test_calculate_quantiles): Fix some tests to catch the new
625            ValueError that is raised.
626    
627            * test/test_proj.py: Use renamed projection resource functions.
628    
629            * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
630            test for saving classified layers. Fixes RTbug #1902.
631            (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
632    
633    2003-06-12  Jan-Oliver Wagner <[email protected]>
634    
635            Fix for http://intevation.de/rt/webrt?serial_num=1900.
636    
637            * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
638    
639            * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
640            multiplechoicedialog.py rather than from the wxPython library.
641    
642    2003-06-11  Frank Koormann  <[email protected]>
643    
644            * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
645            update.
646    
647    2003-06-11  Frank Koormann  <[email protected]>
648    
649            * Thuban/Lib/fileutil.py (get_application_dir): New function to
650            determine the absolute .thuban/thuban directory under
651            "posix" (os.expanduser) and "nt" (read AppData registry key).
652    
653            * Thuban/Model/resource.py: Use get_application_dir
654    
655            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
656            Use get_application_dir.
657    
658    2003-06-10  Bernhard Herzog  <[email protected]>
659    
660            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
661            the messages MAP_LAYERS_REMOVED messages
662            (LayerTableFrame.OnClose): Unsubscribe from it.
663            (LayerTableFrame.map_layers_removed): New. Receiver for
664            MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
665            dialog is showing is removed.
666    
667    2003-06-10  Bernhard Herzog  <[email protected]>
668    
669            * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
670            of the receivers list so that unsubscribing in a receiver doesn't
671            modify it while iterating over it.
672    
673            * test/test_connector.py
674            (ConnectorTest.test_disconnect_in_receiver): New. Test whether
675            unsubscribing in a receiver works correctly. See docstring for
676            details
677    
678    2003-06-10  Bernhard Herzog  <[email protected]>
679    
680            * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
681            message.
682    
683            * Thuban/Model/layer.py (Layer.SetShapeStore): Send
684            LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
685            LAYER_CHANGED will still be sent if the classification changes.
686    
687            * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
688            parameter so we can subscribe to some of its messages
689            (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
690            and the layer's LAYER_SHAPESTORE_REPLACED
691            (Classifier.unsubscribe_messages): New. Unsubscribe from message
692            subscribed to in __init__
693            (Classifier.map_layers_removed)
694            (Classifier.layer_shapestore_replaced): receivers for the messages
695            subscribed to in __init__. Unsubscribe and close the dialog
696    
697            * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
698            the map to the Classifier dialog
699    
700            * test/test_layer.py (SetShapeStoreTests): Derive from
701            SubscriberMixin as well so we can test messages
702            (SetShapeStoreTests.setUp): Subscribe to some of the layer's
703            messages
704            (SetShapeStoreTests.tearDown): Clear the messages again
705            (SetShapeStoreTests.test_sanity): Expand the doc-string and check
706            for the modified flag too
707            (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
708            to check whether SetShapeStore sets the modified flag
709            (SetShapeStoreTests.test_set_shape_store_different_field_name)
710            (SetShapeStoreTests.test_set_shape_store_same_field)
711            (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
712            Add tests for the messages. This checks both the new
713            LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
714    
715    2003-06-06  Jan-Oliver Wagner <[email protected]>
716    
717            * Thuban/UI/mainwindow.py: Improved and partly added help texts for
718            the menu items.
719    
720    2003-06-05  Frank Koormann  <[email protected]>
721    
722            * Thuban/UI/identifyview.py (IdentifyView.__init__):
723            Layout reimplemented without panel. Make life easier to fit the list
724            in the dialog.
725    
726    2003-06-05  Frank Koormann  <[email protected]>
727    
728            * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
729            once on initialisation (Former implementation resulted in multiple
730            entries for each projection).
731            (ProjFrame.__FillAvailList): selectProj as second optional parameter,
732            if set, select the projection found under the specified name. This
733            overwrites any other selection estimate.
734            Removed projchoice filling from this method.
735            (ProjFrame._OnSave, ProjFrame._OnAddToList):
736            Updated call of ProjFrame.__FillAvailList
737            (LCCPanel._DoLayout): Moved parameter controls in more common order.
738    
739            * Resources/Projections/defaults.proj: Extended defaults representing
740            various common European projections.
741    
742    2003-06-05  Frank Koormann  <[email protected]>
743    
744            * Thuban/UI/identifyview.py (IdentifyView.__init__):
745            Use ListCtrl instead of GridCtrl
746    
747            * Thuban/Model/resource.py:
748            Guess location of .thuban directory from tempdir parent directory.
749    
750            * Thuban/UI/application.py (ThubanApplication.read_startup_files):
751            Guess location of .thuban directory from tempdir parent directory.
752    
753    2003-06-04  Bernhard Herzog  <[email protected]>
754    
755            Do not cache the values returned by the tree widget's
756            GetFirstChild and GetNextChild methods because it led to lots of
757            segfaults. The new way requires more brute force but is more
758            reliable.
759    
760            * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
761            variable layer2id
762            (LegendTree.find_layer): New method to do with brute force what
763            layer2id tried to accomplish
764            (LegendTree._OnMsgLayerChanged)
765            (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
766            Use find_layer instead of layer2id
767            (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
768            update layer2id anymore
769            (LegendTree._OnMsgMapLayersRemoved)
770            (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
771    
772    2003-06-03  Thomas Koester  <[email protected]>
773    
774            * Thuban/Model/classgen.py (GenQuantiles0): New function.
775    
776    2003-06-02  Bernhard Herzog  <[email protected]>
777    
778            * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
779            New commands.
780            (main_menu): Add the new commands.
781            (MainWindow.TableRename): New. Implementation of the table_rename
782            command.
783            (MainWindow.RenameLayer): New. Implementation of the layer_rename
784            command.
785    
786            * Thuban/Model/session.py (Session.AddTable): call self.changed to
787            set the modified flag
788    
789            * test/test_session.py (TestSessionSimple.test_add_table): Test
790            whether the modified flag is set properly
791    
792            * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
793            instead of issue so that the modified flags get updated.
794    
795            * test/test_base.py (SomeTitledObject): Derive from Modifiable
796            instead of Publisher to reflect reality better and to accomodate
797            the fact that SetTitle now calls changed instead of issue
798    
799    2003-06-02  Bernhard Herzog  <[email protected]>
800    
801            * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
802            acquisition has to happen before the try in a try-finally.
803    
804    2003-06-02  Bernhard Herzog  <[email protected]>
805    
806            * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
807            possible that a layer is removed that is not currently selected in
808            the legend so don't check for this.
809    
810    2003-05-30  Bernhard Herzog  <[email protected]>
811    
812            * Thuban/Model/layer.py (Layer.Destroy): Set all instance
813            variables to None that have direct or indirect references to
814            shapefiles or dbf files to make sure that they do go away and the
815            files are closed.
816    
817    2003-05-30  Bernhard Herzog  <[email protected]>
818    
819            * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
820            availImgListIndices when a new image list is created
821            
822    2003-05-30  Bernhard Herzog  <[email protected]>
823    
824            * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
825            changing_selection to indicate whether the LegendTree code itself
826            is currently changing the selection
827            (LegendTree.normalize_selection): New method to normalize the
828            selection by selecting the layer item even if the user clicked on
829            the classification.
830            (LegendTree._OnSelChanged): normalize the selection. This works
831            around a bug in wx which doesn't keep track of the selection
832            properly when subtrees are deleted.
833    
834    2003-05-30  Bernhard Herzog  <[email protected]>
835    
836            * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
837            maximum and minimum scale factors.
838    
839            * test/test_classgen.py (ClassGenTest.test): Update to reflect the
840            changes in classgen.py
841    
842    2003-05-30  Jonathan Coles   <[email protected]>
843    
844            * Thuban/Model/classgen.py: Remove ClassGenerator class but make
845            all the methods functions. Fixes RTBug #1903.
846    
847            * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
848            to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
849            RTBug #1907.
850    
851            * Thuban/UI/classgen.py: Use classgen functions that were part
852            of the ClassGenerator class. Put try/finally blocks around
853            code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
854            RTBug #1904.
855    
856            * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
857    
858            * Thuban/UI/legend.py: The legend was cleared and repopulated any
859            time something changed which caused some state to be lost such
860            as which children were expanded or collapsed. Fixes RTBug #1901.
861            (LegendTree._OnMsgMapLayersAdded): Add only new layers.
862            (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
863            the legend but not in the map.
864            (LegendTree.__FillTree): Move main functionality out into smaller
865            methods that can be used by other methods.
866            (LegendTree.__FillTreeLayer): Reuse old slots in the image list
867            if they are available.
868            (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
869            that we override the wxTreeCtrl method. Iterate over children
870            and call __RemoveLayer.
871            (LegendTree.__AddLayer): New. Add a new layer to the legend.
872            (LegendTree.__RemoveLayer): Remove a layer from the legend.
873            (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
874            Should only be called with the id of a layer branch.
875            (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
876            Returns the root item or creates one if necessary.
877    
878            * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
879            ProjectRasterFile with tuple arguments instead of strings.
880    
881            * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
882            with try/finally. Fixes RTBug #1904.
883    
884            * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
885            with try/finally. Fixes RTBug #1904.
886            (MapCanvas.FitSelectedToWindow): If a single point is selected
887            simply center it on the display. Fixes RTBug #1849.
888    
889            * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
890            to be compiled as a standalone app. Now the code can only be
891            called from Python which simplifies the parameter passing.
892            (ProjectRasterFile): Handle Python arguments. Remove code that
893            checks for a destination dataset. Add more clean up code.
894    
895            * test/test_map.py (TestMapWithContents.test_raise_layer_top,
896            TestMapWithContents.test_lower_layer_bottom):
897            Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
898            Fixes RTBug #1907.
899    
900            * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
901            extent to the map when the legend is toggled. Fixes RTBug #1881.
902    
903    2003-05-29  Jan-Oliver Wagner <[email protected]>
904    
905            * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
906            unsubscribes all that is subcribed in __init__.
907    
908    2003-05-28  Bernhard Herzog  <[email protected]>
909    
910            * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
911            (MainWindow.CanDuplicateLayer): New methods to implement the
912            Layer/Duplicate command.
913            (layer_duplicate command): New.
914            (main_menu): Add layer_duplicate to the Layer menu.
915    
916    2003-05-28  Bernhard Herzog  <[email protected]>
917    
918            * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
919            renderer so that NULL/None values get displayed differently (by a
920            gray rectangle).
921            (TableGrid.__init__): Override the default renderers
922    
923    2003-05-28  Bernhard Herzog  <[email protected]>
924    
925            * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
926            classification to "None" if the type of the field has changed.
927    
928            * test/test_layer.py (SetShapeStoreTests): New. Class with a few
929            test for the Layer.SetShapeStore method
930    
931    2003-05-28  Jan-Oliver Wagner <[email protected]>
932    
933            * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
934            does not necessarily have a filename).
935    
936    2003-05-28  Jan-Oliver Wagner <[email protected]>
937    
938            * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
939            sort the selection list for the dialog.
940    
941    2003-05-28  Frank Koormann  <[email protected]>
942    
943            * extensions/thuban/wxproj.cpp
944            (project_point): Removed cast to int for projected point coordinates.
945            (shape_centroid): Return last point if all polygon vertices fall
946            to one point.
947    
948    2003-05-28  Bernhard Herzog  <[email protected]>
949    
950            * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
951            with layers that don't have shapestores, i.e. raster layers.
952    
953    2003-05-28  Bernhard Herzog  <[email protected]>
954    
955            * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
956            when determining the title from the filename.
957    
958            * test/test_dbf_table.py (TestDBFTable.test_title): Update to
959            reflect changes in the way the title is derived from the filename
960    
961    2003-05-28  Frank Koormann  <[email protected]>
962    
963            * Thuban/UI/mainwindow.py (MainWindow.TableShow):
964            Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
965    
966    2003-05-27  Bernhard Herzog  <[email protected]>
967    
968            * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
969            delegate SelectedLayer.
970            (MainWindow.LayerUnjoinTable): Implement.
971            (_can_unjoin): New. Helper function for the sensitivity of the
972            layer/unjoin command.
973    
974            * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
975            (DerivedShapeStore.OrigShapeStore): New. Return the original
976            shapestore. Used to figure out how to unjoin.
977            (DerivedShapeStore.Shapefile): Fix a typo.
978    
979    2003-05-27  Bernhard Herzog  <[email protected]>
980    
981            * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
982            well
983            (JoinDialog.__init__): Use the layer parameter and only build the
984            left choice when a layer is given
985            (JoinDialog.OnJoin): Handle layer joins as well
986            (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
987            that the user selects the "Select..." item. The sensitivitly
988            updating is now in update_sensitivity
989            (JoinDialog.y): New method to refactor the sensitivity update of
990            the join button into its own method.
991    
992            * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
993    
994    2003-05-27  Bernhard Herzog  <[email protected]>
995    
996            * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
997            iff there are unreferenced tables in the session
998    
999    2003-05-27  Bernhard Herzog  <[email protected]>
1000    
1001            * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1002    
1003            * Thuban/Model/session.py (Session.UnreferencedTables): New method
1004            to return tables that are not referenced by other tables or shape
1005            stores and can be removed.
1006            (Session.RemoveTable): Issue a TABLE_REMOVED message after
1007            removing the table
1008    
1009            * Thuban/UI/mainwindow.py: Remove unused imports
1010            (MainWindow.TableClose): Implement.
1011    
1012            * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1013            messages so that the frame will be automatically closed when a new
1014            session is opened or the table is removed.
1015            (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1016            __init__
1017            (TableFrame.close_on_session_replaced)
1018            (TableFrame.close_on_table_removed): New. Subscribers that close
1019            the window
1020    
1021            * test/test_session.py (TestSessionMessages.test_remove_table)
1022            (TestSessionSimple.test_remove_table): Move the test to
1023            TestSessionSimple and add test for the TABLE_REMOVED message
1024            (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1025            (TestSessionSimple.test_unreferenced_tables) New. Test for the
1026            UnreferencedTables method.
1027            (UnreferencedTablesTests): New. Class with some more sophisticated
1028            tests for UnreferencedTables.
1029    
1030    2003-05-27  Frank Koormann  <[email protected]>
1031    
1032            * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1033            display has some unwanted side effects. Removed again.
1034    
1035    2003-05-27  Frank Koormann  <[email protected]>
1036    
1037            * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1038    
1039            * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1040    
1041    2003-05-27  Jan-Oliver Wagner <[email protected]>
1042    
1043            * test/test_menu.py (MenuTest.test): Added test for
1044            Menu.RemoveItem().
1045    
1046            * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1047            the menu.
1048    
1049    2003-05-27  Frank Koormann  <[email protected]>
1050            
1051            Nonmodal dialogs without parent (i.e. they can fall behind the main
1052            window)
1053    
1054            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1055            all dialogs in the dialogs dictionary and the canvas.
1056    
1057            * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1058            parent, i.e. can fall behind other windows.
1059            (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1060            dictionary before removing it.
1061    
1062            * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1063    
1064            * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1065            * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1066            * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1067    
1068    2003-05-27  Bernhard Herzog  <[email protected]>
1069    
1070            * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1071            tableview dialog
1072            (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1073            Also, don't use the table's titles as the dialog names. The titles
1074            aren't guaranteed to be unique.
1075            (MainWindow.TableOpen): Open a table view dialog after opening the
1076            table
1077    
1078    2003-05-27  Bernhard Herzog  <[email protected]>
1079    
1080            * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1081            effect can be achieved by simply closing the window showing the
1082            table.
1083            (MainWindow.TableHide): Removed.
1084            (main_menu): Removed "table_hide"
1085    
1086    2003-05-27  Frank Koormann  <[email protected]>
1087    
1088            Fix legend tree display problems under Win32
1089    
1090            * Thuban/UI/legend.py:  BMP_SIZE_W = 15
1091            (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1092            (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1093    
1094            * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1095    
1096    2003-05-27  Jan-Oliver Wagner <[email protected]>
1097    
1098            * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1099            'after' now allows to insert separators almost anywhere in the menu.
1100    
1101    2003-05-27  Frank Koormann  <[email protected]>
1102    
1103            * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1104            "S" of selection box label to hint on hot key (Alt-S). Works under
1105            Win32 but is ignored under GTK.
1106    
1107    2003-05-26  Frank Koormann  <[email protected]>
1108    
1109            * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1110            Center Choices.
1111    
1112    2003-05-26  Bernhard Herzog  <[email protected]>
1113    
1114            Remove the Precision methods again. They're too DBF specific to be
1115            part of the table interface and they're only used in table_to_dbf
1116            anyway.
1117            
1118            * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1119            fixed precision of 12 for doubles.
1120            (TransientTableBase.Precision): Removed
1121            (AutoTransientTable.Width): Delegate to self.table.
1122    
1123            * Thuban/Model/table.py (DBFTable.Precision)
1124            (MemoryTable.Precision): Removed.
1125            (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1126            (table_to_dbf): Use a fixed precision of 12 for floats unless the
1127            column object specifies something else.
1128    
1129            * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1130            test for table_to_dbf
1131    
1132    2003-05-26  Bernhard Herzog  <[email protected]>
1133    
1134            * test/test_transientdb.py
1135            (TestTransientTable.run_iceland_political_tests): Fix a comment.
1136    
1137    2003-05-26  Bernhard Herzog  <[email protected]>
1138    
1139            * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1140            implementation. Mark parts of the file format strings for
1141            localization.
1142    
1143            * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1144            file and add the table to the tables managed by the session
1145    
1146            * test/test_session.py (TestSessionSimple.test_open_table_file):
1147            New. test case for OpenTableFile
1148    
1149    2003-05-26  Jan-Oliver Wagner <[email protected]>
1150    
1151            * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1152            Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1153            Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1154            Replace the true/false of wxWindows by True/False of Python 2.2.1.
1155    
1156    2003-05-26  Jan-Oliver Wagner <[email protected]>
1157    
1158            * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1159            already a selection present, update the grid accordingly.
1160    
1161            * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1162            resizeable and increase its initial size.
1163    
1164    2003-05-26  Frank Koormann  <[email protected]>
1165    
1166            Table export functionality
1167    
1168            * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1169            Return width (in characters) for a column.
1170            (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1171            (table_to_dbf): Write table to dbf file.
1172            (table_to_csv): Write table to csv file.
1173    
1174            * Thuban/Model/transientdb.py (TransientTableBase.Width,
1175            TransientTableBase.Precision): Return column width and precision.
1176    
1177            * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1178            or table_to_csv depending on file selection.
1179    
1180            * test/test_dbf_table.py:
1181            Test table_to_dbf (extension of former part of test).
1182    
1183            * test/test_csv_table.py:
1184            Test table_to_csv.
1185    
1186    2003-05-23  Jan-Oliver Wagner <[email protected]>
1187    
1188            * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1189            Use QueryTableFrame instead of TableFrame.
1190    
1191            * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1192            table window with 'Layer Table:' instead of 'Table:'.
1193    
1194    2003-05-23  Jan-Oliver Wagner <[email protected]>
1195    
1196            Give all tables a title via mix-in TitledObject.LayerShowTable
1197    
1198            * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1199            only if it exists.
1200    
1201            * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1202            and call its init-method with a default title. Remove Title() method.
1203    
1204            * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1205            AutoTransientTable): mix-in TitledObject and call its init-method with
1206            a default title. Remove Title() method.
1207    
1208    2003-05-23  Bernhard Herzog  <[email protected]>
1209    
1210            * Thuban/Model/session.py (Session.AddShapeStore): Define
1211            AddShapeStore analogously to AddTable.
1212    
1213            * test/test_session.py (TestSessionSimple.test_add_shapestore):
1214            New. Test for AddShapeStore
1215    
1216    2003-05-23  Jan-Oliver Wagner <[email protected]>
1217    
1218            Introducing QueryTableFrame and a very coarse ShowTable implementation.
1219    
1220            * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1221            class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1222            The latter implements the selection GUI without dependency on a layer.
1223            LayerTableFrame now is derived from QueryTableFrame and connects
1224            to a layer.
1225    
1226            * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1227            implementation that still needs work.
1228    
1229            * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1230    
1231    2003-05-22  Frank Koormann  <[email protected]>
1232    
1233            * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1234            Added "outer_join = False" as optional parameter.
1235            (TransientJoinedTable.create): If outer join is true, perform a
1236            "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1237            the left table. Records not matching are filled with 0 / None.
1238    
1239            * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1240            (JoinDialog.OnJoin): Consider outer join check box.
1241    
1242    2003-05-22  Bernhard Herzog  <[email protected]>
1243    
1244            * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1245            somewhat safer way. Storing the traceback in a local variable can
1246            lead to memory leaks
1247    
1248    2003-05-22  Bernhard Herzog  <[email protected]>
1249    
1250            * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1251            the wxMessageDialog's Destroy() method.
1252    
1253    2003-05-22  Frank Koormann  <[email protected]>
1254    
1255            * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1256            TransientTable.Title()
1257    
1258    2003-05-22  Frank Koormann  <[email protected]>
1259    
1260            Join Dialog, initial version.
1261    
1262            * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1263    
1264            * Thuban/UI/join.py (JoinDialog): Functional implementation of
1265            former framework. Renamed Table1/Table2 to LeftTable/RightTable
1266            in all occurences.
1267    
1268            * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1269            Typo fixed.
1270    
1271    2003-05-22  Bernhard Herzog  <[email protected]>
1272    
1273            Give the tables titles so that the GUI can display more meaningful
1274            names. For now the titles are fixed but depend on e.g. filenames
1275            or the titles of the joined tables.
1276    
1277            * Thuban/Model/transientdb.py (TransientTable.Title)
1278            (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1279    
1280            * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1281    
1282            * test/test_transientdb.py
1283            (TestTransientTable.test_auto_transient_table_title): New. Test
1284            for the Title method
1285            (TestTransientTable.test_transient_joined_table)
1286            (TestTransientTable.test_transient_table): Add test for the Title
1287            methods
1288    
1289            * test/test_memory_table.py (TestMemoryTable.test_title): New.
1290            Test for the Title method
1291    
1292            * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1293            the Title method
1294    
1295    2003-05-22  Bernhard Herzog  <[email protected]>
1296    
1297            * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1298            Provide a better way to destroy the layers
1299            (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1300            (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1301            (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1302            the new way to destroy the layers.
1303            (TestLayer.test_derived_store): New. Test for using a layer with a
1304            DerivedShapeStore
1305    
1306            * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1307            filename if the shape store actually has one.
1308    
1309    2003-05-22  Bernhard Herzog  <[email protected]>
1310    
1311            * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1312            for the filename
1313    
1314            * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1315            for the FileName method
1316            (TestDBFTableWriting.test_write): Fix spelling of filename
1317    
1318    2003-05-22  Thomas Koester  <[email protected]>
1319    
1320            * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1321            from SciParam that now really is immutable.
1322    
1323    2003-05-22  Frank Koormann  <[email protected]>
1324    
1325            Layer Top/Bottom placement added to legend.
1326    
1327            * Thuban/UI/legend.py
1328            (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1329            bound to tool events.
1330            (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1331            New, methods binding the event methods with the map methods.
1332    
1333            * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1334            layer at top/bottom of layer stack.
1335    
1336            * Resources/Bitmaps/top_layer.xpm: New button icon.
1337    
1338            * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1339    
1340    2003-05-22  Bernhard Herzog  <[email protected]>
1341    
1342            * Thuban/Model/session.py (Session.RemoveTable): New method to
1343            remove tables
1344    
1345            * test/test_session.py (TestSessionSimple.test_remove_table): New.
1346            Test for RemoveTable
1347    
1348    2003-05-22  Thomas Koester  <[email protected]>
1349    
1350            * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1351            (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1352    
1353    2003-05-22  Bernhard Herzog  <[email protected]>
1354    
1355            Implement a way to discover dependencies between tables and
1356            shapestores.
1357    
1358            * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1359            (TransientJoinedTable.Dependencies)
1360            (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1361            interface
1362            (TransientJoinedTable.__init__): Keep tack of the original table
1363            objects in addition to the corresponding transient tables.
1364    
1365            * Thuban/Model/table.py (DBFTable.Dependencies)
1366            (MemoryTable.Dependencies): New. Implement the dependencies
1367            interface
1368    
1369            * Thuban/Model/data.py (ShapeTable): New. Helper class for
1370            ShapefileStore
1371            (ShapefileStore.__init__): Use ShapeTable instead of
1372            AutoTransientTable
1373            (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1374            (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1375            methods for filename and type
1376            (ShapefileStore.Dependencies): New. Implement the dependencies
1377            interface
1378            (DerivedShapeStore): New class to replace SimpleStore. The main
1379            difference to SimpleStore is that it depends not on a shapefile
1380            but another shapestore which expresses the dependencies a bit
1381            better
1382            (SimpleStore.__init__): Add deprecation warning.
1383    
1384            * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1385            Test for the Dependencies method.
1386    
1387            * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1388            New. Test for the Dependencies method.
1389    
1390            * test/test_transientdb.py
1391            (TestTransientTable.test_auto_transient_table_dependencies): New.
1392            Test for the Dependencies method.
1393            (TestTransientTable.test_transient_joined_table): Add test for the
1394            Dependencies method.
1395    
1396            * test/test_session.py (TestSessionSimple.setUp)
1397            (TestSessionSimple.tearDown): New. Implement a better way to
1398            destroy the sessions.
1399            (TestSessionSimple.test_initial_state)
1400            (TestSessionSimple.test_add_table): Bind session to self.session
1401            so that it's destroyed by tearDown
1402            (TestSessionSimple.test_open_shapefile): New. Test for
1403            OpenShapefile and the object it returns
1404    
1405    2003-05-22  Bernhard Herzog  <[email protected]>
1406    
1407            * Thuban/Model/session.py (Session.AddTable): New method to
1408            register tables with the session.
1409            (Session.Tables): Return the tables registered with AddTable too.
1410    
1411            * test/test_session.py (TestSessionSimple.test_add_table): New.
1412            Test case for the AddTable method
1413    
1414    2003-05-22  Frank Koormann  <[email protected]>
1415    
1416            UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1417            lower right corner, center labels for selections, initialize controls
1418            in reasonable order for keyboard navigation.
1419    
1420            * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1421            (ProjFrame.__DoOnProjAvail): Determine position of current projection
1422            using the wxListBox.FindString() method. Still a problem (#1886)
1423    
1424            * Thuban/UI/classifier.py
1425            (Classifier.__init__, SelectPropertiesDialog.__init__)
1426    
1427            * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1428            (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1429            different classification types from here to __init__.
1430            (GenUniquePanel.__init__): Set the column width of the first field
1431            in the Field ListCtrl to the full width.
1432    
1433            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1434            Button to 'Export'. Center Buttons in Selection Box, set Focus to
1435            Grid.
1436            (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1437            changes focus to the Selection when pressing "Alt-S".
1438    
1439            * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1440            the text if not visible. The italic font sometimes exceeds the
1441            rendering area.
1442    
1443    2003-05-21  Jonathan Coles   <[email protected]>
1444    
1445            * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1446            to OnClose so that Thuban closes correctly.
1447    
1448            * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
1449            DockFrame.OnClose, not DockFrame._OnClose.
1450    
1451    2003-05-21  Jonathan Coles   <[email protected]>
1452    
1453            * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
1454            references to 'inf' and use new Range __init__ to pass floats
1455            directly rather than converting them to strings first.
1456            Fixes RTBug #1876.
1457    
1458            * Thuban/Model/classification.py (ClassGroupRange.SetRange):
1459            Use new Range ___init__ to pass floats.
1460    
1461            * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
1462            filename is a valid image file. Throw IOError otherwise.
1463    
1464            * Thuban/Model/range.py: Brought over new Range from SciParam that
1465            is immutable and has an __init__ which can accept floats.
1466    
1467            * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
1468            into try block. AddLayer doesn't throw any exceptions anymore.
1469            (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
1470            try block.
1471    
1472            * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
1473            the first item in choices. Fixes RTBug #1882.
1474    
1475            * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
1476            has gone to 0 which is a serious problem. abort.
1477            (MapRenderer.draw_raster_layer): Catch IOError seperately and
1478            print the error from GDAL.
1479    
1480            * Thuban/UI/tableview.py (TableGrid.__init__): Call
1481            ToggleEventListeners to turn on listening.
1482            (TableGrid.ToggleEventListeners): New. Turns event listening on
1483            and off so as to prevent excessive messages.
1484            (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
1485            to suppress excessive messages when selecting many rows.
1486            Fixes RTBug #1880.
1487    
1488            * Thuban/UI/view.py: Added checks against if scale == 0. This
1489            is a serious problem that can occur when an image without
1490            geo data is loading and causes the map projection bounds to
1491            go to infinity. Right now, the solution is to simply try
1492            to recover.
1493    
1494            * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
1495            to set the MFILEReceiver attributes even if the data is NULL.
1496    
1497            * extensions/thuban/gdalwarp.cpp: Improved the error handling
1498            and passed GDAL messages back up to the Python layer. Also
1499            tried to fix some memory leaks that were present in the original
1500            utility but didn't matter because the program aborted.
1501    
1502            * test/test_range.py: Copied over tests from SciParam. Removed
1503            tests against importing. Fixes RTBug #1867.
1504    
1505    2003-05-21  Bernhard Herzog  <[email protected]>
1506    
1507            * test/test_load.py: Remove unused imports and restructure the
1508            test code
1509            (LoadSessionTest): Split into one class for each test and turn
1510            LoadSessionTest itself into the base class for all such session
1511            tests.
1512            (ClassificationTest): New base class for load tests that test
1513            classifications
1514            (TestSingleLayer, TestLayerVisibility, TestClassification)
1515            (TestLabels, TestLayerProjection, TestRasterLayer): New classes
1516            for the individual tests
1517    
1518            * test/support.py (FileLoadTestCase.filename): New base class for
1519            file loading tests
1520    
1521    2003-05-21  Jan-Oliver Wagner <[email protected]>
1522    
1523            * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
1524            Mercator' to 'UTM Zone 32' as a more convenient example.
1525            Added 'Gauss Krueger Zone 6'.
1526    
1527            * Data/iceland_sample_raster.thuban: political polygon now
1528            filled transparent to have the raster image visible at once.
1529    
1530    2003-05-21  Frank Koormann  <[email protected]>
1531    
1532            * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
1533            OnClose() to keep in sync with extensions. Internally Thuban
1534            still uses "underscored" names.
1535    
1536    2003-05-20  Jonathan Coles   <[email protected]>
1537    
1538            This puts back Raster layer support. These layers support projections
1539            through the GDAL library. Currently, the CVS version is being used.
1540            There are no Debian packages available although this may change soon.
1541            A GDAL driver was extended to support writing to memory rather to
1542            files.
1543    
1544            There is still some work that needs to be done, such as some error
1545            handling when loading invalid images or when there is a problem
1546            projecting the image. This putback simply checks in the majority
1547            of the work.
1548    
1549            * setup.py: Add gdalwarp library extension.
1550    
1551            * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
1552            Defaults to False, but can be overridden by subclasses if they
1553            support classification.
1554            (RasterLayer): New. Defines a new layer that represents an
1555            image.
1556    
1557            * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
1558            tag handler.
1559            (SessionLoader.start_layer): Encode the filename.
1560            (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
1561            New. Supports reading a rasterlayer tag.
1562    
1563            * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
1564    
1565            * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
1566            get a string in Latin1. If we get such as string convert it to
1567            unicode first, otherwise leave if alone before encoding.
1568            (SessionSaver.write_layer): Add support for writing both Layers
1569            and RasterLayers.
1570    
1571            * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1572            The right argument may not be a string, it could also be a Column.
1573    
1574            * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
1575            Make initial window size 600x400. Fixes RTBug #1872.
1576    
1577            * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
1578            the dialog is constructed so that we can support layers that
1579            do not have classifications.
1580            (Classifier._OnTry): Only build a classification if the layer
1581            supports one.
1582    
1583            * Thuban/UI/legend.py: Change all checks that a layer is an
1584            instance of Layer into checks against BaseLayer.
1585            (LegendTree.__FillTreeLayer): Only add children to a branch if
1586            the layer supports classification.
1587    
1588            * Thuban/UI/mainwindow.py (MainWindow.NewSession,
1589            MainWindow.OpenSession): Don't proceed with an action if the
1590            user chooses Cancel when they are asked to save changes.
1591            (MainWindow.AddRasterLayer): New. Open a dialog to allow the
1592            user to select an image file. Create a new RasterLayer and add
1593            it to the map.
1594    
1595            * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
1596            for rendering RasterLayer layers.
1597            (MapRenderer.draw_raster_layer): Actually method that calls
1598            the GDALWarp python wrapper and constructs an image from the
1599            data returned.
1600    
1601            * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
1602            Choices symbols to match those used in the table query method.
1603            Replace deprecated method calls on table with new method names.
1604    
1605            * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
1606            how small the scale can get. This still needs more testing.
1607    
1608            * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
1609            Provides a driver to output in .bmp format.
1610    
1611            * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
1612            New. Provides IO routines which write to memory, rather than a file.
1613    
1614            * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
1615            of the gdalwarp utility provided in GDAL. Added function calls
1616            that can be accessed from python.
1617    
1618            * Data/iceland_sample_raster.thuban: New. Sample file that uses
1619            a raster layer.
1620    
1621            * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
1622            layer image data.
1623    
1624            * Doc/thuban.dtd: Added rasterlayer attribute definition.
1625    
1626            * test/test_layer.py, test/test_load.py, test/test_save.py: Added
1627            tests associated with the raster layer code.
1628    
1629            * test/test_transientdb.py
1630            (TestTransientTable.test_auto_transient_table_query): Added a test
1631            for using a Column object as the "right" parameter to a query.
1632    
1633    2003-05-19  Frank Koormann  <[email protected]>
1634    
1635            * Thuban/version.py (get_changelog_date):
1636            Catch exceptions if ChangeLog does not exist.
1637    
1638            * Thuban/UI/view.py (MapCanvas.Export): Bugfix
1639    
1640  2003-05-19  Frank Koormann  <[email protected]>  2003-05-19  Frank Koormann  <[email protected]>
1641    
1642          Extended version information for Thuban          Extended version information for Thuban

Legend:
Removed from v.924  
changed lines
  Added in v.1279

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26