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

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26