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

Legend:
Removed from v.848  
changed lines
  Added in v.1334

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26